diff options
author | Laurent Vivier <Laurent.Vivier@bull.net> | 2007-09-18 05:27:27 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:47 -0500 |
commit | 1be3aa47182e94944e57b176a5c4ee4e74f1ce33 (patch) | |
tree | 413c3e2c81aabd8fdcbfb21b994e600575a6949b /drivers/kvm/x86_emulate.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/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 8 |
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: | |||
908 | } | 908 | } |
909 | 909 | ||
910 | int | 910 | int |
911 | x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) | 911 | x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) |
912 | { | 912 | { |
913 | unsigned long cr2 = ctxt->cr2; | 913 | unsigned long cr2 = ctxt->cr2; |
914 | int no_wb = 0; | 914 | int no_wb = 0; |
915 | u64 msr_data; | 915 | u64 msr_data; |
916 | unsigned long _eflags = ctxt->eflags; | 916 | unsigned long _eflags = ctxt->eflags; |
917 | struct decode_cache *c = &ctxt->decode; | 917 | struct decode_cache *c = &ctxt->decode; |
918 | int rc; | 918 | int rc = 0; |
919 | |||
920 | rc = x86_decode_insn(ctxt, ops); | ||
921 | if (rc) | ||
922 | return rc; | ||
923 | 919 | ||
924 | if ((c->d & ModRM) && (c->modrm_mod != 3)) | 920 | if ((c->d & ModRM) && (c->modrm_mod != 3)) |
925 | cr2 = c->modrm_ea; | 921 | cr2 = c->modrm_ea; |