diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-05-17 19:49:43 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-05-18 07:38:23 +0200 |
commit | eadce3b48b5a8ffec7c8abbd4950a501c91d2515 (patch) | |
tree | fd0eb8ced43ffe9c3ada0a5dc09bbddead818f2c /arch/powerpc | |
parent | KVM: PPC: Book3S HV: radix: Do not clear partition PTE when RC or write bits ... (diff) | |
download | linux-eadce3b48b5a8ffec7c8abbd4950a501c91d2515.tar.xz linux-eadce3b48b5a8ffec7c8abbd4950a501c91d2515.zip |
KVM: PPC: Book3S HV: Fix kvmppc_bad_host_intr for real mode interrupts
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 |
1 files changed, 2 insertions, 0 deletions
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 |