On Thu, Jun 08, 2023 at 11:00:03 +0200, Peter Krempa wrote: > On Tue, Jun 06, 2023 at 16:11:01 -0500, Jonathon Jongsma wrote: > > Check whether the qemu binary supports the vdpa block driver. We can't > > rely simply on the existence of the virtio-blk-vhost-vdpa block driver > > since the first releases of qemu didn't support fd-passing for this > > driver. So we have to check for the 'fdset' feature on the driver > > object. This feature will be present in the qemu 8.1.0 release and was > > merged to qemu in commit 98b126f5. > > > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> > > --- > > src/qemu/qemu_capabilities.c | 2 ++ > > src/qemu/qemu_capabilities.h | 1 + > > 2 files changed, 3 insertions(+) > > > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > > index cf85d42198..11d5ecd622 100644 > > --- a/src/qemu/qemu_capabilities.c > > +++ b/src/qemu/qemu_capabilities.c > > @@ -693,6 +693,7 @@ VIR_ENUM_IMPL(virQEMUCaps, > > "virtio-gpu.blob", /* QEMU_CAPS_VIRTIO_GPU_BLOB */ > > "rbd-encryption-layering", /* QEMU_CAPS_RBD_ENCRYPTION_LAYERING */ > > "rbd-encryption-luks-any", /* QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY */ > > + "virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA */ > > ); > > > > > > @@ -1560,6 +1561,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { > > { "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX }, > > { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKED_REASONS }, > > { "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG }, > > + { "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset", QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA}, > > Please order this together with other 'blockdev-add' queries at the top > and add a space before }. > > Also, since I've updated capabilities now, this feature should be > detected with the 8.1 dump, so please regenerate the output as the flag > will be present now. Ah, actually the caps were generated with older libblkio which doesn't have the FD passing feature yet. I'll update and re-generate them.