aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorGuillaume Thouvenin <guillaume.thouvenin@ext.bull.net>2008-05-27 04:22:20 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:27 -0400
commit89c696383d6eb493351a89d450d8ad7a55cbe1da (patch)
tree52ba8d5e28a957e04817acca1d419c3641ffd9db /arch/x86/kvm
parent3e6e0aab1ba1e8b354ce01f5659336f9aee69437 (diff)
KVM: x86 emulator: Update c->dst.bytes in decode instruction
Update c->dst.bytes in decode instruction instead of instruction itself. It's needed because if c->dst.bytes is equal to 0, the instruction is not emulated. Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> Signed-off-by: Laurent Vivier <laurent.vivier@bull.net> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86_emulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 932f216d890c..a928aa6cdad2 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1049,6 +1049,7 @@ done_prefixes:
1049 break; 1049 break;
1050 case DstMem: 1050 case DstMem:
1051 if ((c->d & ModRM) && c->modrm_mod == 3) { 1051 if ((c->d & ModRM) && c->modrm_mod == 3) {
1052 c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes;
1052 c->dst.type = OP_REG; 1053 c->dst.type = OP_REG;
1053 c->dst.val = c->dst.orig_val = c->modrm_val; 1054 c->dst.val = c->dst.orig_val = c->modrm_val;
1054 c->dst.ptr = c->modrm_ptr; 1055 c->dst.ptr = c->modrm_ptr;