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)
Mon, Nov 11, 4:33 PM
Unknown Object (File)
Sun, Nov 10, 4:44 PM
Unknown Object (File)
Thu, Nov 7, 6:19 AM
Unknown Object (File)
Tue, Nov 5, 2:54 PM
Unknown Object (File)
Thu, Oct 17, 6:15 PM
Unknown Object (File)
Wed, Oct 16, 2:17 PM
Unknown Object (File)
Oct 14 2024, 8:39 PM
Unknown Object (File)
Oct 14 2024, 2:15 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

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.