From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v7 23/32] xen/x86: make sure the HVM callback vector is correctly set Date: Wed, 14 Oct 2015 17:01:32 +0100 Message-ID: <561E7C5C.1060406@citrix.com> References: <1443800943-17668-1-git-send-email-roger.pau@citrix.com> <1443800943-17668-24-git-send-email-roger.pau@citrix.com> <561E96C402000078000AB0CF@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZmOVB-0007ex-O8 for xen-devel@lists.xenproject.org; Wed, 14 Oct 2015 16:02:05 +0000 In-Reply-To: <561E96C402000078000AB0CF@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Roger Pau Monne Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 14/10/15 16:54, Jan Beulich wrote: >>>> On 02.10.15 at 17:48, wrote: >> --- a/xen/arch/x86/hvm/irq.c >> +++ b/xen/arch/x86/hvm/irq.c >> @@ -330,6 +330,10 @@ void hvm_set_callback_via(struct domain *d, uint64_t >> via) >> (via_type > HVMIRQ_callback_vector) ) >> via_type = HVMIRQ_callback_none; >> >> + if ( via_type != HVMIRQ_callback_vector && >> + (!has_vlapic(d) || !has_vioapic(d) || !has_vpic(d)) ) >> + return; > Why are both IO-APIC and PIC required? Doesn't one suffice, or > can't MSI-like interrupts even get delivered without either? In real hardware, MSI-like interrupts have no interaction with the IO-APIC or PIC. In fact, the purpose of the IO-APIC is to turn legacy line interrupts into MSI interrupts. The PICs were from the pre-MSI days where it asserted the #INTR pin on the processor. Our virtual interrupt infrastructure should behave in a consistent manor. ~Andrew