aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/emulate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 16c037e7db7d..282d28cb9931 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -4117,7 +4117,10 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,
4117 case OpMem8: 4117 case OpMem8:
4118 ctxt->memop.bytes = 1; 4118 ctxt->memop.bytes = 1;
4119 if (ctxt->memop.type == OP_REG) { 4119 if (ctxt->memop.type == OP_REG) {
4120 ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, 1); 4120 int highbyte_regs = ctxt->rex_prefix == 0;
4121
4122 ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm,
4123 highbyte_regs);
4121 fetch_register_operand(&ctxt->memop); 4124 fetch_register_operand(&ctxt->memop);
4122 } 4125 }
4123 goto mem_common; 4126 goto mem_common;