diff options
author | Alexander Graf <agraf@suse.de> | 2014-04-29 14:17:26 +0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-04-29 14:36:09 +0400 |
commit | b18db0b80867931f4e3a844400a3c22a4fd2ff57 (patch) | |
tree | 0bc2511f1c513a919904016a0665949107f36c40 /arch/powerpc/kernel/kvm.c | |
parent | ab78475c76bd8c54375d8a778200c59314973d30 (diff) | |
download | linux-b18db0b80867931f4e3a844400a3c22a4fd2ff57.tar.xz |
KVM guest: Make pv trampoline code executable
Our PV guest patching code assembles chunks of instructions on the fly when it
encounters more complicated instructions to hijack. These instructions need
to live in a section that we don't mark as non-executable, as otherwise we
fault when jumping there.
Right now we put it into the .bss section where it automatically gets marked
as non-executable. Add a check to the NX setting function to ensure that we
leave these particular pages executable.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kernel/kvm.c')
-rw-r--r-- | arch/powerpc/kernel/kvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index 6a0175297b0d..dd8695f6cb6d 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c @@ -74,7 +74,7 @@ #define KVM_INST_MTSRIN 0x7c0001e4 static bool kvm_patching_worked = true; -static char kvm_tmp[1024 * 1024]; +char kvm_tmp[1024 * 1024]; static int kvm_tmp_index; static inline void kvm_patch_ins(u32 *inst, u32 new_inst) |