[XEN PATCH 0/3] x86/iommu: Drop IOMMU support when cpu doesn't support cx16.

Teddy Astie posted 3 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1711016106.git.teddy.astie@vates.tech
xen/drivers/passthrough/amd/iommu_map.c     | 43 ++++------
xen/drivers/passthrough/amd/pci_amd_iommu.c |  6 ++
xen/drivers/passthrough/vtd/intremap.c      | 67 ++++-----------
xen/drivers/passthrough/vtd/iommu.c         | 92 +++++++--------------
xen/drivers/passthrough/vtd/vtd.h           |  5 +-
5 files changed, 67 insertions(+), 146 deletions(-)
[XEN PATCH 0/3] x86/iommu: Drop IOMMU support when cpu doesn't support cx16.
Posted by Teddy Astie 1 month, 1 week ago
All hardware that supports VT-d/AMD-Vi that exists also supports cx16 (aside specifically crafted virtual machines).

Some IOMMU code paths in Xen consider cases where VT-d/AMD-Vi is supported while cx16 isn't, those paths may be bugged and are barely tested, dead code in practice.

Consider disabling IOMMU in case we have IOMMU hardware but no cx16, then cleanup no-cx16 handling logic from VT-d and AMD-Vi drivers.

Teddy Astie (3):
  VT-d: Disable IOMMU if cx16 isn't supported
  AMD-Vi: Disable IOMMU if cx16 isn't supported
  VT-d: Cleanup MAP_SINGLE_DEVICE and related dead code.

 xen/drivers/passthrough/amd/iommu_map.c     | 43 ++++------
 xen/drivers/passthrough/amd/pci_amd_iommu.c |  6 ++
 xen/drivers/passthrough/vtd/intremap.c      | 67 ++++-----------
 xen/drivers/passthrough/vtd/iommu.c         | 92 +++++++--------------
 xen/drivers/passthrough/vtd/vtd.h           |  5 +-
 5 files changed, 67 insertions(+), 146 deletions(-)

-- 
2.44.0



Teddy Astie | Vates XCP-ng Intern

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech