KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
authorCameron Kaiser <spectre@floodgap.com>
Tue, 31 Jul 2018 14:39:21 +0000 (07:39 -0700)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 5 Oct 2018 05:55:06 +0000 (15:55 +1000)
commit1006284c5e411872333967b1970c2ca46a9e225f
treef9d378b7881aef688145eeef72fe29e57aeb41dc
parentdd5bd0a65ff6f22a32b35ca3fa1bcf7a6bc7104f
KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR

When an OS (currently only classic Mac OS) is running in KVM-PR and makes a
linked jump from code with split hack addressing enabled into code that does
not, LR is not correctly updated and reflects the previously munged PC.

To fix this, this patch undoes the address munge when exiting split
hack mode so that code relying on LR being a proper address will now
execute. This does not affect OS X or other operating systems running
on KVM-PR.

Signed-off-by: Cameron Kaiser <spectre@floodgap.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s.c