iommu: Add live update state preservation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest18 patches 24 repliesIn review
- v718 patches 12 repliesSuperseded
- v618 patches 38 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 18 patches | 27 replies | Superseded | |
| v4 | 18 patches | 26 replies | Superseded | |
| v3 | 18 patches | 19 replies | Superseded | |
| v2 | 16 patches | 65 replies | Superseded | |
| v1 | 14 patches | 94 replies | Superseded |
Changes in v8 from the cover letter
- Drop the dependency on the VFIO preservation series.
- Add "liveupdate: Export symbols needed by modules".
- Reserve the iommu group of a preserved device for live update with iommu_group_reserve_liveupdate().
- Force VT-d on if the previous kernel preserved any IOMMU state.
- Find the stage of the restored domain by reading the RID_PASID entry of the restored device.
- Drop the no-op restored device checks around ATS/PRI in VT-d probe and release.
- Keep the format specific features in the iommupt restore KUnit test.
- Add the missing kernel-docs.
- Update the selftest to preserve the device using a new iommufd selftest op instead of preserving the vfio cdev.
- Check all devices in a group when restoring a preserved device.
- Collect Reviewed-by tags.
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | liveupdate: Export symbols needed by moduleskernel/ | +2 | 1 reply | |
| 2/18 | iommu: Implement IOMMU Live update FLB callbacksMAINTAINERS drivers/ drivers/ +3 more | +481 | 5 replies | |
| 3/18 | iommu/pages: Add APIs to preserve/unpreserve/restore iommu pagesdrivers/ drivers/ | +135 | 0 replies | |
| 4/18 | iommupt: Implement preserve/unpreserve/restore callbacksdrivers/ drivers/ include/ | +218 | 3 replies | |
| 5/18 | iommu: Implement IOMMU domain preservationdrivers/ include/ include/ | +135 | 2 replies | |
| 6/18 | iommu: Implement device and IOMMU HW preservationdrivers/ drivers/ drivers/ +2 more | +343 | 4 replies | |
| 7/18 | iommu/vt-d: Implement device and iommu preserve/unpreserve opsMAINTAINERS drivers/ drivers/ +3 more | +303 | 0 replies | |
| 8/18 | iommu/vt-d: Clear unpreserved context entries during shutdowndrivers/ drivers/ drivers/ | +184 | 0 replies | |
| 9/18 | iommu: Add APIs to get iommu and device restored statedrivers/ include/ | +158 | 0 replies | |
| 10/18 | iommu/vt-d: Combine disable_dmar_iommu() and free_dmar_iommu()drivers/ | +10 | 0 replies | |
| 11/18 | iommu/vt-d: Restore IOMMU state and reclaimed domain idsdrivers/ drivers/ drivers/ | +226 | 4 replies | |
| 12/18 | iommu/vt-d: Preserve PASID table of preserved devicedrivers/ drivers/ drivers/ +2 more | +177 | 0 replies | |
| 13/18 | iommu: Restore and reattach preserved domains to devicesdrivers/ drivers/ include/ | +268 | 0 replies | |
| 14/18 | iommu/vt-d: Handle reattach of the restored domaindrivers/ drivers/ drivers/ | +224 | 2 replies | |
| 15/18 | iommufd: Implement ioctl to mark HWPT for preservationMAINTAINERS drivers/ drivers/ +3 more | +134 | 0 replies | |
| 16/18 | iommufd: Persist iommu hardware pagetables for live updateMAINTAINERS drivers/ drivers/ +3 more | +450 | 2 replies | |
| 17/18 | iommufd: Add APIs to preserve/unpreserve a vfio cdevdrivers/ drivers/ drivers/ +1 more | +210 | 1 reply | |
| 18/18 | iommufd/selftest: Add test to verify iommufd preservationdrivers/ drivers/ drivers/ +3 more | +359 | 0 replies |
Reviews trailers per patch
13 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Samiullah Khawaja | Pranjal Shrivastava | Lu Baolu | Ankit Soni |
|---|---|---|---|---|
| 1/18 | R-b | R-b | R-b | |
| 2/18 | R-b | R-b | ||
| 3/18 | R-b | R-b | R-b | |
| 4/18 | R-b | R-b | R-b | |
| 5/18 | R-b | R-b | R-b | |
| 6/18 | R-b | |||
| 7/18 | R-b | |||
| 8/18 | R-b | |||
| 9/18 | R-b | R-b | ||
| 10/18 | R-b | |||
| 11/18 | ||||
| 12/18 | R-b | |||
| 13/18 | ||||
| 14/18 | ||||
| 15/18 | R-b | R-b | ||
| 16/18 | ||||
| 17/18 | R-b | |||
| 18/18 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v8 00/18] iommu: Add live update state preservation
Hi,
This patch series introduces a mechanism for IOMMU state preservation across live update, including the Intel VT-d driver support implementation.
Please take a look at the following LWN article to learn about KHO and Live Update Orchestrator:
https://lwn.net/Articles/1033364/
This series is based on linux-next (next-20261120), which already has the PCI base device preservation series and the LUO internal API to get incoming/outgoing files.
The dependency on the VFIO cdev preservation series is removed in this version. The patch that triggered the preservation of the iommufd state of a vfio cdev is dropped, so this series can be applied and reviewed on its own and merged without the VFIO series. Once the VFIO series is ready, an extra patch glues it with the iommufd preservation. The series with the extra patches is available at the following Github location:
https://github.com/samikhawaja/linux/tree/iommu/phase1-v8-vfio
Also note that patch 01 is taken from the VFIO cdev preservation series. It exports the LUO file handler registration functions, which iommufd also needs as it can be built as a module. It will be dropped from this series once that patch is merged separately.
The kernel tree with all dependencies is uploaded to the following Github location:
https://github.com/samikhawaja/linux/tree/iommu/phase1-v8
The series is targeting IOMMU tree.
Overall Goals:
The goal of this effort is to preserve the IOMMU domains, managed by iommufd, attached to devices preserved through VFIO cdev. This allows DMA mappings and IOMMU context of a device assigned to a VM to be maintained across a kexec live update.
This is achieved by preserving IOMMU page tables using Generic Page Table support, IOMMU root table and the relevant context entries across live update.
The functionality in the previously sent RFC is split into two phases and this series implements the Phase 1. Phase 1 implements the following functionality:
- Foundational work in IOMMU core and VT-d driver to preserve and restore IOMMU translation units, IOMMU domains and devices across liveupdate kexec.
- The preservation is triggered by preserving vfio cdev FD and bound iommufd FD into a live update session.
- An HWPT (and backing IOMMU domain) is only preserved if it contains only file type DMA mappings. Also the memfd behind such a mapping must have been preserved already.
- During live update boot, the state of preserved Intel VT-d, IOMMU domain and devices is restored.
- The restored IOMMU domains are reattached to the preserved devices during early boot.
- The DMA ownership of restored devices is also claimed during live update boot. This means that any attempt to bind a non-vfio driver with them or binding a new iommufd with them will fail.
Architectural Overview:
The target architecture for IOMMU state preservation across a live update involves coordination between the Live Update Orchestrator, iommufd, and the IOMMU drivers.
The core design uses the Live Update Orchestrator's file descriptor preservation mechanism to preserve iommufd file descriptors. The user marks the iommufd HWPTs for preservation using a new ioctl added in this series. Once done, the preservation of iommufd inside an LUO session is triggered using LUO ioctls. During preservation, the LUO preserve callback for an iommufd walks through the HWPTs it manages to identify the ones that need to be preserved. Once identified, a new IOMMU core API is used to preserve the iommu domain. The IOMMU core uses Generic Page Table to preserve the page tables of these domains. The domains are then marked as preserved.
When the user triggers the preservation of a VFIO cdev that is attached to an iommufd that is preserved, the device attachment state of that VFIO cdev is also preserved using an API exported by iommufd. IOMMUFD fetches all the information that needs to be preserved and calls the IOMMU core API to preserve the device state. The IOMMU core also preserves state of IOMMU that is associated with this device.
The IOMMU core has LUO FLB registered with the iommufd LUO file handler so the preserved iommu domain and iommu hardware unit state is available during boot for early restore in the next kernel.
During boot the driver fetches the preserved state from the IOMMU core and restores the state of preserved IOMMUs. Later when IOMMU core goes through the devices and probes them, the iommu domains of preserved devices are restored and the preserved devices are attached to them. During attachment, the DMA ownership of these devices is also claimed.
Tested:
The iommufd_liveupdate_kexec_test selftest was used to verify the preservation logic. Since vfio cdev preservation is not part of this series, the test uses a new iommufd selftest op to trigger the device preservation. So the kernel needs CONFIG_IOMMUFD_TEST. It was tested using QEMU with virtual IOMMU (VT-d) support, in both legacy and scalable mode, with virtio pcie device bound to the vfio-pci driver. The next kernel was also booted with intel_iommu=off to verify that VT-d is forced on.
Also Tested on an Intel machine with DSA device bound to vfio-pci driver. Note that preservation is refused for devices where ATS is supported, so the machine must be booted with pci=noats.
Following steps were followed for verification,
- Bind the test device with vfio-pci driver
- Run test on the machine by running
./iommufd_liveupdate_kexec_test <vfio-cdev-path>
- Trigger Kexec.
- After reboot, bind the device with vfio-pci driver and run the test again.
./iommufd_liveupdate_kexec_test <vfio-cdev-path> -s 2
- Test verifies that the restored device cannot be bound to a new iommufd, that the iommufd cannot be retrieved, as the iommufd restore is not supported yet, and that the session cannot be finished.
Future and in progress work:
- Phase 2 with IOMMUFD restore to reclaim the preserved vfio cdev and restore the preserved HWPTs.
- Full support for PASID preservation, i.e. non-zero PASIDs.
- Nested IOMMU preservation.
- Extend support to other IOMMU architectures (e.g., AMD-Vi).
- DMA Alloc preservation support, buddy allocator only.
https://lore.kernel.org/all/[email protected]/
- Arm sMMUv3 preservation support
https://github.com/pran005/linux/tree/wip-arm-smmu-lu
Roadmap:
The doc below gives a break down of the overall work into Patch series needed to complete Liveupdate feature from IOMMU perspective:
https://docs.google.com/document/d/1enDn-uPE9U77U-xHEnzn6HHGKiePSAtMIP8EDU3NO0M
High-Level Sequence Flow:
The following diagrams illustrate the high-level interactions during the preservation phase. Note that function names in the diagram are kept abbreviated to save horizontal space.
Preserve:
The preserve callbacks of the iommufd and vfio file handlers run when userspace preserves the FDs into a live update session.
Userspace (VMM) | LUO Core | iommufd | IOMMU Core | IOMMU Driver
-----------------|----------|---------------|---------------|-------------
| | | |
MARK_HWPT | | | |
---------------------------> | |
| | Mark HWPT for | |
| | preservation | |
| | | |
PRESERVE | | | |
iommufd_fd | | | |
-----------------> | | |
| preserve | | |
|----------> | |
| | For each HWPT | |
| |--------------> |
| | | domain_presrv |
| | |-------------->
| | | | gpt(preserve)
| | |<--------------|
| |<--------------| |
|<---------| | |
| | | |
... | | | |
| | | |
PRESERVE, | | | |
vfio_cdev_fd | | | |
-----------------> | | |
| preserve | | |
|----------> | |
| | | |
| | iommu_preserv | |
| | _device() | |
| |--------------> |
| | | preserve |
| | | (iommu_hw) |
| | |-------------->
| | | | preserve(root)
| | |<--------------|
| | | |
| | | preserve |
| | | _device(dev) |
| | |-------------->
| | | | preserve(pasid)
| | |<--------------|
| |<--------------| |
|<---------| | |Restore:
After a live update, the preserved state is restored during boot.
Userspace (VMM) | LUO Core | iommufd | IOMMU Core | IOMMU Driver
-----------------|----------|---------------|---------------|-------------
| | | |
| | | | Restore
| | | | Root, DIDs
| | | |
| | | | Register
| | | probe devices |
| | | |
| | | restore |
| | | domain |
| | |-------------->
| | | | restore
| | | reattach |
| | | domain |
| | |-------------->
| | | |Looking forward to your feedback on this.
Changelog:
v8:
- Drop the dependency on the VFIO preservation series.
- Add "liveupdate: Export symbols needed by modules".
- Reserve the iommu group of a preserved device for live update with iommu_group_reserve_liveupdate().
- Force VT-d on if the previous kernel preserved any IOMMU state.
- Find the stage of the restored domain by reading the RID_PASID entry of the restored device.
- Drop the no-op restored device checks around ATS/PRI in VT-d probe and release.
- Keep the format specific features in the iommupt restore KUnit test.
- Add the missing kernel-docs.
- Update the selftest to preserve the device using a new iommufd selftest op instead of preserving the vfio cdev.
- Check all devices in a group when restoring a preserved device.
- Collect Reviewed-by tags.
v7:
- Rebased on top of iommu/next (v7.4-rc1), PCI preservation v10 and VFIO preservation v6.
- Use EXPORT_SYMBOL_GPL for all exported symbols.
- Replace iommu_group_is_singleton() with iommu_group_device_count().
- Check in iommu_preserve_device() that the domain is attached to the device, and drop the unused domain argument of iommu_unpreserve_device().
- Drop iommu_for_each_dev(). The VT-d driver now walks the PCI devices and the ACPI namespace device scope of the DMAR unit to clear the context entries of unpreserved devices during shutdown.
- Disable the invalidation queue and mask the fault and page request interrupts of preserved IOMMUs during shutdown.
- Rename iommu_get_preserved_data(), iommu_for_each_preserved_device() and iommu_init_device_preserved_data() to iommu_get_restored_state(), iommu_for_each_restored_device() and iommu_init_device_restored_data().
- Panic if the hardware translation state does not match.
- WARN if the restored domain ID does not match.
- Track preserved devices using idev->liveupdate_preserved.
- Collect Reviewed-by tags.
v6:
- Add size, features and reserved fields to the KHO ABI to manage compatibility.
- Use KHO block for preservation of KHO data structures.
- Drop "memfd: export memfd_get_seals()" and the memfd seal requirement as it is not reliable because memfd can still have holes punched after sealing.
- Split the disable_dmar_iommu()/free_dmar_iommu() merge into a separate patch.
- Move the PASID table preservation patch before the domain reattach patch.
- Move iommu_phys from the device attachment into iommu_device_ser.
- Rename vasz to max_vasz_lg2, and IOMMU_INVALID/IOMMU_INTEL to IOMMU_SER_TYPE_INVALID/IOMMU_SER_TYPE_INTEL.
- Check the FLB version in retrieve before restoring the serialized objects.
- Use _ser suffix consistently for serialized objects.
- Rework iommu_for_each_dev() to remove redundant arguments.
- Sanity check scalable mode changes across kexec.
- Use context_tables_bitmap as the source of truth during restore.
- Reuse reserve_domain_id() to reclaim the preserved domain IDs.
- Drop the IOMMU restored flag and panic if DRHD unit restore fails.
- Rename intel_iommu_restore_device() to intel_iommu_attach_restored_device(), and the domain reattach/detach helpers to domain_attach_restored_iommu()/domain_detach_restored_iommu().
- Drop the cache tag and IOPF setup for the restored domain.
- Rename nr_preserved_domains, nr_hwpts and nr_liveupdate_preserved to num_preserved_domains, num_hwpts and num_liveupdate_preserved.
- Update the selftest to use an unsealed memfd and verify that a hole-punched mapping is rejected.
v5:
- Rebased on top of PCI preservation v9 and VFIO preservation v5.
- Do not preserve devices that share iommu groups.
- Save the DMA owner (iommufd) token in the serialized device state.
- Use READ_ONCE/WRITE_ONCE for dev->iommu->device_ser.
- Refuse preservation of devices where ATS is supported. Also drop PRE disable as it depends on ATS.
- Drop the fallback stubs for the preserve/unpreserve ops.
- Clear the present bit and flush before clearing the context entry.
- Add comments on global invalidation and why the IOMMU lock is not needed during shutdown.
- Treat -ENODATA, -ENOENT and -EOPNOTSUPP as absent FLB during retrieve and fail only on other errors.
- Reclaim DID by first checking if the DID is already reclaimed by another preserved device.
- Handle release device by doing teardown and reattach of restored domain to restored devices.
- Validate the domain physical address, the restored domain identity and the IOMMU identity before reattaching.
v4:
- Add kdocs.
- Add 64BIT Kconfig dependency.
- Add FLB version into the serialized state.
- Replace bitfield in KHO state with u8 and padding.
- Add fallback stub for intel_iommu_unpreserve_device.
- Reject real DMA subdevices with -EOPNOTSUPP.
- Add VTD_PRESERVED_BITMAP_LONGS macro for context tables.
- Disable PRE in preserved context entries during shutdown.
- Unify DMAR free and disable into release_dmar_iommu.
- Move Intel IOMMU domain reattach logic into separate function and file.
- Rename intel_pasid_try_restore_table to intel_pasid_restore_table.
- Use __aligned_u64 for hwpt_token in UAPI struct.
- Reject PRI usage in HWPT preservation.
- Remove liveupdate_preserve bitfield from hwpt_paging.
- Convert liveupdate_preserved bitfield to bool.
- Replace group-level boolean with per-device flag and group refcount.
- Check device_array in pasid attachment before preserving.
- Collect reviews and acks.
v3:
- Add Reviewed-by tags.
- Export memfd_get_seals for iommufd module usage.
- Move iommu_flb_obj to liveupdate.c.
- Replace bitfields with u32 flags.
- Move callbacks from iommu_domain_ops to pt_iommu_ops.
- Fix DYNAMIC_TOP support by saving range.max_vasz_lg2.
- Replace BUG_ON with iommu_restore_pages helper.
- Update to use IOMMU_SER_FLAG_INCOMING and IOMMU_SER_FLAG_DELETED.
- Split out shutdown context-entry clearing logic into separate patch.
- Add context_tables_bitmap to track and preserve only active tables.
- Skip iommu_set_root_entry if restored.
- Fix array iteration bug by splitting macros.
- Move restore logic into caller instead of iommu_alloc_root_entry.
- Add robust IS_ERR checks for iommu_ser.
- Add safety checks for array traversal and domain physical address.
- Remove pasid_cleanup_preserved_table.
- Update handle_pd to dynamically iterate over valid PDE entries.
- Link liveupdate.o into iommufd.o to resolve modpost errors.
- Refactor liveupdate_immutable into nr_preserved_domains counter.
- Save actual number of preserved HWPTs to TOCTOU.
v2:
- Move IOMMU_LIVEUPDATE under IOMMU_SUPPORT dependencies.
- Update copyright year to 2026.
- Add Kernel-doc for FLB struct.
- Add an ASCII diagram for FLB memory layout.
- Change compatibility to iommu-liveupdate-v1.
- Rename structs to more reasonable names.
- Add comment explaining the rationale for BUG_ON during restoration.
- Rename 'did' to 'attachment_id'.
- Use phys_to_virt() and virt_to_phys() consistently.
- Create separate functions for FLB unpreserve and folio_put.
- Return the virtual address from the restore_array function.
- Free serialized state on finish without checking for NULL.
- Rename 'iommu-lu.h' to 'iommu-liveupdate.h'.
- Suffix max with _per_page (iommu_max_objs_per_page).
- Move unused helpers to the patches that actually need them.
- Rename reserve_obj_ser to alloc_object_ser.
- Only allow vfio drivers to use preserve_device APIs.
- Move ops declarations under CONFIG_IOMMU_LIVEUPDATE guards.
- Add lockdep_assert_held() validations in locked functions.
- Rename device_ser_match to match_device_ser.
- Create iommu_folio_update_stats(folio, nr_pages) helper.
- Explicitly set incoherent flag to false for restored pages.
- Do not use unpreserve_pages() function for error handling.
- Preserve vasz and sign_extend of a domain.
- Make the restored domain free-only.
- Ignore error of pt_descend() during restore as it should never fail (dead code).
- On domain restore, clear all features except the preserved.
- Add a KUnit test to verify that a restored domain can be freed with zeroed features.
- Bypass paging_domain_compatible() checks for restored domains.
- Use an explicit if-check for preserved state to clear the context entries.
- Rename clean_context to clear_unpreserved_context_entries.
- Use "DMAR:" in pr_fmt instead of "iommu:".
- Pass ROOT_ENTRY_NR directly into unpreserve functions.
- Remove IOMMU lock during preserve as not needed.
- Iterate all devices when clearing context entries instead of just PCIe devices.
- Do not populate empty unpreserve_device callbacks if not needed.
- Rename unpreserve_iommu_context to unpreserve_iommu_context_table.
- Check the associated IOMMU in _restore_used_domain_id.
- Add a comment that MMIO base is used as token for identifying IOMMU.
- Add a comment in _restore_used_domain_ids that IDA allocation can safely fail.
- Mark IOMMU state restored after restoring to prevent double restoration and UAF.
- Fix domain leak in iommu_restore_domain error path.
- Check DID start range before allocation.
- Add lockdep_assert_held in group domain restoration path.
- Add WARN_ON to catch unexpected group ownership during device probe.
- Add comment explaining group ownership setup and reclaim during device probe.
- Cleanup the full PASID directory instead of only 4K.
- Rename ioctl to IOMMU_HWPT_LIVEUPDATE_MARK_PRESERVE.
- Use XArray to save the HWPT liveupdate marks.
- Add the ioctl struct to ucmd_buffer.
- Make the ioctl 64-bit aligned (struct padding).
- Add UAPI documentation stating that HWPTs cannot be unmarked.
- Add UAPI documentation stating that only file-based mappings are allowed.
- Rename structs to use "liveupdate" instead of "lu".
- Rework HWPT preservation to prevent TOCTOU and mutex lock inside XA spin lock.
- Check preserved pages at the IOPT level, not the HWPT level.
- Return -EOPNOTSUPP if there are PASID attachments.
- Do not allow detach (or attach) once the device is preserved.
- Add MODULE_IMPORT_NS("IOMMUFD") in vfio_pci_liveupdate.c.
- Make token u64.
- Modify selftest to use live update kexec_test pattern.
- Use helper macros in test instead of repeating ksft_assert
- Rename setup_cdev to open_cdev.
- Define constants (tokens) as u64 to avoid ABI warnings.
v7: https://lore.kernel.org/all/[email protected]/
v6: https://lore.kernel.org/all/[email protected]/
v5: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/kvm/[email protected]/
v3: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
rfcv2: https://lore.kernel.org/all/[email protected]/
rfcv1: https://lore.kernel.org/all/[email protected]/
Samiullah Khawaja (15):
iommu: Implement IOMMU Live update FLB callbacks iommu/pages: Add APIs to preserve/unpreserve/restore iommu pages
iommupt: Implement preserve/unpreserve/restore callbacks
iommu: Implement IOMMU domain preservation
iommu: Implement device and IOMMU HW preservation iommu/vt-d: Implement device and iommu preserve/unpreserve ops iommu/vt-d: Clear unpreserved context entries during shutdown
iommu: Add APIs to get iommu and device restored state iommu/vt-d: Combine disable_dmar_iommu() and free_dmar_iommu() iommu/vt-d: Restore IOMMU state and reclaimed domain ids iommu/vt-d: Preserve PASID table of preserved device
iommu: Restore and reattach preserved domains to devices iommu/vt-d: Handle reattach of the restored domain
iommufd: Add APIs to preserve/unpreserve a vfio cdev iommufd/selftest: Add test to verify iommufd preservation
Vipin Sharma (1):
liveupdate: Export symbols needed by modules
YiFei Zhu (2):
iommufd: Implement ioctl to mark HWPT for preservation
iommufd: Persist iommu hardware pagetables for live update
MAINTAINERS | 19 + drivers/iommu/Kconfig | 12 + drivers/iommu/Makefile | 1 + drivers/iommu/generic_pt/iommu_pt.h | 155 ++++ drivers/iommu/generic_pt/kunit_iommu_pt.h | 33 + drivers/iommu/intel/Makefile | 1 + drivers/iommu/intel/iommu.c | 179 +++- drivers/iommu/intel/iommu.h | 52 ++ drivers/iommu/intel/liveupdate.c | 855 ++++++++++++++++++ drivers/iommu/intel/pasid.c | 10 +- drivers/iommu/intel/pasid.h | 8 + drivers/iommu/iommu-pages.c | 109 ++- drivers/iommu/iommu-pages.h | 30 + drivers/iommu/iommu-priv.h | 3 + drivers/iommu/iommu.c | 204 ++++- drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/device.c | 169 ++++ drivers/iommu/iommufd/io_pagetable.c | 24 + drivers/iommu/iommufd/iommufd_private.h | 37 + drivers/iommu/iommufd/iommufd_test.h | 1 + drivers/iommu/iommufd/liveupdate.c | 445 +++++++++ drivers/iommu/iommufd/main.c | 19 +- drivers/iommu/iommufd/selftest.c | 29 + drivers/iommu/liveupdate.c | 739 +++++++++++++++ include/linux/generic_pt/iommu.h | 30 + include/linux/iommu-liveupdate.h | 198 ++++ include/linux/iommu.h | 26 + include/linux/iommufd.h | 27 + include/linux/kho/abi/iommu.h | 238 +++++ include/linux/kho/abi/iommufd.h | 56 ++ include/uapi/linux/iommufd.h | 31 + kernel/liveupdate/luo_file.c | 2 + tools/testing/selftests/iommu/Makefile | 21 + .../iommu/iommufd_liveupdate_kexec_test.c | 276 ++++++ 34 files changed, 3987 insertions(+), 53 deletions(-) create mode 100644 drivers/iommu/intel/liveupdate.c create mode 100644 drivers/iommu/iommufd/liveupdate.c create mode 100644 drivers/iommu/liveupdate.c create mode 100644 include/linux/iommu-liveupdate.h create mode 100644 include/linux/kho/abi/iommu.h create mode 100644 include/linux/kho/abi/iommufd.h create mode 100644 tools/testing/selftests/iommu/iommufd_liveupdate_kexec_test.c
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
Signature · 1 line
2.56.1.809.ga0b61035b5-goog