Re: [Xen-devel] [PATCH 2/3] VT-d: avoid PCI device lookup

2019-09-04 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Wednesday, September 4, 2019 9:28 PM > > The two uses of pci_get_pdev_by_domain() lack proper locking, but are > also only used to get hold of a NUMA node ID. Calculate and store the > node ID earlier on and remove the lookups (in lieu of fixi

Re: [Xen-devel] [PATCH 2/3] VT-d: avoid PCI device lookup

2019-09-04 Thread Jan Beulich
On 04.09.2019 17:45, Andrew Cooper wrote: > On 04/09/2019 14:27, Jan Beulich wrote: >> --- a/xen/drivers/passthrough/vtd/iommu.h >> +++ b/xen/drivers/passthrough/vtd/iommu.h >> @@ -530,6 +530,7 @@ struct intel_iommu { >> struct ir_ctrl ir_ctrl; >> struct iommu_flush flush; >> struct

Re: [Xen-devel] [PATCH 2/3] VT-d: avoid PCI device lookup

2019-09-04 Thread Andrew Cooper
On 04/09/2019 14:27, Jan Beulich wrote: > --- a/xen/drivers/passthrough/vtd/iommu.h > +++ b/xen/drivers/passthrough/vtd/iommu.h > @@ -530,6 +530,7 @@ struct intel_iommu { > struct ir_ctrl ir_ctrl; > struct iommu_flush flush; > struct acpi_drhd_unit *drhd; > +nodeid_t node; > };

[Xen-devel] [PATCH 2/3] VT-d: avoid PCI device lookup

2019-09-04 Thread Jan Beulich
The two uses of pci_get_pdev_by_domain() lack proper locking, but are also only used to get hold of a NUMA node ID. Calculate and store the node ID earlier on and remove the lookups (in lieu of fixing the locking). While doing this it became apparent that iommu_alloc()'s use of alloc_pgtable_maddr