Page MenuHomeFreeBSD

iommu_gas: Perform a synchronous invalidation when not freeing the entry in dmar_qi_task()
ClosedPublic

Authored by alc on Jul 22 2022, 8:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 11:08 PM
Unknown Object (File)
Jan 27 2024, 1:49 PM
Unknown Object (File)
Jan 27 2024, 1:49 PM
Unknown Object (File)
Jan 14 2024, 10:27 AM
Unknown Object (File)
Dec 22 2023, 10:24 AM
Unknown Object (File)
Dec 20 2023, 5:46 AM
Unknown Object (File)
Dec 8 2023, 8:24 AM
Unknown Object (File)
Dec 8 2023, 1:19 AM
Subscribers

Details

Summary

Previously, when the caller to iommu_domain_unload_entry() passed the value "true" for the parameter "free", there was no guarantee that the invalidation was complete, in other words, dmar_qi_task() was done with the entry, before the caller finally freed the entry.

Diff Detail

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

Event Timeline

alc requested review of this revision.Jul 22 2022, 8:34 AM
alc created this revision.

I think we need to force entry through the qi. From the Intel® Virtualization Technology for Directed I/O Architecture Specification, Rev. 4.0, Order Number: D51397-015

6.5.1 Register-based Invalidation Interface

Register-based invalidation has the following limitations:
• Register-based invalidation can be used only when queued-invalidations are not enabled.

I remember that the requirement was there from the start.

In D35878#814735, @kib wrote:

I think we need to force entry through the qi. From the Intel® Virtualization Technology for Directed I/O Architecture Specification, Rev. 4.0, Order Number: D51397-015

6.5.1 Register-based Invalidation Interface

Register-based invalidation has the following limitations:
• Register-based invalidation can be used only when queued-invalidations are not enabled.

I remember that the requirement was there from the start.

I was afraid of that.

Redo using the queued invalidation mechanism.

This revision is now accepted and ready to land.Jul 24 2022, 2:11 PM

Fix arm64. I previously added the new parameter to the wrong function.

This revision now requires review to proceed.Jul 24 2022, 7:25 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 25 2022, 4:16 PM
This revision was automatically updated to reflect the committed changes.