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)
Sat, Dec 28, 3:19 AM
Unknown Object (File)
Fri, Dec 27, 12:32 AM
Unknown Object (File)
Tue, Dec 24, 11:48 PM
Unknown Object (File)
Sun, Dec 22, 9:36 PM
Unknown Object (File)
Nov 30 2024, 5:38 AM
Unknown Object (File)
Nov 26 2024, 10:02 AM
Unknown Object (File)
Nov 23 2024, 2:30 AM
Unknown Object (File)
Nov 21 2024, 12:40 PM
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

Lint
Lint Skipped
Unit
Tests Skipped

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.