kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Will Deacon <will@kernel.org>,
	mst@redhat.com, stefanha@redhat.com, jasowang@redhat.com,
	ascull@google.com, maz@kernel.org, keirf@google.com,
	jiyong@google.com, kernel-team@android.com,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: IOTLB support for vhost/vsock breaks crosvm on Android
Date: Sat, 6 Aug 2022 23:52:13 -0700	[thread overview]
Message-ID: <Yu9hHef3VawCbJT9@infradead.org> (raw)
In-Reply-To: <CAHk-=wip-Lju3ZdNwknS6ouyw+nKXeRSnhqVyNo8WSEdk-BfGw@mail.gmail.com>

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.

  parent reply	other threads:[~2022-08-07  6:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 18:11 IOTLB support for vhost/vsock breaks crosvm on Android Will Deacon
2022-08-05 22:57 ` Linus Torvalds
2022-08-06  8:17   ` Stefano Garzarella
2022-08-06  9:42   ` Will Deacon
2022-08-07  6:52   ` Christoph Hellwig [this message]
2022-08-07 13:35     ` Michael S. Tsirkin
2022-08-07 13:27   ` Michael S. Tsirkin
2022-08-06  7:48 ` Stefano Garzarella
2022-08-06  9:42   ` Will Deacon
2022-08-06 10:52     ` Stefan Hajnoczi
2022-08-06 10:52       ` Stefan Hajnoczi
2022-08-06 14:34       ` Will Deacon
2022-08-06 21:47         ` Stefan Hajnoczi
2022-08-06 10:52     ` Stefano Garzarella
2022-08-07 13:14 ` Michael S. Tsirkin
2022-08-08 10:18   ` Will Deacon
2022-08-08 12:45     ` Michael S. Tsirkin
2022-08-08 14:33       ` Stefan Hajnoczi
2022-08-09  3:16       ` Jason Wang
2022-08-17 13:48       ` Will Deacon
2022-08-17 17:05         ` Michael S. Tsirkin
2022-08-09  3:12   ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yu9hHef3VawCbJT9@infradead.org \
    --to=hch@infradead.org \
    --cc=ascull@google.com \
    --cc=jasowang@redhat.com \
    --cc=jiyong@google.com \
    --cc=keirf@google.com \
    --cc=kernel-team@android.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).