[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yu9hHef3VawCbJT9@infradead.org>
Date: Sat, 6 Aug 2022 23:52:13 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Will Deacon <will@...nel.org>, mst@...hat.com, stefanha@...hat.com,
jasowang@...hat.com, ascull@...gle.com, maz@...nel.org,
keirf@...gle.com, jiyong@...gle.com, kernel-team@...roid.com,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
Stefano Garzarella <sgarzare@...hat.com>
Subject: Re: IOTLB support for vhost/vsock breaks crosvm on Android
On Fri, Aug 05, 2022 at 03:57:08PM -0700, Linus Torvalds wrote:
> Why is "IOMMU support" called "VIRTIO_F_ACCESS_PLATFORM"?
Because, as far as the virtio spec and virtio "guest" implementation is
concerned it is not about IOMMU support at all. It is about treating
virtio DMA as real DMA by the platform, which lets the platform let
whatever method of DMA mapping it needs to the virtio device. This
is needed to make sure harware virtio device are treated like actual
hardware and not like a magic thing bypassing the normal PCIe rules.
Using an IOMMU if one is present for bus is just one thing, others
are using offets of DMAs that are very common on non-x86 platforms,
or doing the horrible cache flushing needed on devices where PCIe
is not cache coherent.
It really is vhost that seems to abuse it so that if the guest
claims it can handle VIRTIO_F_ACCESS_PLATFORM (which every modern
guest should) it enables magic behavior, which I don't think is what
the virtio spec intended.
Powered by blists - more mailing lists