Page MenuHomeFreeBSD

vtblk: Bypass iommu on powerpc
ClosedPublic

Authored by cperciva on Dec 28 2022, 6:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 27, 8:51 PM
Unknown Object (File)
May 22 2024, 6:50 AM
Unknown Object (File)
May 19 2024, 9:50 AM
Unknown Object (File)
May 11 2024, 5:58 AM
Unknown Object (File)
May 4 2024, 7:27 PM
Unknown Object (File)
Apr 22 2024, 7:00 PM
Unknown Object (File)
Apr 12 2024, 9:33 AM
Unknown Object (File)
Apr 7 2024, 4:42 AM
Subscribers

Details

Summary

Virtio operates with physical addresses, while busdma is designed to
map these to produce bus addresses. On most supported platforms,
these two are interchangeable; on powerpc platforms, they are not.

When on powerpc, set an IOMMU of NULL, which causes the powerpc busdma
code to bypass the iommu mapping; this leaves us with the physical
buffer addresses which the virtio host expects to see.

Fixes: 782105f7c898 ("vtblk: Use busdma")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48899
Build 45788: arc lint + arc unit

Event Timeline

I verified the patch on powerpc64, powerpc64le and it fixes the issue completely. Also, powerpc 32 bit is fine with this patch.

Thank you @cperciva !

This revision is now accepted and ready to land.Jan 11 2023, 3:35 AM
This revision was automatically updated to reflect the committed changes.