summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/kvm.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-29 12:17:26 +0200
committerAlexander Graf <agraf@suse.de>2014-04-29 12:36:09 +0200
commitb18db0b80867931f4e3a844400a3c22a4fd2ff57 (patch)
tree0bc2511f1c513a919904016a0665949107f36c40 /arch/powerpc/kernel/kvm.c
parentab78475c76bd8c54375d8a778200c59314973d30 (diff)
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.c2
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)