diff options
author | Alexander Graf <agraf@suse.de> | 2012-12-14 23:42:05 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-01-10 13:15:08 +0100 |
commit | 50c7bb80b5bd5a9962905306dd2292eeb9857d46 (patch) | |
tree | e3cdb57befb40b314f2ccceece50d9ab2477f2f9 /arch/powerpc/include/asm/kvm_ppc.h | |
parent | 5a33169ed29060df71627103e6968078b42de945 (diff) | |
download | lwn-50c7bb80b5bd5a9962905306dd2292eeb9857d46.tar.gz lwn-50c7bb80b5bd5a9962905306dd2292eeb9857d46.zip |
KVM: PPC: Book3S: PR: Enable alternative instruction for SC 1
When running on top of pHyp, the hypercall instruction "sc 1" goes
straight into pHyp without trapping in supervisor mode.
So if we want to support PAPR guest in this configuration we need to
add a second way of accessing PAPR hypercalls, preferably with the
exact same semantics except for the instruction.
So let's overlay an officially reserved instruction and emulate PAPR
hypercalls whenever we hit that one.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_ppc.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_ppc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index 572aa7530619..5f5f69abd281 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h @@ -44,6 +44,7 @@ enum emulation_result { EMULATE_DO_DCR, /* kvm_run filled with DCR request */ EMULATE_FAIL, /* can't emulate this instruction */ EMULATE_AGAIN, /* something went wrong. go again */ + EMULATE_DO_PAPR, /* kvm_run filled with PAPR request */ }; extern int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu); |