diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-07-18 09:15:21 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 08:18:25 (GMT) |
commit | b6958ce44a11a9e9425d2b67a653b1ca2a27796f (patch) | |
tree | 503478ef27254df9b6ea21d2a6a279a7dfe2ef04 /drivers/kvm/irq.c | |
parent | 1fd4f2a5ed8f80cf6e23d2bdf78554f6a1ac7997 (diff) | |
download | linux-fsl-qoriq-b6958ce44a11a9e9425d2b67a653b1ca2a27796f.tar.xz |
KVM: Emulate hlt in the kernel
By sleeping in the kernel when hlt is executed, we simplify the in-kernel
guest interrupt path considerably.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/irq.c')
-rw-r--r-- | drivers/kvm/irq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c index 5265f82..e09cd65 100644 --- a/drivers/kvm/irq.c +++ b/drivers/kvm/irq.c @@ -70,6 +70,10 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu) { int ipi_pcpu = vcpu->cpu; + if (waitqueue_active(&vcpu->wq)) { + wake_up_interruptible(&vcpu->wq); + ++vcpu->stat.halt_wakeup; + } if (vcpu->guest_mode) smp_call_function_single(ipi_pcpu, vcpu_kick_intr, vcpu, 0, 0); } |