From b6958ce44a11a9e9425d2b67a653b1ca2a27796f Mon Sep 17 00:00:00 2001 From: Eddie Dong Date: Wed, 18 Jul 2007 12:15:21 +0300 Subject: 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 Signed-off-by: Yaozu (Eddie) Dong Signed-off-by: Avi Kivity --- drivers/kvm/i8259.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/kvm/i8259.c') diff --git a/drivers/kvm/i8259.c b/drivers/kvm/i8259.c index 40ad10462238..ee6030dc5c04 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) -- cgit v1.2.1