Hi, A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. On such platforms, this driver will be used to manage the movement of guest pages between the normal memory managed by hypervisor (HV) and secure memory managed by Ultravisor (UV). Private ZONE_DEVICE memory equal to the amount of secure memory available in the platform for running secure guests is created via a HMM device. The movement of pages between normal and secure memory is done by ->alloc_and_copy() callback routine of migrate_vma(). The page-in or page-out requests from UV will come to HV as hcalls and HV will call back into UV via uvcalls to satisfy these page requests. These patches apply and work on top of the base Ultravisor patches posted by Claudio Carvalho at: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-May/190694.html In this version, the last two patches are the new additions. Changes in v4 ============= - Handling HV side page invalidations by issuing UV_PAGE_INVAL ucall - Handling HV side radix page faults by sending the page to UV - Support for rebooting a secure guest - Some cleanups and code reorgs v3: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-January/184731.html Bharata B Rao (6): kvmppc: HMM backend driver to manage pages of secure guest kvmppc: Shared pages support for secure guests kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls kvmppc: Handle memory plug/unplug to secure VM kvmppc: Radix changes for secure guest kvmppc: Support reset of secure guest arch/powerpc/include/asm/hvcall.h | 9 + arch/powerpc/include/asm/kvm_book3s_hmm.h | 41 ++ arch/powerpc/include/asm/kvm_host.h | 37 ++ arch/powerpc/include/asm/kvm_ppc.h | 4 + arch/powerpc/include/asm/ultravisor-api.h | 6 + arch/powerpc/include/asm/ultravisor.h | 47 ++ arch/powerpc/kvm/Makefile | 3 + arch/powerpc/kvm/book3s_64_mmu_radix.c | 19 + arch/powerpc/kvm/book3s_hv.c | 69 +++ arch/powerpc/kvm/book3s_hv_hmm.c | 666 ++++++++++++++++++++++ arch/powerpc/kvm/powerpc.c | 12 + include/uapi/linux/kvm.h | 1 + tools/include/uapi/linux/kvm.h | 1 + 13 files changed, 915 insertions(+) create mode 100644 arch/powerpc/include/asm/kvm_book3s_hmm.h create mode 100644 arch/powerpc/kvm/book3s_hv_hmm.c -- 2.17.1