Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-10-31 12:36:54 +0100
committerMichal Suchanek <msuchanek@suse.de>2018-10-31 23:28:38 +0100
commit4829860db990fce348bc32e349e20d62833314f8 (patch)
treecaf92c2bb272b4e1d02ed6fd11f6c4299c075ea7
parentb975e77b8eca2b68fa50f7d25afb24736243f03f (diff)
KVM: PPC: Book3S HV: Make radix clear pte when unmapping
(bsc#1061840).
-rw-r--r--patches.arch/KVM-PPC-Book3S-HV-Make-radix-clear-pte-when-unmappin.patch38
-rw-r--r--series.conf1
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.arch/KVM-PPC-Book3S-HV-Make-radix-clear-pte-when-unmappin.patch b/patches.arch/KVM-PPC-Book3S-HV-Make-radix-clear-pte-when-unmappin.patch
new file mode 100644
index 0000000000..10567e13f1
--- /dev/null
+++ b/patches.arch/KVM-PPC-Book3S-HV-Make-radix-clear-pte-when-unmappin.patch
@@ -0,0 +1,38 @@
+From 7e3d9a1d0f2c681456a2e04b8ba9a2fb448fe515 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Wed, 9 May 2018 12:20:15 +1000
+Subject: [PATCH] KVM: PPC: Book3S HV: Make radix clear pte when unmapping
+
+References: bsc#1061840
+Patch-mainline: v4.17-rc7
+Git-commit: 7e3d9a1d0f2c681456a2e04b8ba9a2fb448fe515
+
+The current partition table unmap code clears the _PAGE_PRESENT bit
+out of the pte, which leaves pud_huge/pmd_huge true and does not
+clear pud_present/pmd_present. This can confuse subsequent page
+faults and possibly lead to the guest looping doing continual
+hypervisor page faults.
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
+index a6870288c0e0..361f42c8c73e 100644
+--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
++++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
+@@ -584,7 +584,7 @@ int kvm_unmap_radix(struct kvm *kvm, struct kvm_memory_slot *memslot,
+
+ ptep = __find_linux_pte(kvm->arch.pgtable, gpa, NULL, &shift);
+ if (ptep && pte_present(*ptep)) {
+- old = kvmppc_radix_update_pte(kvm, ptep, _PAGE_PRESENT, 0,
++ old = kvmppc_radix_update_pte(kvm, ptep, ~0UL, 0,
+ gpa, shift);
+ kvmppc_radix_tlbie_page(kvm, gpa, shift);
+ if ((old & _PAGE_DIRTY) && memslot->dirty_bitmap) {
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index 9f74d7059b..49be9c6e79 100644
--- a/series.conf
+++ b/series.conf
@@ -15765,6 +15765,7 @@
patches.suse/kernel-sys.c-fix-potential-Spectre-v1-issue.patch
patches.arch/KVM-PPC-Book3S-HV-Snapshot-timebase-offset-on-guest-.patch
patches.arch/KVM-PPC-Book3S-HV-Make-radix-use-correct-tlbie-seque.patch
+ patches.arch/KVM-PPC-Book3S-HV-Make-radix-clear-pte-when-unmappin.patch
patches.arch/x86-kvm-fix-lapic-timer-drift-when-guest-uses-periodic-mode
patches.arch/kvm-x86-update-cpuid-properly-when-cr4-osxave-or-cr4-pke-is-changed
patches.arch/46-kvm-x86-ia32_arch_capabilities-is-always-supported.patch