diff options
author | Bharata B Rao <bharata@linux.ibm.com> | 2019-11-25 08:36:28 +0530 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2019-11-28 17:02:20 +1100 |
commit | 008e359c76d85facb10d10fa21fd5bc8c3a4e5d6 (patch) | |
tree | a855afea77b5d2c64102112966d3fdfd46f58f8e /arch/powerpc/include/asm/kvm_book3s_uvmem.h | |
parent | KVM: PPC: Book3S HV: Shared pages support for secure guests (diff) | |
download | linux-dev-008e359c76d85facb10d10fa21fd5bc8c3a4e5d6.tar.xz linux-dev-008e359c76d85facb10d10fa21fd5bc8c3a4e5d6.zip |
KVM: PPC: Book3S HV: Radix changes for secure guest
- After the guest becomes secure, when we handle a page fault of a page
belonging to SVM in HV, send that page to UV via UV_PAGE_IN.
- Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL.
- Ensure all those routines that walk the secondary page tables of
the guest don't do so in case of secure VM. For secure guest, the
active secondary page tables are in secure memory and the secondary
page tables in HV are freed when guest becomes secure.
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 95f389c2937b..3033a9585b43 100644 --- a/arch/powerpc/include/asm/kvm_book3s_uvmem.h +++ b/arch/powerpc/include/asm/kvm_book3s_uvmem.h @@ -18,6 +18,7 @@ unsigned long kvmppc_h_svm_page_out(struct kvm *kvm, unsigned long page_shift); 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); #else static inline int kvmppc_uvmem_init(void) { @@ -58,5 +59,10 @@ static inline unsigned long kvmppc_h_svm_init_done(struct kvm *kvm) { return H_UNSUPPORTED; } + +static inline int kvmppc_send_page_to_uv(struct kvm *kvm, unsigned long gfn) +{ + return -EFAULT; +} #endif /* CONFIG_PPC_UV */ #endif /* __ASM_KVM_BOOK3S_UVMEM_H__ */ |