diff options
| -rw-r--r-- | arch/x86/kvm/emulate.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e46809b8f31b..1c95935fe1b7 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
| @@ -3361,11 +3361,7 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, | |||
| 3361 | rc = decode_imm(ctxt, op, 1, false); | 3361 | rc = decode_imm(ctxt, op, 1, false); |
| 3362 | break; | 3362 | break; |
| 3363 | case OpMem: | 3363 | case OpMem: |
| 3364 | case OpMem64: | 3364 | ctxt->memop.bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; |
| 3365 | if (d == OpMem64) | ||
| 3366 | ctxt->memop.bytes = 8; | ||
| 3367 | else | ||
| 3368 | ctxt->memop.bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; | ||
| 3369 | mem_common: | 3365 | mem_common: |
| 3370 | *op = ctxt->memop; | 3366 | *op = ctxt->memop; |
| 3371 | ctxt->memopp = op; | 3367 | ctxt->memopp = op; |
| @@ -3373,6 +3369,9 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, | |||
| 3373 | fetch_bit_operand(ctxt); | 3369 | fetch_bit_operand(ctxt); |
| 3374 | op->orig_val = op->val; | 3370 | op->orig_val = op->val; |
| 3375 | break; | 3371 | break; |
| 3372 | case OpMem64: | ||
| 3373 | ctxt->memop.bytes = 8; | ||
| 3374 | goto mem_common; | ||
| 3376 | case OpAcc: | 3375 | case OpAcc: |
| 3377 | op->type = OP_REG; | 3376 | op->type = OP_REG; |
| 3378 | op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; | 3377 | op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes; |
