WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen, vtd: Fix device check for devices behind PC

To: Jan Beulich <JBeulich@xxxxxxxx>, Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen, vtd: Fix device check for devices behind PCIe-to-PCI bridges
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Mon, 5 Sep 2011 15:56:13 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 05 Sep 2011 07:56:49 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+6JOeYcN8H7Y4ujFcV7x6aBgCWRKvAy1z1CNLRG+4Gg=; b=xSvcc5RTuQ0t6SdA0vP+TmZyA8x+QI0klMH/+nxYIh9es+gbb8HqMoQGJHfMEAML75 U4QsUVjaTvhT0RJJ6ko26/HYM1J1AUkehVddNmY/Fs+3qeqP0Mnmy859I/Mkf57mSX6u 8JczSdgoRY5aNhGdzQsBro1tGJmiDcLcWDfaU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E64D9720200007800054A8A@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <ede81b0552be5b4d1004.1314886804@elijah> <4E64D9720200007800054A8A@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

 -George

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