Skip to content
Commit f7f6634d authored by Robin Murphy's avatar Robin Murphy Committed by Michael S. Tsirkin
Browse files

virtio_mmio: Set DMA masks appropriately



Once DMA API usage is enabled, it becomes apparent that virtio-mmio is
inadvertently relying on the default 32-bit DMA mask, which leads to
problems like rapidly exhausting SWIOTLB bounce buffers.

Ensure that we set the appropriate 64-bit DMA mask whenever possible,
with the coherent mask suitably limited for the legacy vring as per
a0be1db4 ("virtio_pci: Limit DMA mask to 44 bits for legacy virtio
devices").

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reported-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fixes: b4211138 ("virtio_mmio: Use the DMA API if enabled")
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 0516ffd8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment