aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/powerpc.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-06-18 08:53:49 -0400
committerAlexander Graf <agraf@suse.de>2014-07-28 12:30:10 -0400
commitd69614a295aef72f8fb22da8e3ccf1a8f19a7ffc (patch)
treeb8ce894e8738e6711b5593a28a116db5567fe31f /arch/powerpc/kvm/powerpc.c
parentc12fb43c2f6d6a57a4e21afe74ff56485d699ee7 (diff)
KVM: PPC: Separate loadstore emulation from priv emulation
Today the instruction emulator can get called via 2 separate code paths. It can either be called by MMIO emulation detection code or by privileged instruction traps. This is bad, as both code paths prepare the environment differently. For MMIO emulation we already know the virtual address we faulted on, so instructions there don't have to actually fetch that information. Split out the two separate use cases into separate files. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r--arch/powerpc/kvm/powerpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 544d1d30c8cc..c14ed15fd60b 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -272,7 +272,7 @@ int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu)
272 enum emulation_result er; 272 enum emulation_result er;
273 int r; 273 int r;
274 274
275 er = kvmppc_emulate_instruction(run, vcpu); 275 er = kvmppc_emulate_loadstore(vcpu);
276 switch (er) { 276 switch (er) {
277 case EMULATE_DONE: 277 case EMULATE_DONE:
278 /* Future optimization: only reload non-volatiles if they were 278 /* Future optimization: only reload non-volatiles if they were