All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH v2 0/3] x86/iommu: Drop IOMMU support when cx16 isn't supported
@ 2024-04-08 13:02 Teddy Astie
  2024-04-08 13:02 ` [XEN PATCH v2 1/3] VT-d: Disable IOMMU if " Teddy Astie
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Teddy Astie @ 2024-04-08 13:02 UTC (permalink / raw)
  To: xen-devel; +Cc: Teddy Astie, Jan Beulich, Andrew Cooper, Roger Pau Monné

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.

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

Teddy

Changed in v2:

 * Added cleanup no-cx16 code for x2APIC
 * Fixed commit and code formatting
 * Added missing Suggested-by note

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 code

 xen/arch/x86/apic.c                         |  6 ++
 xen/drivers/passthrough/amd/iommu_map.c     | 42 ++++------
 xen/drivers/passthrough/amd/pci_amd_iommu.c |  6 ++
 xen/drivers/passthrough/vtd/intremap.c      | 65 ++++-----------
 xen/drivers/passthrough/vtd/iommu.c         | 92 +++++++--------------
 xen/drivers/passthrough/vtd/vtd.h           |  5 +-
 6 files changed, 71 insertions(+), 145 deletions(-)

-- 
2.44.0



Teddy Astie | Vates XCP-ng Intern

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-12  9:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 13:02 [XEN PATCH v2 0/3] x86/iommu: Drop IOMMU support when cx16 isn't supported Teddy Astie
2024-04-08 13:02 ` [XEN PATCH v2 1/3] VT-d: Disable IOMMU if " Teddy Astie
2024-04-08 13:02 ` [XEN PATCH v2 2/3] AMD-Vi: " Teddy Astie
2024-04-08 13:02 ` [XEN PATCH v2 3/3] VT-d: Cleanup MAP_SINGLE_DEVICE and related code Teddy Astie
2024-04-11 20:05 ` [XEN PATCH v2 0/3] x86/iommu: Drop IOMMU support when cx16 isn't supported Andrew Cooper
2024-04-11 23:54   ` Marek Marczykowski-Górecki
2024-04-12  8:31   ` Teddy Astie
2024-04-12  9:39     ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.