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:41 +0100
commita10150f678016565096de5f1ae8b1874b12e1d31 (patch)
treec5d5793c29179af0508a29ed1af1239d37857338
parentb45636488841639276da541ec20421b230e39b13 (diff)
KVM: PPC: Book3S HV: Fix kvmppc_bad_host_intr for real mode
interrupts (bsc#1061840).
-rw-r--r--patches.arch/KVM-PPC-Book3S-HV-Fix-kvmppc_bad_host_intr-for-real-.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.arch/KVM-PPC-Book3S-HV-Fix-kvmppc_bad_host_intr-for-real-.patch b/patches.arch/KVM-PPC-Book3S-HV-Fix-kvmppc_bad_host_intr-for-real-.patch
new file mode 100644
index 0000000000..c877eabbcc
--- /dev/null
+++ b/patches.arch/KVM-PPC-Book3S-HV-Fix-kvmppc_bad_host_intr-for-real-.patch
@@ -0,0 +1,45 @@
+From eadce3b48b5a8ffec7c8abbd4950a501c91d2515 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Fri, 18 May 2018 03:49:43 +1000
+Subject: [PATCH] KVM: PPC: Book3S HV: Fix kvmppc_bad_host_intr for real mode
+ interrupts
+
+References: bsc#1061840
+Patch-mainline: v4.18-rc1
+Git-commit: eadce3b48b5a8ffec7c8abbd4950a501c91d2515
+
+When CONFIG_RELOCATABLE=n, the Linux real mode interrupt handlers call
+into KVM using real address. This needs to be translated to the kernel
+linear effective address before the MMU is switched on.
+
+kvmppc_bad_host_intr misses adding these bits, so when it is used to
+handle a system reset interrupt (that always gets delivered in real
+mode), it results in an instruction access fault immediately after
+the MMU is turned on.
+
+Fix this by ensuring the top 2 address bits are set when the MMU is
+turned on.
+
+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_hv_rmhandlers.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+index ef9e665fc8e2..5e6e493e065e 100644
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+@@ -3568,6 +3568,8 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX)
+ bcl 20, 31, .+4
+ 5: mflr r3
+ addi r3, r3, 9f - 5b
++ li r4, -1
++ rldimi r3, r4, 62, 0 /* ensure 0xc000000000000000 bits are set */
+ ld r4, PACAKMSR(r13)
+ mtspr SPRN_SRR0, r3
+ mtspr SPRN_SRR1, r4
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index 9cfb8d216b..aace7a56d7 100644
--- a/series.conf
+++ b/series.conf
@@ -16732,6 +16732,7 @@
patches.arch/KVM-PPC-Book3S-HV-Recursively-unmap-all-page-table-e.patch
patches.arch/KVM-PPC-Book3S-HV-radix-Refine-IO-region-partition-s.patch
patches.arch/KVM-PPC-Book3S-HV-radix-Do-not-clear-partition-PTE-w.patch
+ patches.arch/KVM-PPC-Book3S-HV-Fix-kvmppc_bad_host_intr-for-real-.patch
patches.suse/ipv6-allow-PMTU-exceptions-to-local-routes.patch
patches.suse/net-dsa-add-error-handling-for-pskb_trim_rcsum.patch
patches.drivers/ixgbe-Fix-setting-of-TC-configuration-for-macvlan-ca.patch