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

From: David Woodhouse
Date: Wed Apr 02 2025 - 12:16:46 EST


On Wed, 2025-04-02 at 11:51 -0400, Michael S. Tsirkin wrote:
> On Wed, Apr 02, 2025 at 04:47:18PM +0100, David Woodhouse wrote:
> > On Wed, 2025-04-02 at 11:20 -0400, Michael S. Tsirkin wrote:
> > > On Wed, Apr 02, 2025 at 04:12:39PM +0100, David Woodhouse wrote:
> > > > On Wed, 2025-04-02 at 10:54 -0400, Michael S. Tsirkin wrote:
> > > > > > +  If a the device transport provides a software IOTLB bounce buffer,
> > > > > > +  addresses within its range are not subject to the requirements of
> > > > > > +  VIRTIO_F_ACCESS_PLATFORM as they are considered to be ``on-device''

...

> The text you wrote makes it seem that even if the platform says use
> an IOMMU, it should be bypassed.

It was trying just to state the obvious, that addresses within the
range of the *on-device* memory buffer are not handled by the IOMMU.

> I would drop this text, and maybe add some clarification in the mmio transport,
> as needed.

It would be PCI too. I guess we could move the "obvious" comment that
'addresses within the range of the SWIOTLB bounce buffer region are
considered to be "on-device" and are thus not affected by the
requirements of VIRTIO_F_ACCESS_PLATFORM' into *both* the MMIO and PCI
transport docs? But then it's basically just saying the same thing in
two different locations?

I don't think we're debating what the actual implementations should
*do* ... are we? To me it's obvious that what I'm trying to say here
*should* always be true.

We're just debating the wording and where to put it, yes?

Attachment: smime.p7s
Description: S/MIME cryptographic signature