OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2019 14:54:39 +0000 (15:54 +0100)
commit54a1440e13e5fc7ed1b443deacf9630c25bd924c
tree3f7e7eb57a93fbf91acb471f108910131606a526
parent3ab6458a1cdfdbf3f2a7e483c2c9ebe07d79040d
KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR

[ Upstream commit 1006284c5e411872333967b1970c2ca46a9e225f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kvm/book3s.c