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: Fri, 30 Oct 2015 15:38:11 +0000 Message-ID: <56338EE3.4010004@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> <561E7C5C.1060406@citrix.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F613C61@AMSPEX01CL01.citrite.net> <56338E1A.7070100@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZsBkt-0002GP-LG for xen-devel@lists.xenproject.org; Fri, 30 Oct 2015 15:38:15 +0000 In-Reply-To: <56338E1A.7070100@citrix.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: =?windows-1252?Q?Roger_Pau_Monn=E9?= , Paul Durrant , Jan Beulich Cc: "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org On 30/10/15 15:34, Roger Pau Monn=E9 wrote: > El 15/10/15 a les 13.30, Paul Durrant ha escrit: >>> -----Original Message----- >>> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel- >>> bounces@lists.xen.org] On Behalf Of Andrew Cooper >>> Sent: 14 October 2015 17:02 >>> To: Jan Beulich; Roger Pau Monne >>> Cc: xen-devel@lists.xenproject.org >>> Subject: Re: [Xen-devel] [PATCH v7 23/32] xen/x86: make sure the HVM >>> callback vector is correctly set >>> >>> 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 =3D HVMIRQ_callback_none; >>>>> >>>>> + if ( via_type !=3D 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 mano= r. >>> >> IIRC both the intx and gsi variants of the callback via go in at the vio= apic level. > OK, so I can remove the PIC requirement. In some copious free time, we really should see about dropping the vPIC entirely and doing what real hardware does, and implement virtual wire mode in the vIOAPIC for PIC emulation. This would simplify the choice of injection options from the Xen side. ~Andrew