From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Lalancette Subject: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's Date: Tue, 8 Jun 2010 13:55:03 -0400 Message-ID: <1276019703-18136-4-git-send-email-clalance@redhat.com> References: <1276019703-18136-1-git-send-email-clalance@redhat.com> Cc: avi@redhat.com, mtosatti@redhat.com, Chris Lalancette To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49253 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756110Ab0FHR5V (ORCPT ); Tue, 8 Jun 2010 13:57:21 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o58HvLxi012546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Jun 2010 13:57:21 -0400 In-Reply-To: <1276019703-18136-1-git-send-email-clalance@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris Lalancette --- virt/kvm/irq_comm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 52f412f..06cf61e 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -100,7 +100,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, if (r < 0) r = 0; r += kvm_apic_set_irq(vcpu, irq); - } else { + } else if (kvm_lapic_enabled(vcpu)) { if (!lowest) lowest = vcpu; else if (kvm_apic_compare_prio(vcpu, lowest) < 0) -- 1.6.6.1