diff options
author | Bharata B Rao <bharata@linux.ibm.com> | 2019-11-25 06:06:29 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2019-11-28 09:02:26 +0300 |
commit | c32622575dd0ecb6fd0b41e3a451bd58152971ba (patch) | |
tree | 04a7a119504357baa2d9d5e0409b6bf5789fdd91 /arch/powerpc/include/asm/kvm_book3s_uvmem.h | |
parent | 008e359c76d85facb10d10fa21fd5bc8c3a4e5d6 (diff) | |
download | linux-c32622575dd0ecb6fd0b41e3a451bd58152971ba.tar.xz |
KVM: PPC: Book3S HV: Handle memory plug/unplug to secure VM
Register the new memslot with UV during plug and unregister
the memslot during unplug. In addition, release all the
device pages during unplug.
Signed-off-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s_uvmem.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_uvmem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_uvmem.h b/arch/powerpc/include/asm/kvm_book3s_uvmem.h index 3033a9585b43..50204e228f16 100644 --- a/arch/powerpc/include/asm/kvm_book3s_uvmem.h +++ b/arch/powerpc/include/asm/kvm_book3s_uvmem.h @@ -19,6 +19,8 @@ unsigned long kvmppc_h_svm_page_out(struct kvm *kvm, unsigned long kvmppc_h_svm_init_start(struct kvm *kvm); unsigned long kvmppc_h_svm_init_done(struct kvm *kvm); int kvmppc_send_page_to_uv(struct kvm *kvm, unsigned long gfn); +void kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *free, + struct kvm *kvm); #else static inline int kvmppc_uvmem_init(void) { @@ -64,5 +66,9 @@ static inline int kvmppc_send_page_to_uv(struct kvm *kvm, unsigned long gfn) { return -EFAULT; } + +static inline void +kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *free, + struct kvm *kvm) { } #endif /* CONFIG_PPC_UV */ #endif /* __ASM_KVM_BOOK3S_UVMEM_H__ */ |