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)
Wed, Apr 17, 8:21 PM
Unknown Object (File)
Mar 15 2024, 10:54 AM
Unknown Object (File)
Feb 17 2024, 3:56 PM
Unknown Object (File)
Dec 23 2023, 12:36 AM
Unknown Object (File)
Dec 23 2023, 12:36 AM
Unknown Object (File)
Dec 1 2023, 3:28 AM
Unknown Object (File)
Oct 26 2023, 4:06 PM
Unknown Object (File)
Sep 5 2023, 4:22 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