diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-08-19 02:25:48 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:51:20 -0400 |
commit | e4abac67b756680c63af369f053d11991616aeb4 (patch) | |
tree | 3d73918a19b39995ec5adc1fb51c1e419ddf84c5 /arch/x86/kvm/emulate.c | |
parent | 09b5f4d3c4aa2d4928c0a3723a8de26a76b6339e (diff) |
KVM: x86 emulator: add JrCXZ instruction emulation
Add JrCXZ instruction emulation (opcode 0xe3)
Used by FreeBSD boot loader.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index aece501edce4..312e798d5425 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2487,7 +2487,7 @@ static struct opcode opcode_table[256] = { | |||
2487 | /* 0xD8 - 0xDF */ | 2487 | /* 0xD8 - 0xDF */ |
2488 | N, N, N, N, N, N, N, N, | 2488 | N, N, N, N, N, N, N, N, |
2489 | /* 0xE0 - 0xE7 */ | 2489 | /* 0xE0 - 0xE7 */ |
2490 | X3(D(SrcImmByte)), N, | 2490 | X4(D(SrcImmByte)), |
2491 | D(ByteOp | SrcImmUByte | DstAcc), D(SrcImmUByte | DstAcc), | 2491 | D(ByteOp | SrcImmUByte | DstAcc), D(SrcImmUByte | DstAcc), |
2492 | D(ByteOp | SrcAcc | DstImmUByte), D(SrcAcc | DstImmUByte), | 2492 | D(ByteOp | SrcAcc | DstImmUByte), D(SrcAcc | DstImmUByte), |
2493 | /* 0xE8 - 0xEF */ | 2493 | /* 0xE8 - 0xEF */ |
@@ -3285,6 +3285,10 @@ special_insn: | |||
3285 | (c->b == 0xe2 || test_cc(c->b ^ 0x5, ctxt->eflags))) | 3285 | (c->b == 0xe2 || test_cc(c->b ^ 0x5, ctxt->eflags))) |
3286 | jmp_rel(c, c->src.val); | 3286 | jmp_rel(c, c->src.val); |
3287 | break; | 3287 | break; |
3288 | case 0xe3: /* jcxz/jecxz/jrcxz */ | ||
3289 | if (address_mask(c, c->regs[VCPU_REGS_RCX]) == 0) | ||
3290 | jmp_rel(c, c->src.val); | ||
3291 | break; | ||
3288 | case 0xe4: /* inb */ | 3292 | case 0xe4: /* inb */ |
3289 | case 0xe5: /* in */ | 3293 | case 0xe5: /* in */ |
3290 | goto do_io_in; | 3294 | goto do_io_in; |