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

[Xen-devel] RE: enable_ats_device() call site

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] RE: enable_ats_device() call site
From: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Date: Wed, 17 Aug 2011 16:27:36 -0700
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 17 Aug 2011 16:28:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E49647E0200007800051556@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: <4E49647E0200007800051556@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxbZ8J5TMecqDrDR/+tbKQ90mmD1AByVAlQ
Thread-topic: enable_ats_device() call site
> what is the reason for calling this from VT-d's domain_context_mapping()?
> I neither undertsand why this is VT-d specific, nor why it needs to be
> re-done with each device re-assignment.

The reason is FLR clears the ATS enabled bit so we need to re-enable it for 
every re-assignment.  The reason we don't need to do this for ACS might be ACS 
reside on the bridge, not in the PCI endpoint.  ATS on the other hand, resides 
in PCI endpoints.

> Alternatively - why do we need scan_pci_devices() at all? We're
> supposed to be getting the devices reported from Dom0 anyway

Looks like it is use for building bus2bridge[] which is used for figuring out 
upstream bridges which are needed when assigning non-PCIe devices.

Allen

-----Original Message-----
From: Jan Beulich [mailto:JBeulich@xxxxxxxxxx] 
Sent: Monday, August 15, 2011 9:25 AM
To: Kay, Allen M
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: enable_ats_device() call site

Allen,

what is the reason for calling this from VT-d's domain_context_mapping()?
I neither undertsand why this is VT-d specific, nor why it needs to be
re-done with each device re-assignment.

I'm asking because this depends on MMCFG availability, and hence the
initial call from pci_add_device() (in the context of scan_pci_devices())
to iommu_add_device() may not result in this getting enabled, while on
the first Dom0-invoked pci_add_device() pdev->domain is already set
and hence iommu_add_device() doesn't get called at all. I'd therefore
like to pull this out into pci_add_device() (and call it, together with
pci_enable_acs(), after the conditional around iommu_add_device() -
should be safe as I view both enabling functions as idempotent).

Alternatively - why do we need scan_pci_devices() at all? We're
supposed to be getting the devices reported from Dom0 anyway.

Jan


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

<Prev in Thread] Current Thread [Next in Thread>