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)
Sat, Feb 17, 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
Unknown Object (File)
Jul 6 2023, 1:04 PM
Unknown Object (File)
May 29 2023, 3:46 AM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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