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)
Nov 19 2024, 5:19 AM
Unknown Object (File)
Nov 19 2024, 4:08 AM
Unknown Object (File)
Nov 19 2024, 3:15 AM
Unknown Object (File)
Sep 28 2024, 11:28 PM
Unknown Object (File)
Sep 27 2024, 8:05 PM
Unknown Object (File)
Sep 27 2024, 5:45 PM
Unknown Object (File)
Sep 27 2024, 5:22 PM
Unknown Object (File)
Sep 27 2024, 5:21 PM
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 Not Applicable
Unit
Tests Not Applicable

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.