diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-04-12 13:36:57 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 11:48:42 +0300 |
commit | ba8afb6b0a2c7e06da760ffe5d078245058619b5 (patch) | |
tree | cfa06923a20919ad95e1202cfaab78d80b85998f /arch/x86/kvm | |
parent | e637b8238ad1783ebdd113bd34cd6982dec1006d (diff) | |
download | op-kernel-dev-ba8afb6b0a2c7e06da760ffe5d078245058619b5.zip op-kernel-dev-ba8afb6b0a2c7e06da760ffe5d078245058619b5.tar.gz |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b5ac1b7..8beccaa 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2413,6 +2413,11 @@ int emulate_instruction(struct kvm_vcpu *vcpu, } } + if (emulation_type & EMULTYPE_SKIP) { + kvm_rip_write(vcpu, vcpu->arch.emulate_ctxt.decode.eip); + return EMULATE_DONE; + } + r = x86_emulate_insn(&vcpu->arch.emulate_ctxt, &emulate_ops); if (vcpu->arch.pio.string) |