qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	"fam@euphon.net" <fam@euphon.net>,
	Martin Oliveira <Martin.Oliveira@eideticom.com>,
	"f4bug@amsat.org" <f4bug@amsat.org>,
	Stephen Bates <stephen@eideticom.com>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: EBUSY when using NVMe Block Driver with multiple devices in the same IOMMU group
Date: Thu, 25 Aug 2022 09:04:23 +0000	[thread overview]
Message-ID: <694c521e-c963-c037-5a38-4ec74267df46@nvidia.com> (raw)
In-Reply-To: <YwZdg/nExYoDNRR/@fedora>


> First, multiple QEMU instances cannot access nvme:// devices sharing the
> same IOMMU group. I don't think this will ever be possible because it
> opens a backdoor around process memory isolation.
> 
> However, a single QEMU (or qemu-storage-daemon) instance should be able
> to access multiple nvme:// devices in the same IOMMU group.
> Unfortunately the code currently doesn't support that.
> util/vfio-helpers.c:qemu_vfio_init_pci() has no logic for sharing
> groups/containers. Opening the group fails with EBUSY because the kernel
> only allows the file to be opened once at any given time.
> 
> It's possible to extend the util/vfio-helpers.c code to reuse VFIO
> groups (and share VFIO containers), but I'm not aware of anyone who is
> currently working on that.
> 
> Stefan

Thanks a lot for detailed explanation, it is really helpful.

-ck



      reply	other threads:[~2022-08-25 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 22:36 EBUSY when using NVMe Block Driver with multiple devices in the same IOMMU group Martin Oliveira
2022-08-24 16:17 ` Martin Oliveira
2022-08-24 17:18 ` Stefan Hajnoczi
2022-08-25  9:04   ` Chaitanya Kulkarni [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=694c521e-c963-c037-5a38-4ec74267df46@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=Martin.Oliveira@eideticom.com \
    --cc=alex.williamson@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=stephen@eideticom.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 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).