All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] iommu/vt-d: Add domain_alloc_paging support
@ 2024-10-21  8:51 Lu Baolu
  2024-10-21  8:51 ` [PATCH v2 1/7] " Lu Baolu
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Lu Baolu @ 2024-10-21  8:51 UTC (permalink / raw)
  To: iommu
  Cc: Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
	Kevin Tian, Yi Liu, Vasant Hegde, linux-kernel, Lu Baolu

The Intel iommu driver will now use the domain_alloc_paging callback and
remove the legacy domain_alloc callback. This ensures that a valid
device pointer is provided whenever a paging domain is allocated, and
all dmar_domain attributes can be set up at the time of allocation.

Both first-stage and second-stage page tables can be used for a paging
domain. Unless IOMMU_HWPT_ALLOC_NEST_PARENT or
IOMMU_HWPT_ALLOC_DIRTY_TRACKING is specified during paging domain
allocation, this driver will try to use first-stage page tables if the
hardware is capable. This is assuming that the first-stage page table is
compatible with both the host and guest kernels.

The whole series is also available on GitHub:
https://github.com/LuBaolu/intel-iommu/commits/vtd-domain_alloc_paging-v2

Please help review and comment.

Change log:

v2:
 - Make prepare_domain_attach_device() a specific helper to check
   whether a paging domain is compatible with the iommu hardware
   capability.
 - Rename prepare_domain_attach_device() to paging_domain_compatible()
   to make it more meaningful.

v1: https://lore.kernel.org/linux-iommu/20241011042722.73930-1-baolu.lu@linux.intel.com/

Lu Baolu (7):
  iommu/vt-d: Add domain_alloc_paging support
  iommu/vt-d: Remove unused domain_alloc callback
  iommu/vt-d: Enhance compatibility check for paging domain attach
  iommu/vt-d: Remove domain_update_iommu_cap()
  iommu/vt-d: Remove domain_update_iommu_superpage()
  iommu/vt-d: Refactor first_level_by_default()
  iommu/vt-d: Refine intel_iommu_domain_alloc_user()

 drivers/iommu/intel/iommu.h  |   4 +-
 drivers/iommu/intel/iommu.c  | 328 +++++++----------------------------
 drivers/iommu/intel/nested.c |   2 +-
 drivers/iommu/intel/pasid.c  |  28 +--
 4 files changed, 64 insertions(+), 298 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-10-29  4:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21  8:51 [PATCH v2 0/7] iommu/vt-d: Add domain_alloc_paging support Lu Baolu
2024-10-21  8:51 ` [PATCH v2 1/7] " Lu Baolu
2024-10-21 12:44   ` Jason Gunthorpe
2024-10-21  8:51 ` [PATCH v2 2/7] iommu/vt-d: Remove unused domain_alloc callback Lu Baolu
2024-10-21  8:51 ` [PATCH v2 3/7] iommu/vt-d: Enhance compatibility check for paging domain attach Lu Baolu
2024-10-21 12:46   ` Jason Gunthorpe
2024-10-22  1:20     ` Baolu Lu
2024-10-21  8:51 ` [PATCH v2 4/7] iommu/vt-d: Remove domain_update_iommu_cap() Lu Baolu
2024-10-21  8:51 ` [PATCH v2 5/7] iommu/vt-d: Remove domain_update_iommu_superpage() Lu Baolu
2024-10-21  8:51 ` [PATCH v2 6/7] iommu/vt-d: Refactor first_level_by_default() Lu Baolu
2024-10-21  8:51 ` [PATCH v2 7/7] iommu/vt-d: Refine intel_iommu_domain_alloc_user() Lu Baolu
2024-10-29  4:38 ` [PATCH v2 0/7] iommu/vt-d: Add domain_alloc_paging support Baolu Lu

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.