All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Eric Auger <eric.auger@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: why is iommu_platform set to off by default?
Date: Tue, 30 Nov 2021 18:44:01 -0500	[thread overview]
Message-ID: <20211130184126-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAFEAcA-Fb15x7hAe-g8hP8HL1xB14iGnYi5=ZJM=0G0_hbBjTw@mail.gmail.com>

On Tue, Nov 30, 2021 at 02:32:49PM +0000, Peter Maydell wrote:
> I've just spent a day or so trying to track down why PCI passthrough
> of a virtio-blk-pci device wasn't working. The problem turns out to be
> that by default virtio pci devices don't use the IOMMU, even when the
> machine model has created an IOMMU and arranged for the PCI bus to
> be underneath it. So when the L2 guest tries to program the virtio device,
> the virtio device treats the IPAs it writes as if they were PAs and
> of course the data structures it's looking for aren't there.

Because this is what legacy guests expect, and legacy configs are
much more common than nested.

> Why do we default this to 'off'? It seems pretty unhelpful not to
> honour the existence of the IOMMU, and the failure mode is pretty
> opaque (L2 guest just hangs)...
> 
> thanks
> -- PMM

This should be handled by VFIO in L1 really, it can check for a
device quirk and refuse binding if the feature bit
is disabled.


-- 
MST



      parent reply	other threads:[~2021-11-30 23:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 14:32 why is iommu_platform set to off by default? Peter Maydell
2021-11-30 16:38 ` Stefan Hajnoczi
2021-12-01  0:00   ` Michael S. Tsirkin
2021-11-30 23:44 ` Michael S. Tsirkin [this message]

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=20211130184126-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.