]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Disable relocation on exceptions whenever PR KVM is active
authorIan Munsie <imunsie@au1.ibm.com>
Mon, 3 Dec 2012 18:36:13 +0000 (18:36 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:00:42 +0000 (17:00 +1100)
commita413f474a0ff29404bf1af5c024215476ed6ca01
treed147d35ef9f846167738e5a9ca2964353634330a
parent96f013fe1b0904ee9059aa5105f7aa4959cd3914
powerpc: Disable relocation on exceptions whenever PR KVM is active

For PR KVM we allow userspace to map 0xc000000000000000. Because
transitioning from userspace to the guest kernel may use the relocated
exception vectors we have to disable relocation on exceptions whenever
PR KVM is active as we cannot trust that address.

This issue does not apply to HV KVM, since changing from a guest to the
hypervisor will never use the relocated exception vectors.

Currently the hypervisor interface only allows us to toggle relocation
on exceptions on a partition wide scope, so we need to globally disable
relocation on exceptions when the first PR KVM instance is started and
only re-enable them when all PR KVM instances have been destroyed.

It's a bit heavy handed, but until the hypervisor gives us a lightweight
way to toggle relocation on exceptions on a single thread it's only real
option.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/hvcall.h
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/platforms/pseries/setup.c