diff options
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 33b181451557..bd46de6bf891 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -448,8 +448,7 @@ struct operand { | |||
448 | 448 | ||
449 | #define JMP_REL(rel) \ | 449 | #define JMP_REL(rel) \ |
450 | do { \ | 450 | do { \ |
451 | _eip += (int)(rel); \ | 451 | register_address_increment(_eip, rel); \ |
452 | _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \ | ||
453 | } while (0) | 452 | } while (0) |
454 | 453 | ||
455 | /* | 454 | /* |
@@ -1147,7 +1146,7 @@ done_prefixes: | |||
1147 | } | 1146 | } |
1148 | register_address_increment(_regs[VCPU_REGS_RSP], | 1147 | register_address_increment(_regs[VCPU_REGS_RSP], |
1149 | -dst.bytes); | 1148 | -dst.bytes); |
1150 | if ((rc = ops->write_std( | 1149 | if ((rc = ops->write_emulated( |
1151 | register_address(ctxt->ss_base, | 1150 | register_address(ctxt->ss_base, |
1152 | _regs[VCPU_REGS_RSP]), | 1151 | _regs[VCPU_REGS_RSP]), |
1153 | &dst.val, dst.bytes, ctxt->vcpu)) != 0) | 1152 | &dst.val, dst.bytes, ctxt->vcpu)) != 0) |
@@ -1359,6 +1358,7 @@ special_insn: | |||
1359 | } | 1358 | } |
1360 | src.val = (unsigned long) _eip; | 1359 | src.val = (unsigned long) _eip; |
1361 | JMP_REL(rel); | 1360 | JMP_REL(rel); |
1361 | op_bytes = ad_bytes; | ||
1362 | goto push; | 1362 | goto push; |
1363 | } | 1363 | } |
1364 | case 0xe9: /* jmp rel */ | 1364 | case 0xe9: /* jmp rel */ |