diff options
author | Avi Kivity <avi@qumranet.com> | 2007-06-05 15:15:51 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 11:05:46 +0200 |
commit | 72d6e5a08a8ba2105b3f36e32285e8fbfbed1f71 (patch) | |
tree | 6d20932e350683760d79f2c6cca6ef3bfafbce96 /drivers/kvm/x86_emulate.c | |
parent | KVM: Move duplicate halt handling code into kvm_main.c (diff) | |
download | linux-72d6e5a08a8ba2105b3f36e32285e8fbfbed1f71.tar.xz linux-72d6e5a08a8ba2105b3f36e32285e8fbfbed1f71.zip |
KVM: Emulate hlt on real mode for Intel
This has two use cases: the bios can't boot from disk, and guest smp
bootstrap.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 6123c0292b22..a4a84817b274 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -143,7 +143,8 @@ static u8 opcode_table[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 - 0xF7 */ 0, 0, 0, 0, - 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, + ImplicitOps, 0, + ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM, /* 0xF8 - 0xFF */ 0, 0, 0, 0, 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM @@ -1149,6 +1150,9 @@ special_insn: case 0xae ... 0xaf: /* scas */ DPRINTF("Urk! I don't handle SCAS.\n"); goto cannot_emulate; + case 0xf4: /* hlt */ + ctxt->vcpu->halt_request = 1; + goto done; } goto writeback; |