[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen, vtd: Fix device check for devices behind PCIe-to-PCI bridges



>>> On 05.09.11 at 16:56, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:
> On Mon, Sep 5, 2011 at 1:15 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 01.09.11 at 16:20, George Dunlap <george.dunlap@xxxxxxxxxxxxx> wrote:
>>> On some systems, requests devices behind a PCIe-to-PCI bridge all
>>> appear to the IOMMU as though they come from from slot 0, function
>>> 0 on that device; so the mapping code much punch a hole for X:0.0
>>> in the IOMMU for such devices.  When punching the hole, if that device
>>> has already been mapped once, we simply need to check ownership to
>>> make sure it's legal.  To do so, domain_context_mapping_one() will look
>>> up the device for the mapping with pci_get_pdev() and look for the owner.
>>>
>>> However, if there is no device in X:0.0, this look up will fail.
>>
>> Was it really that there was no device at all at X:0.0, or rather that
>> Xen just didn't know about the device (because Dom0 failed to notify
>> Xen, as could happen in the 2.6.18-derived trees up to pretty
>> recently)?
> 
> Don't know for sure; this was a partner that turned this up through
> our beta-test program.  But IIRC, running "lspci" in dom0 reported
> nothing under X:0.0  (although I may well be remembering incorrectly).
> 
> This was for XenServer 6.0 which is using Novell's Xen-ified 2.6.32 kernel.
> 
>> Also, didn't we sort of agree that creating a phantom device would
>> be more elegant (or at least much smaller a change)?
> 
> I don't remember talking about that, but perhaps. :-)
> 
> In reality, I don't know the code well enough to whip up a patch
> (like, where / how would I make such a device), and this is not that
> much of a priority for me.  If this patch isn't accepted, it will
> probably fall to you or Keir (or some other sufficiently motivated
> party) to fix it.

Understood. I'd be curious of Allen's thoughts here, as he would be
the most knowledgeable one in this area.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.