diff options
author | Eddie Dong <eddie.dong@intel.com> | 2007-07-18 12:15:21 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:25 +0200 |
commit | b6958ce44a11a9e9425d2b67a653b1ca2a27796f (patch) | |
tree | 503478ef27254df9b6ea21d2a6a279a7dfe2ef04 /drivers/kvm/i8259.c | |
parent | 1fd4f2a5ed8f80cf6e23d2bdf78554f6a1ac7997 (diff) |
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/i8259.c')
-rw-r--r-- | drivers/kvm/i8259.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/i8259.c b/drivers/kvm/i8259.c index 40ad1046223..ee6030dc5c0 100644 --- a/drivers/kvm/i8259.c +++ b/drivers/kvm/i8259.c @@ -413,8 +413,11 @@ static void picdev_read(struct kvm_io_device *this, static void pic_irq_request(void *opaque, int level) { struct kvm *kvm = opaque; + struct kvm_vcpu *vcpu = kvm->vcpus[0]; pic_irqchip(kvm)->output = level; + if (vcpu) + kvm_vcpu_kick(vcpu); } struct kvm_pic *kvm_create_pic(struct kvm *kvm) |