summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorLaurent Vivier2007-09-18 11:27:27 +0200
committerAvi Kivity2008-01-30 16:52:47 +0100
commit1be3aa47182e94944e57b176a5c4ee4e74f1ce33 (patch)
tree413c3e2c81aabd8fdcbfb21b994e600575a6949b /drivers/kvm/x86_emulate.c
parentKVM: x86 emulator: move all decoding process to function x86_decode_insn() (diff)
downloadkernel-qcow2-linux-1be3aa47182e94944e57b176a5c4ee4e74f1ce33.tar.gz
kernel-qcow2-linux-1be3aa47182e94944e57b176a5c4ee4e74f1ce33.tar.xz
kernel-qcow2-linux-1be3aa47182e94944e57b176a5c4ee4e74f1ce33.zip
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/x86_emulate.c')
-rw-r--r--drivers/kvm/x86_emulate.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 540589c5d427..c191093982d8 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -908,18 +908,14 @@ done:
}
int
-x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
+x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
{
unsigned long cr2 = ctxt->cr2;
int no_wb = 0;
u64 msr_data;
unsigned long _eflags = ctxt->eflags;
struct decode_cache *c = &ctxt->decode;
- int rc;
-
- rc = x86_decode_insn(ctxt, ops);
- if (rc)
- return rc;
+ int rc = 0;
if ((c->d & ModRM) && (c->modrm_mod != 3))
cr2 = c->modrm_ea;