diff options
author | Laurent Vivier <Laurent.Vivier@bull.net> | 2007-09-18 11:27:27 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:52:47 +0200 |
commit | 1be3aa47182e94944e57b176a5c4ee4e74f1ce33 (patch) | |
tree | 413c3e2c81aabd8fdcbfb21b994e600575a6949b /drivers/kvm/kvm_main.c | |
parent | 8b4caf6650808024c37ec4b29cf81b308af998b1 (diff) |
KVM: emulate_instruction() calls now x86_decode_insn() and x86_emulate_insn()
emulate_instruction() calls now x86_decode_insn() and x86_emulate_insn().
x86_emulate_insn() is x86_emulate_memop() without the decoding part.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 1c662f63b7a..800ab5028ed 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -1287,7 +1287,10 @@ int emulate_instruction(struct kvm_vcpu *vcpu, vcpu->mmio_is_write = 0; vcpu->pio.string = 0; - r = x86_emulate_memop(&emulate_ctxt, &emulate_ops); + r = x86_decode_insn(&emulate_ctxt, &emulate_ops); + if (r == 0) + r = x86_emulate_insn(&emulate_ctxt, &emulate_ops); + if (vcpu->pio.string) return EMULATE_DO_MMIO; |