summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_64_mmu_radix.c
diff options
context:
space:
mode:
authorBharata B Rao <bharata@linux.ibm.com>2019-11-25 08:36:29 +0530
committerPaul Mackerras <paulus@ozlabs.org>2019-11-28 17:02:26 +1100
commitc32622575dd0ecb6fd0b41e3a451bd58152971ba (patch)
tree04a7a119504357baa2d9d5e0409b6bf5789fdd91 /arch/powerpc/kvm/book3s_64_mmu_radix.c
parent008e359c76d85facb10d10fa21fd5bc8c3a4e5d6 (diff)
downloadlinux-stable-c32622575dd0ecb6fd0b41e3a451bd58152971ba.tar.gz
linux-stable-c32622575dd0ecb6fd0b41e3a451bd58152971ba.tar.bz2
linux-stable-c32622575dd0ecb6fd0b41e3a451bd58152971ba.zip
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/kvm/book3s_64_mmu_radix.c')
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_radix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
index 9f6ba113ffe3..da857c8ba6e4 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
@@ -1101,6 +1101,9 @@ void kvmppc_radix_flush_memslot(struct kvm *kvm,
unsigned long gpa;
unsigned int shift;
+ if (kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START)
+ kvmppc_uvmem_drop_pages(memslot, kvm);
+
if (kvm->arch.secure_guest & KVMPPC_SECURE_INIT_DONE)
return;