Re: [RFC PATCH 1/3] content: Add VIRTIO_F_SWIOTLB to negotiate use of SWIOTLB bounce buffers

From: Christoph Hellwig
Date: Fri Apr 04 2025 - 02:29:15 EST


On Thu, Apr 03, 2025 at 09:10:41AM +0100, David Woodhouse wrote:
> Thanks. I'll take a closer look at handling that. I think it's
> reasonable for the negotiation of the VIRTIO_F_SWIOTLB feature to be
> the thing that switches *all* addresses to be on-device, and the on-
> device buffer can't be accessed unless VIRTIO_F_SWIOTLB has been
> negotiated.
>
> Which neatly sidesteps the original thing I was trying to clarify
> anyway.

Switching all addressing does not sound like a good idea. The main
thing these indirect buffers are used for is as a staging points for
P2P DMA, in which case they often are only used for some transfers or
even parts of a transfer. At least for physical virtio devices P2P
is probably not far off with the current GPU craze, and I wouldn't
be surprised if people found uses for paravirt P2P as well.