summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-06-05 16:15:51 +0300
committerAvi Kivity <avi@qumranet.com>2007-07-16 12:05:46 +0300
commit72d6e5a08a8ba2105b3f36e32285e8fbfbed1f71 (patch)
tree6d20932e350683760d79f2c6cca6ef3bfafbce96 /drivers/kvm/vmx.c
parentd3bef15f84f91c73a5515ad4c6a1749f8f63afcf (diff)
downloadblackbird-op-linux-72d6e5a08a8ba2105b3f36e32285e8fbfbed1f71.tar.gz
blackbird-op-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/vmx.c')
-rw-r--r--drivers/kvm/vmx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 90abd3c58c65..a1f51b9d482d 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1608,8 +1608,13 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
if (vcpu->rmode.active &&
handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK,
- error_code))
+ error_code)) {
+ if (vcpu->halt_request) {
+ vcpu->halt_request = 0;
+ return kvm_emulate_halt(vcpu);
+ }
return 1;
+ }
if ((intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VECTOR_MASK)) == (INTR_TYPE_EXCEPTION | 1)) {
kvm_run->exit_reason = KVM_EXIT_DEBUG;
OpenPOWER on IntegriCloud