[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libvfio-user library in QEMU
From: |
Stefan Hajnoczi |
Subject: |
Re: libvfio-user library in QEMU |
Date: |
Mon, 15 Feb 2021 10:54:07 +0000 |
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
signature.asc
Description: PGP signature