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

Re: [Xen-devel] [PATCH v5 6/6] amd/iommu: skip bridge devices when updating IOMMU page tables

>>> On 21.11.18 at 00:26, <Brian.Woods@xxxxxxx> wrote:
> The original commit 0af438757d455f8eb6b5a6ae9a990ae245f230fd
> The commit that adds is_hardware_domain (and rearrange things)
> 7c275549f46c5c46611592f7107c1345e93ed457
> The orginal commit used the function like
> setup_dom0_pci_devices(d, amd_iommu_setup_dom0_device);
> which was because IOMMU needed to skip the host bridge devices on dom0.
> So I assume you added the is_hardware_domain because it only needed to
> be done on dom0.  I'm not familiar with the IOMMU/PCI history wrt to
> what it mapped/passed through so.

Well, I added it presumably to retain original semantics. I still
think that the extra check would better be dropped there, not
the least to also cover the case of devices eventually getting
assigned to dom_xen.

Looking at this another time I find some other questionable
aspect though (both to pre-existing code and to the change
made here): "host bridge" != "bridge". The title here as much
as the comment next to the original piece of code both
suggest the wider general category is meant, but the code
cloned checks for host bridges only. In
amd_iommu_add_device() the check is used solely to emit a
less scary log message, but the change here goes beyond


Xen-devel mailing list



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