aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/emulate.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 0bd372f3c989..07ffca0a89e9 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1045,13 +1045,9 @@ static void decode_register_operand(struct x86_emulate_ctxt *ctxt,
1045 } 1045 }
1046 1046
1047 op->type = OP_REG; 1047 op->type = OP_REG;
1048 if (ctxt->d & ByteOp) { 1048 op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes;
1049 op->addr.reg = decode_register(ctxt, reg, true); 1049 op->addr.reg = decode_register(ctxt, reg, ctxt->d & ByteOp);
1050 op->bytes = 1; 1050
1051 } else {
1052 op->addr.reg = decode_register(ctxt, reg, false);
1053 op->bytes = ctxt->op_bytes;
1054 }
1055 fetch_register_operand(op); 1051 fetch_register_operand(op);
1056 op->orig_val = op->val; 1052 op->orig_val = op->val;
1057} 1053}