qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Jag Raman <jag.raman@oracle.com>
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
	Thanos Makatos <thanos.makatos@nutanix.com>,
	Felipe Franciosi <felipe@nutanix.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	John Johnson <john.g.johnson@oracle.com>
Subject: Re: libvfio-user library in QEMU
Date: Mon, 15 Feb 2021 10:54:07 +0000	[thread overview]
Message-ID: <20210215105407.GA87159@stefanha-x1.localdomain> (raw)
In-Reply-To: <AA81A6EE-4CF6-435E-9FB3-7A560CA4D491@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]

On Fri, Feb 12, 2021 at 12:08:11PM +0000, Jag Raman wrote:
> If we have to use libvfio-user library in QEMU, could we link the library with the QEMU binary based on some config options?

Yes, meson_options.txt can be used.

> Secondly, the remote process in multi-process QEMU uses the same QEMU binary for the remote process as well. Is this OK with libvfio-user, to start with? Or do you think a separate binary is preferred for the remote process?

For now the extra library dependency doesn't seem like a big problem.

The long term question is how to build with vfio-user device backends:

1. Single-device binaries. For example "make qemu-vfio-user-e1000" would
   build a vfio-user-e1000 binary from hw/net/e1000.c.

2. Multi-device binaries. For example "make qemu-vfio-user-backend"
   would build a vfio-user-backend binary with certain devices enabled.
   The set of devices could be specified via Kconfig or maybe on the
   command-line E1000=y VIRTIO_NET_PCI=y.

Build system support for this should minimize duplication with
monolithic QEMU's meson and Kconfig scripts.

It would also be great to avoid boilerplate. It should not be necessary
to write a lot of code to build a new device type as a vfio-user device
backend.

> From previous discussions, I recall that libvfio-user would be git submodule in QEMU repo. Is this still the preferred approach?

Yes, I haven't heard anything else since that discussion so I think the
plan is to use a git submodule.

Maybe later when the libvfio-user interface is stable and it's shipped
as a package by distributions the submodule will be replaced by a
traditional external library dependency.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2021-02-15 10:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 12:08 libvfio-user library in QEMU Jag Raman
2021-02-15 10:54 ` Stefan Hajnoczi [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=20210215105407.GA87159@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=felipe@nutanix.com \
    --cc=jag.raman@oracle.com \
    --cc=john.g.johnson@oracle.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thanos.makatos@nutanix.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).