1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_KVM_BOOK3S_UVMEM_H__
3 #define __ASM_KVM_BOOK3S_UVMEM_H__
6 int kvmppc_uvmem_init(void);
7 void kvmppc_uvmem_free(void);
8 int kvmppc_uvmem_slot_init(struct kvm
*kvm
, const struct kvm_memory_slot
*slot
);
9 void kvmppc_uvmem_slot_free(struct kvm
*kvm
,
10 const struct kvm_memory_slot
*slot
);
11 unsigned long kvmppc_h_svm_page_in(struct kvm
*kvm
,
14 unsigned long page_shift
);
15 unsigned long kvmppc_h_svm_page_out(struct kvm
*kvm
,
18 unsigned long page_shift
);
19 unsigned long kvmppc_h_svm_init_start(struct kvm
*kvm
);
20 unsigned long kvmppc_h_svm_init_done(struct kvm
*kvm
);
21 int kvmppc_send_page_to_uv(struct kvm
*kvm
, unsigned long gfn
);
22 unsigned long kvmppc_h_svm_init_abort(struct kvm
*kvm
);
23 void kvmppc_uvmem_drop_pages(const struct kvm_memory_slot
*free
,
24 struct kvm
*kvm
, bool skip_page_out
);
26 static inline int kvmppc_uvmem_init(void)
31 static inline void kvmppc_uvmem_free(void) { }
34 kvmppc_uvmem_slot_init(struct kvm
*kvm
, const struct kvm_memory_slot
*slot
)
40 kvmppc_uvmem_slot_free(struct kvm
*kvm
, const struct kvm_memory_slot
*slot
) { }
42 static inline unsigned long
43 kvmppc_h_svm_page_in(struct kvm
*kvm
, unsigned long gra
,
44 unsigned long flags
, unsigned long page_shift
)
49 static inline unsigned long
50 kvmppc_h_svm_page_out(struct kvm
*kvm
, unsigned long gra
,
51 unsigned long flags
, unsigned long page_shift
)
56 static inline unsigned long kvmppc_h_svm_init_start(struct kvm
*kvm
)
61 static inline unsigned long kvmppc_h_svm_init_done(struct kvm
*kvm
)
66 static inline unsigned long kvmppc_h_svm_init_abort(struct kvm
*kvm
)
71 static inline int kvmppc_send_page_to_uv(struct kvm
*kvm
, unsigned long gfn
)
77 kvmppc_uvmem_drop_pages(const struct kvm_memory_slot
*free
,
78 struct kvm
*kvm
, bool skip_page_out
) { }
79 #endif /* CONFIG_PPC_UV */
80 #endif /* __ASM_KVM_BOOK3S_UVMEM_H__ */