Kay, Allen M
2008-Jan-24 02:33 UTC
[Xen-devel] [VTD][PATCH] interrupt remapping patch for xen 3.3
Attached patch remaps interrupt for passthru device if such HW is detected on VT-d platforms. Signed-off-by: Allen Kay <allen.m.kay@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Jan-24 08:13 UTC
Re: [Xen-devel] [VTD][PATCH] interrupt remapping patch for xen 3.3
What exactly does irq remapping mean, and what are its benefits in the current Xen VT-D architecture? It''s really not at all clear what''s going on from the current VT-D documentation. Since all interrupts get abstracted through Xen right now, if it''s just an interrupt-line remapping then that doesn''t seem very useful... -- Keir On 24/1/08 02:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote:> Attached patch remaps interrupt for passthru device if such HW is > detected on VT-d platforms. > > Signed-off-by: Allen Kay <allen.m.kay@intel.com> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kay, Allen M
2008-Jan-24 22:33 UTC
RE: [Xen-devel] [VTD][PATCH] interrupt remapping patch for xen 3.3
Interrupt remapping redirects ioapic/msi interrupt entries to interrupt remap table. SID field in the Interrupt Remapping Table Entry qualifies the interrupt with BDF information of the ioapic/MSI devices. Therefore the main value it adds for current Xen VT-d/PCI passthru is that it protects hypervisor interrupts from malicious attacks from guests with passthru devices. Other benefits it can provide is easier IRQ rebalancing and extended APIC ID support. Allen>-----Original Message----- >From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >Sent: Thursday, January 24, 2008 12:14 AM >To: Kay, Allen M; xen-devel@lists.xensource.com >Cc: Han, Weidong >Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >patch for xen 3.3 > >What exactly does irq remapping mean, and what are its benefits in the >current Xen VT-D architecture? It''s really not at all clear >what''s going on >from the current VT-D documentation. > >Since all interrupts get abstracted through Xen right now, if >it''s just an >interrupt-line remapping then that doesn''t seem very useful... > > -- Keir > >On 24/1/08 02:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: > >> Attached patch remaps interrupt for passthru device if such HW is >> detected on VT-d platforms. >> >> Signed-off-by: Allen Kay <allen.m.kay@intel.com> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Jan-25 07:39 UTC
Re: [Xen-devel] [VTD][PATCH] interrupt remapping patch for xen 3.3
Okay, that only made a little sense to me. The main problem I have with fiddling with io-apic entries is that they''re all actually under the management of dom0 kernel. -- Keir On 24/1/08 22:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote:> Interrupt remapping redirects ioapic/msi interrupt entries to interrupt > remap table. SID field in the Interrupt Remapping Table Entry qualifies > the interrupt with BDF information of the ioapic/MSI devices. > > Therefore the main value it adds for current Xen VT-d/PCI passthru is > that it protects hypervisor interrupts from malicious attacks from > guests with passthru devices. Other benefits it can provide is easier > IRQ rebalancing and extended APIC ID support. > > Allen > >> -----Original Message----- >> From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >> Sent: Thursday, January 24, 2008 12:14 AM >> To: Kay, Allen M; xen-devel@lists.xensource.com >> Cc: Han, Weidong >> Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >> patch for xen 3.3 >> >> What exactly does irq remapping mean, and what are its benefits in the >> current Xen VT-D architecture? It''s really not at all clear >> what''s going on >> from the current VT-D documentation. >> >> Since all interrupts get abstracted through Xen right now, if >> it''s just an >> interrupt-line remapping then that doesn''t seem very useful... >> >> -- Keir >> >> On 24/1/08 02:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: >> >>> Attached patch remaps interrupt for passthru device if such HW is >>> detected on VT-d platforms. >>> >>> Signed-off-by: Allen Kay <allen.m.kay@intel.com> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >> >> >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kay, Allen M
2008-Jan-26 08:09 UTC
RE: [Xen-devel] [VTD][PATCH] interrupt remapping patch for xen 3.3
Actually I have a patch that modifies low level macros io_apic_read()/io_apic_write() to call io_apic_read_remap_rte/io_apic_write_remap_rte() if vt-d is enabled. Since dom0 accesses io-apic hardware via these two macros, this should not cause conflicts. With these low level macros modified, the call to gsi_remapping() will no longer be needed. Let me know what you think about it. I can send you a refreshed patch. Allen>-----Original Message----- >From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >Sent: Thursday, January 24, 2008 11:39 PM >To: Kay, Allen M; xen-devel@lists.xensource.com >Cc: Han, Weidong >Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >patch for xen 3.3 > >Okay, that only made a little sense to me. The main problem I have with >fiddling with io-apic entries is that they''re all actually under the >management of dom0 kernel. > > -- Keir > >On 24/1/08 22:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: > >> Interrupt remapping redirects ioapic/msi interrupt entries >to interrupt >> remap table. SID field in the Interrupt Remapping Table >Entry qualifies >> the interrupt with BDF information of the ioapic/MSI devices. >> >> Therefore the main value it adds for current Xen VT-d/PCI passthru is >> that it protects hypervisor interrupts from malicious attacks from >> guests with passthru devices. Other benefits it can provide >is easier >> IRQ rebalancing and extended APIC ID support. >> >> Allen >> >>> -----Original Message----- >>> From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >>> Sent: Thursday, January 24, 2008 12:14 AM >>> To: Kay, Allen M; xen-devel@lists.xensource.com >>> Cc: Han, Weidong >>> Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >>> patch for xen 3.3 >>> >>> What exactly does irq remapping mean, and what are its >benefits in the >>> current Xen VT-D architecture? It''s really not at all clear >>> what''s going on >>> from the current VT-D documentation. >>> >>> Since all interrupts get abstracted through Xen right now, if >>> it''s just an >>> interrupt-line remapping then that doesn''t seem very useful... >>> >>> -- Keir >>> >>> On 24/1/08 02:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: >>> >>>> Attached patch remaps interrupt for passthru device if such HW is >>>> detected on VT-d platforms. >>>> >>>> Signed-off-by: Allen Kay <allen.m.kay@intel.com> >>>> _______________________________________________ >>>> Xen-devel mailing list >>>> Xen-devel@lists.xensource.com >>>> http://lists.xensource.com/xen-devel >>> >>> >>> > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
This second iteration of the patch does what was describe below: calls io_apic_read_remap_rte/io_apic_write_remap_rte in io_apic_read/io_apic_write if vtd=1. Gsi_remapping call has been removed. Signed-off-by: Allen Kay <allen.m.kay@intel.com>>-----Original Message----- >From: Kay, Allen M >Sent: Saturday, January 26, 2008 12:10 AM >To: ''Keir Fraser''; xen-devel@lists.xensource.com >Cc: Han, Weidong >Subject: RE: [Xen-devel] [VTD][PATCH] interrupt remapping >patch for xen 3.3 > >Actually I have a patch that modifies low level macros >io_apic_read()/io_apic_write() to call >io_apic_read_remap_rte/io_apic_write_remap_rte() if vt-d is enabled. > >Since dom0 accesses io-apic hardware via these two macros, >this should not cause conflicts. With these low level macros >modified, the call to gsi_remapping() will no longer be needed. > >Let me know what you think about it. I can send you a refreshed patch. > >Allen > >>-----Original Message----- >>From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >>Sent: Thursday, January 24, 2008 11:39 PM >>To: Kay, Allen M; xen-devel@lists.xensource.com >>Cc: Han, Weidong >>Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >>patch for xen 3.3 >> >>Okay, that only made a little sense to me. The main problem I >have with >>fiddling with io-apic entries is that they''re all actually under the >>management of dom0 kernel. >> >> -- Keir >> >>On 24/1/08 22:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: >> >>> Interrupt remapping redirects ioapic/msi interrupt entries >>to interrupt >>> remap table. SID field in the Interrupt Remapping Table >>Entry qualifies >>> the interrupt with BDF information of the ioapic/MSI devices. >>> >>> Therefore the main value it adds for current Xen VT-d/PCI >passthru is >>> that it protects hypervisor interrupts from malicious attacks from >>> guests with passthru devices. Other benefits it can provide >>is easier >>> IRQ rebalancing and extended APIC ID support. >>> >>> Allen >>> >>>> -----Original Message----- >>>> From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >>>> Sent: Thursday, January 24, 2008 12:14 AM >>>> To: Kay, Allen M; xen-devel@lists.xensource.com >>>> Cc: Han, Weidong >>>> Subject: Re: [Xen-devel] [VTD][PATCH] interrupt remapping >>>> patch for xen 3.3 >>>> >>>> What exactly does irq remapping mean, and what are its >>benefits in the >>>> current Xen VT-D architecture? It''s really not at all clear >>>> what''s going on >>>> from the current VT-D documentation. >>>> >>>> Since all interrupts get abstracted through Xen right now, if >>>> it''s just an >>>> interrupt-line remapping then that doesn''t seem very useful... >>>> >>>> -- Keir >>>> >>>> On 24/1/08 02:33, "Kay, Allen M" <allen.m.kay@intel.com> wrote: >>>> >>>>> Attached patch remaps interrupt for passthru device if such HW is >>>>> detected on VT-d platforms. >>>>> >>>>> Signed-off-by: Allen Kay <allen.m.kay@intel.com> >>>>> _______________________________________________ >>>>> Xen-devel mailing list >>>>> Xen-devel@lists.xensource.com >>>>> http://lists.xensource.com/xen-devel >>>> >>>> >>>> >> >> >> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel