]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Fix kvmppc_bad_host_intr for real mode interrupts
authorNicholas Piggin <npiggin@gmail.com>
Thu, 17 May 2018 17:49:43 +0000 (03:49 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 18 May 2018 05:38:23 +0000 (15:38 +1000)
commit7b2d0372d0fc6a8ee806f9cf68ddcf62222059c4
treefd0eb8ced43ffe9c3ada0a5dc09bbddead818f2c
parent3587fa1270a1b7922d72e53314e265d0fcf4ed10
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>
arch/powerpc/kvm/book3s_hv_rmhandlers.S