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
F100007745: D35878.diff
Mon, Oct 14, 2:15 AM
Unknown Object (File)
Sun, Oct 13, 9:09 AM
Unknown Object (File)
Sun, Oct 13, 9:09 AM
Unknown Object (File)
Sun, Oct 13, 5:21 AM
Unknown Object (File)
Fri, Oct 11, 4:23 PM
Unknown Object (File)
Thu, Oct 10, 4:12 AM
Unknown Object (File)
Wed, Oct 9, 6:00 AM
Unknown Object (File)
Sun, Oct 6, 3:11 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.