aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-09-13 03:45:46 -0400
committerAvi Kivity <avi@redhat.com>2011-09-25 12:52:53 -0400
commit5217973ef899ffecdd77743aae3b633994a08cde (patch)
treeffef4ae801406f1ae03352022bce1ad647dc82a3 /arch/x86/kvm/emulate.c
parent608aabe316eab9116ddd73418217277693df3bb8 (diff)
KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack
OpReg decoding has a hack that inhibits byte registers for movsx and movzx instructions. It should be replaced by something better, but meanwhile, qualify that the hack is only active for the destination operand. Note these instructions only use OpReg for the destination, but better to be explicit about it. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index a0d6ceb4b45..17a8910f28c 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3346,6 +3346,7 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,
3346 switch (d) { 3346 switch (d) {
3347 case OpReg: 3347 case OpReg:
3348 decode_register_operand(ctxt, op, 3348 decode_register_operand(ctxt, op,
3349 op == &ctxt->dst &&
3349 ctxt->twobyte && (ctxt->b == 0xb6 || ctxt->b == 0xb7)); 3350 ctxt->twobyte && (ctxt->b == 0xb6 || ctxt->b == 0xb7));
3350 break; 3351 break;
3351 case OpImmUByte: 3352 case OpImmUByte: