aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-04-12 06:36:57 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:42 -0400
commitba8afb6b0a2c7e06da760ffe5d078245058619b5 (patch)
treecfa06923a20919ad95e1202cfaab78d80b85998f /arch/x86/kvm
parente637b8238ad1783ebdd113bd34cd6982dec1006d (diff)
KVM: x86 emulator: Add new mode of instruction emulation: skip
In the new mode instruction is decoded, but not executed. The EIP is moved to point after the instruction. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b5ac1b722454..8beccaa17690 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2413,6 +2413,11 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
2413 } 2413 }
2414 } 2414 }
2415 2415
2416 if (emulation_type & EMULTYPE_SKIP) {
2417 kvm_rip_write(vcpu, vcpu->arch.emulate_ctxt.decode.eip);
2418 return EMULATE_DONE;
2419 }
2420
2416 r = x86_emulate_insn(&vcpu->arch.emulate_ctxt, &emulate_ops); 2421 r = x86_emulate_insn(&vcpu->arch.emulate_ctxt, &emulate_ops);
2417 2422
2418 if (vcpu->arch.pio.string) 2423 if (vcpu->arch.pio.string)