Page MenuHomeFreeBSD

iommu_gas: Eliminate redundant parameters and push down lock acquisition
ClosedPublic

Authored by alc on Jul 29 2022, 5:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 18 2024, 9:14 PM
Unknown Object (File)
Oct 8 2024, 8:38 AM
Unknown Object (File)
Oct 7 2024, 11:15 PM
Unknown Object (File)
Oct 1 2024, 7:23 AM
Unknown Object (File)
Sep 29 2024, 2:18 AM
Unknown Object (File)
Sep 23 2024, 8:37 PM
Unknown Object (File)
Sep 8 2024, 5:41 AM
Unknown Object (File)
Aug 29 2024, 12:02 PM
Subscribers

Details

Summary

Since IOMMU map entries store a reference to the domain in which they reside, there is no need to pass the domain to iommu_gas_free_entry(), iommu_gas_free_space(), and iommu_gas_free_region().

Push down the acquisition and release of the IOMMU domain lock into iommu_gas_free_space() and iommu_gas_free_region().

Both of these changes allow for simplifications in the callers of the functions without really complicating the functions themselves. Moreover, the latter change eliminates the direct use of the IOMMU domain lock from the x86-specific DMAR code.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

alc requested review of this revision.Jul 29 2022, 5:50 PM
This revision is now accepted and ready to land.Jul 29 2022, 7:06 PM

Since callers to iommu_gas_map_region() provide the entry, assert that the entry was actually allocated for the domain in which the mapping is about to be created.

This revision now requires review to proceed.Jul 30 2022, 6:43 PM
This revision is now accepted and ready to land.Jul 30 2022, 7:04 PM