qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* libvfio-user library in QEMU
@ 2021-02-12 12:08 Jag Raman
  2021-02-15 10:54 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Jag Raman @ 2021-02-12 12:08 UTC (permalink / raw)
  To: Stefan Hajnoczi, Thanos Makatos
  Cc: Elena Ufimtseva, John Johnson, QEMU Developers, Felipe Franciosi

Hi Stefan,

If we have to use libvfio-user library in QEMU, could we link the library with the QEMU binary based on some config options?

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?

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

Thank you very much!
—
Jag

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libvfio-user library in QEMU
  2021-02-12 12:08 libvfio-user library in QEMU Jag Raman
@ 2021-02-15 10:54 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2021-02-15 10:54 UTC (permalink / raw)
  To: Jag Raman
  Cc: Elena Ufimtseva, Thanos Makatos, Felipe Franciosi,
	QEMU Developers, John Johnson

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-15 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 12:08 libvfio-user library in QEMU Jag Raman
2021-02-15 10:54 ` Stefan Hajnoczi

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).