[libvirt PATCH v2 0/5] Add support for vDPA block devices

see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch Jonathon Jongsma (5): conf: add ability to configure a vdpa block disk device qemu: add virtio-blk-vhost-vdpa capability qemu: make vdpa connect function more generic qemu: consider vdpa block devices for memlock limits qemu: Implement support for vDPA block devices docs/formatdomain.rst | 19 +++++++++- src/ch/ch_monitor.c | 1 + src/conf/domain_conf.c | 8 ++++ src/conf/schemas/domaincommon.rng | 13 +++++++ src/conf/storage_source_conf.c | 7 +++- src/conf/storage_source_conf.h | 2 + src/libxl/xen_xl.c | 1 + src/qemu/qemu_block.c | 20 ++++++++++ src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 24 +++++++++++- src/qemu/qemu_command.h | 1 + src/qemu/qemu_domain.c | 12 +++++- src/qemu/qemu_interface.c | 23 ------------ src/qemu/qemu_interface.h | 2 - src/qemu/qemu_migration.c | 2 + src/qemu/qemu_process.c | 34 +++++++++++++++++ src/qemu/qemu_snapshot.c | 4 ++ src/qemu/qemu_validate.c | 33 +++++++++++++++-- src/storage_file/storage_source.c | 1 + .../caps_8.1.0_x86_64.xml | 1 + tests/qemuhotplugmock.c | 4 +- .../disk-vhostvdpa.x86_64-latest.args | 37 +++++++++++++++++++ tests/qemuxml2argvdata/disk-vhostvdpa.xml | 21 +++++++++++ tests/qemuxml2argvmock.c | 2 +- tests/qemuxml2argvtest.c | 34 +++++++++++++++++ tests/testutilsqemu.c | 11 ++++++ tests/testutilsqemu.h | 2 + 28 files changed, 285 insertions(+), 37 deletions(-) create mode 100644 tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-vhostvdpa.xml -- 2.41.0

vDPA block devices can be configured as follows: <disk type='vhostvdpa'> <source dev='/dev/vhost-vdpa-0'/> </disk> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- docs/formatdomain.rst | 19 +++++++++++++++++-- src/ch/ch_monitor.c | 1 + src/conf/domain_conf.c | 8 ++++++++ src/conf/schemas/domaincommon.rng | 13 +++++++++++++ src/conf/storage_source_conf.c | 7 ++++++- src/conf/storage_source_conf.h | 2 ++ src/libxl/xen_xl.c | 1 + src/qemu/qemu_block.c | 6 ++++++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_migration.c | 2 ++ src/qemu/qemu_snapshot.c | 4 ++++ src/qemu/qemu_validate.c | 1 + src/storage_file/storage_source.c | 1 + 13 files changed, 63 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index bc469e5f9f..a65edc6703 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2678,6 +2678,11 @@ paravirtualized driver is specified via the ``disk`` element. </source> <target dev='vdf' bus='virtio'/> </disk> + <disk type='vhostvdpa' device='disk'> + <driver name='qemu' type='raw'/> + <source dev='/dev/vhost-vdpa-0' /> + <target dev='vdg' bus='virtio'/> + </disk> </devices> ... @@ -2688,8 +2693,9 @@ paravirtualized driver is specified via the ``disk`` element. ``type`` Valid values are "file", "block", "dir" ( :since:`since 0.7.5` ), "network" ( :since:`since 0.8.7` ), or "volume" ( :since:`since 1.0.5` ), - or "nvme" ( :since:`since 6.0.0` ), or "vhostuser" ( :since:`since 7.1.0` ) - and refer to the underlying source for the disk. :since:`Since 0.0.3` + or "nvme" ( :since:`since 6.0.0` ), or "vhostuser" ( :since:`since 7.1.0` ), + or "vhostvdpa" ( :since:`since 9.8.0 (QEMU 8.1.0)`) and refer to the + underlying source for the disk. :since:`Since 0.0.3` ``device`` Indicates how the disk is to be exposed to the guest OS. Possible values for this attribute are "floppy", "disk", "cdrom", and "lun", defaulting to @@ -2879,6 +2885,15 @@ paravirtualized driver is specified via the ``disk`` element. ``<disk>`` XML for this disk type. Additionally features such as blockjobs, incremental backups and snapshots are not supported for this disk type. + ``vhostvdpa`` + Enables the hypervisor to connect to a vDPA block device. Requires shared + memory configured for the VM, for more details see ``access`` mode for + ``memoryBacking`` element (See `Memory Backing`_). + + The ``source`` element has a mandatory attribute ``dev`` that specifies + the fully-qualified path to the vhost-vdpa character device (e.g. + ``/dev/vhost-vdpa-0``). + With "file", "block", and "volume", one or more optional sub-elements ``seclabel`` (See `Security label`_) can be used to override the domain security labeling policy for just that source file. diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 200ad6c77b..1691a4efb6 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@ -197,6 +197,7 @@ virCHMonitorBuildDiskJson(virJSONValue *disks, virDomainDiskDef *diskdef) case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_LAST: default: virReportEnumRangeError(virStorageType, diskdef->src->type); diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2c8727de54..1f14ef6f23 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7522,6 +7522,10 @@ virDomainStorageSourceParse(xmlNodePtr node, if (virDomainDiskSourceVHostUserParse(node, src, xmlopt, ctxt) < 0) return -1; break; + case VIR_STORAGE_TYPE_VHOST_VDPA: + if (!(src->vdpadev = virXMLPropStringRequired(node, "dev"))) + return -1; + break; case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, @@ -22386,6 +22390,10 @@ virDomainDiskSourceFormat(virBuffer *buf, virDomainDiskSourceVhostuserFormat(&attrBuf, &childBuf, src->vhostuser); break; + case VIR_STORAGE_TYPE_VHOST_VDPA: + virBufferEscapeString(&attrBuf, " dev='%s'", src->vdpadev); + break; + case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 2f9ba31c0a..1fe9ccb70e 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -1811,6 +1811,7 @@ <ref name="diskSourceVolume"/> <ref name="diskSourceNvme"/> <ref name="diskSourceVhostUser"/> + <ref name="diskSourceVhostVdpa"/> </choice> </define> @@ -2381,6 +2382,18 @@ </element> </define> + <define name="diskSourceVhostVdpa"> + <attribute name="type"> + <value>vhostvdpa</value> + </attribute> + <element name="source"> + <attribute name="dev"> + <ref name="absFilePath"/> + </attribute> + <empty/> + </element> + </define> + <define name="diskTargetDev"> <data type="string"> <param name="pattern">(ioemu:)?(fd|hd|sd|vd|xvd|ubd)[a-zA-Z0-9_]+</param> diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c index dcac3a8ff6..f57cb3241d 100644 --- a/src/conf/storage_source_conf.c +++ b/src/conf/storage_source_conf.c @@ -47,7 +47,8 @@ VIR_ENUM_IMPL(virStorage, "network", "volume", "nvme", - "vhostuser" + "vhostuser", + "vhostvdpa" ); @@ -834,6 +835,7 @@ virStorageSourceCopy(const virStorageSource *src, def->tlsCertdir = g_strdup(src->tlsCertdir); def->tlsHostname = g_strdup(src->tlsHostname); def->query = g_strdup(src->query); + def->vdpadev = g_strdup(src->vdpadev); if (src->sliceStorage) def->sliceStorage = virStorageSourceSliceCopy(src->sliceStorage); @@ -958,6 +960,7 @@ virStorageSourceIsSameLocation(virStorageSource *a, break; case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_FILE: case VIR_STORAGE_TYPE_BLOCK: @@ -1054,6 +1057,7 @@ virStorageSourceIsLocalStorage(const virStorageSource *src) * Therefore, we have to return false here. */ case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_LAST: case VIR_STORAGE_TYPE_NONE: return false; @@ -1246,6 +1250,7 @@ virStorageSourceIsRelative(virStorageSource *src) case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: return false; diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h index f13e7c756a..f99579bce2 100644 --- a/src/conf/storage_source_conf.h +++ b/src/conf/storage_source_conf.h @@ -43,6 +43,7 @@ typedef enum { VIR_STORAGE_TYPE_VOLUME, VIR_STORAGE_TYPE_NVME, VIR_STORAGE_TYPE_VHOST_USER, + VIR_STORAGE_TYPE_VHOST_VDPA, VIR_STORAGE_TYPE_LAST } virStorageType; @@ -299,6 +300,7 @@ struct _virStorageSource { char *configFile; /* some storage systems use config file as part of the source definition */ char *query; /* query string for HTTP based protocols */ + char *vdpadev; size_t nhosts; virStorageNetHostDef *hosts; size_t ncookies; diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index ab1941454d..f175359307 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -1525,6 +1525,7 @@ xenFormatXLDiskSrc(virStorageSource *src, char **srcstr) case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index dcdf883926..0b4c2dbcf4 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -873,6 +873,11 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src, return NULL; break; + case VIR_STORAGE_TYPE_VHOST_VDPA: + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("vhostvdpa disk type not yet supported")); + return NULL; + case VIR_STORAGE_TYPE_VHOST_USER: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unable to create blockdev props for vhostuser disk type")); @@ -2320,6 +2325,7 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSource *src, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: return 0; case VIR_STORAGE_TYPE_NONE: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a912ed064f..778958700b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1636,6 +1636,7 @@ qemuBuildDriveSourceStr(virDomainDiskDef *disk, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index b209e18dff..801b904a73 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -347,6 +347,7 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, case VIR_STORAGE_TYPE_DIR: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1618,6 +1619,7 @@ qemuMigrationSrcIsSafe(virDomainDef *def, break; case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_BLOCK: case VIR_STORAGE_TYPE_DIR: diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index ec853686d3..cdc8e12cff 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -446,6 +446,7 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, @@ -464,6 +465,7 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, @@ -507,6 +509,7 @@ qemuSnapshotPrepareDiskExternalActive(virDomainSnapshotDiskDef *snapdisk, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, @@ -668,6 +671,7 @@ qemuSnapshotPrepareDiskInternal(virDomainDiskDef *disk, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 1346bbfb44..165ab3a66a 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -607,6 +607,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported nvram disk type '%1$s'"), virStorageTypeToString(src->type)); diff --git a/src/storage_file/storage_source.c b/src/storage_file/storage_source.c index b97bbde619..2cfe3bc325 100644 --- a/src/storage_file/storage_source.c +++ b/src/storage_file/storage_source.c @@ -583,6 +583,7 @@ virStorageSourceUpdatePhysicalSize(virStorageSource *src, case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: + case VIR_STORAGE_TYPE_VHOST_VDPA: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: return -1; -- 2.41.0

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@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 87412dd4ec..3a1bfbf74d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -697,6 +697,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 450 */ "run-with.async-teardown", /* QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN */ + "virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA */ ); @@ -1531,6 +1532,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "blockdev-add/arg-type/+rbd/encrypt/format/^luks-any", QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY }, { "blockdev-add/arg-type/+nbd/tls-hostname", QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME }, { "blockdev-add/arg-type/+qcow2/discard-no-unref", QEMU_CAPS_QCOW2_DISCARD_NO_UNREF }, + { "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset", QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA}, { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY }, { "chardev-add/arg-type/backend/+socket/data/reconnect", QEMU_CAPS_CHARDEV_RECONNECT }, { "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e51d3fffdc..3c4f7f625b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -676,6 +676,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 450 */ QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN, /* asynchronous teardown -run-with async-teardown=on|off */ + QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA, /* virtio-blk-vhost-vdpa block driver */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml index 6f8c5a57b7..d266dd0f31 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -197,6 +197,7 @@ <flag name='rbd-encryption-luks-any'/> <flag name='qcow2-discard-no-unref'/> <flag name='run-with.async-teardown'/> + <flag name='virtio-blk-vhost-vdpa'/> <version>8001000</version> <microcodeVersion>43100245</microcodeVersion> <package>v8.1.0</package> -- 2.41.0

qemuInterfaceVDPAConnect() was a helper function for connecting to the vdpa device file. But in order to support other vdpa devices besides network interfaces (e.g. vdpa block devices) make this function a bit more generic. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_command.c | 23 ++++++++++++++++++++++- src/qemu/qemu_command.h | 1 + src/qemu/qemu_interface.c | 23 ----------------------- src/qemu/qemu_interface.h | 2 -- tests/qemuhotplugmock.c | 4 ++-- tests/qemuxml2argvmock.c | 2 +- 6 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 778958700b..e84374b4cf 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8533,7 +8533,7 @@ qemuBuildInterfaceConnect(virDomainObj *vm, break; case VIR_DOMAIN_NET_TYPE_VDPA: - if ((vdpafd = qemuInterfaceVDPAConnect(net)) < 0) + if ((vdpafd = qemuVDPAConnect(net->data.vdpa.devicepath)) < 0) return -1; netpriv->vdpafd = qemuFDPassNew(net->info.alias, priv); @@ -10993,3 +10993,24 @@ qemuBuildStorageSourceChainAttachPrepareBlockdevTop(virStorageSource *top, return g_steal_pointer(&data); } + + +/* qemuVDPAConnect: + * @devicepath: the path to the vdpa device + * + * returns: file descriptor of the vdpa device + */ +int +qemuVDPAConnect(const char *devicepath) +{ + int fd; + + if ((fd = open(devicepath, O_RDWR)) < 0) { + virReportSystemError(errno, + _("Unable to open '%1$s' for vdpa device"), + devicepath); + return -1; + } + + return fd; +} diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 55efa45601..341ec43f9a 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -248,3 +248,4 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev, const char * qemuAudioDriverTypeToString(virDomainAudioType type); virDomainAudioType qemuAudioDriverTypeFromString(const char *str); +int qemuVDPAConnect(const char *devicepath) G_NO_INLINE; diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index e875de48ee..8856bb95a8 100644 --- a/src/qemu/qemu_interface.c +++ b/src/qemu/qemu_interface.c @@ -648,29 +648,6 @@ qemuInterfaceBridgeConnect(virDomainDef *def, } -/* qemuInterfaceVDPAConnect: - * @net: pointer to the VM's interface description - * - * returns: file descriptor of the vdpa device - * - * Called *only* called if actualType is VIR_DOMAIN_NET_TYPE_VDPA - */ -int -qemuInterfaceVDPAConnect(virDomainNetDef *net) -{ - int fd; - - if ((fd = open(net->data.vdpa.devicepath, O_RDWR)) < 0) { - virReportSystemError(errno, - _("Unable to open '%1$s' for vdpa device"), - net->data.vdpa.devicepath); - return -1; - } - - return fd; -} - - /* * Returns: -1 on error, 0 on success. Populates net->privateData->slirp if * the slirp helper is needed. diff --git a/src/qemu/qemu_interface.h b/src/qemu/qemu_interface.h index d866beb184..6eed3e6bd7 100644 --- a/src/qemu/qemu_interface.h +++ b/src/qemu/qemu_interface.h @@ -55,5 +55,3 @@ int qemuInterfaceOpenVhostNet(virDomainObj *def, int qemuInterfacePrepareSlirp(virQEMUDriver *driver, virDomainNetDef *net); - -int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_NO_INLINE; diff --git a/tests/qemuhotplugmock.c b/tests/qemuhotplugmock.c index 89d287945a..dd7e2c67e0 100644 --- a/tests/qemuhotplugmock.c +++ b/tests/qemuhotplugmock.c @@ -18,8 +18,8 @@ #include <config.h> +#include "qemu/qemu_command.h" #include "qemu/qemu_hotplug.h" -#include "qemu/qemu_interface.h" #include "qemu/qemu_process.h" #include "testutilsqemu.h" #include "conf/domain_conf.h" @@ -94,7 +94,7 @@ qemuProcessKillManagedPRDaemon(virDomainObj *vm G_GNUC_UNUSED) } int -qemuInterfaceVDPAConnect(virDomainNetDef *net G_GNUC_UNUSED) +qemuVDPAConnect(const char *devicepath G_GNUC_UNUSED) { /* need a valid fd or sendmsg won't work. Just open /dev/null */ return open("/dev/null", O_RDONLY); diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 400dd5c020..52c44b2ed0 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -255,7 +255,7 @@ virNetDevBandwidthSetRootQDisc(const char *ifname G_GNUC_UNUSED, int -qemuInterfaceVDPAConnect(virDomainNetDef *net G_GNUC_UNUSED) +qemuVDPAConnect(const char *devicepath G_GNUC_UNUSED) { if (fcntl(1732, F_GETFD) != -1) abort(); -- 2.41.0

vDPA block devices will also need the same consideration for memlock limits as other vdpa devices, so consider these devices when calculating memlock limits. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_domain.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c7d64e1b5c..52ea8f649d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -9652,7 +9652,7 @@ qemuDomainGetNumNVMeDisks(const virDomainDef *def) static int -qemuDomainGetNumVDPANetDevices(const virDomainDef *def) +qemuDomainGetNumVDPADevices(const virDomainDef *def) { size_t i; int n = 0; @@ -9662,6 +9662,14 @@ qemuDomainGetNumVDPANetDevices(const virDomainDef *def) n++; } + for (i = 0; i < def->ndisks; i++) { + virStorageSource *src; + for (src = def->disks[i]->src; src; src = src->backingStore) { + if (src->type == VIR_STORAGE_TYPE_VHOST_VDPA) + n++; + } + } + return n; } @@ -9704,7 +9712,7 @@ qemuDomainGetMemLockLimitBytes(virDomainDef *def) nvfio = qemuDomainGetNumVFIOHostdevs(def); nnvme = qemuDomainGetNumNVMeDisks(def); - nvdpa = qemuDomainGetNumVDPANetDevices(def); + nvdpa = qemuDomainGetNumVDPADevices(def); /* For device passthrough using VFIO the guest memory and MMIO memory * regions need to be locked persistent in order to allow DMA. * -- 2.41.0

Requires recent qemu with support for the virtio-blk-vhost-vdpa device and the ability to pass a /dev/fdset/N path for the vdpa path (8.1.0) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1900770 Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- src/qemu/qemu_block.c | 20 ++++++++-- src/qemu/qemu_process.c | 34 +++++++++++++++++ src/qemu/qemu_validate.c | 32 ++++++++++++++-- .../disk-vhostvdpa.x86_64-latest.args | 37 +++++++++++++++++++ tests/qemuxml2argvdata/disk-vhostvdpa.xml | 21 +++++++++++ tests/qemuxml2argvtest.c | 34 +++++++++++++++++ tests/testutilsqemu.c | 11 ++++++ tests/testutilsqemu.h | 2 + 8 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-vhostvdpa.xml diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 0b4c2dbcf4..d31bbde0f4 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -778,6 +778,20 @@ qemuBlockStorageSourceGetNVMeProps(virStorageSource *src) } +static virJSONValue * +qemuBlockStorageSourceGetVhostVdpaProps(virStorageSource *src) +{ + virJSONValue *ret = NULL; + qemuDomainStorageSourcePrivate *srcpriv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src); + + ignore_value(virJSONValueObjectAdd(&ret, + "s:driver", "virtio-blk-vhost-vdpa", + "s:path", qemuFDPassGetPath(srcpriv->fdpass), + NULL)); + return ret; +} + + static int qemuBlockStorageSourceGetBlockdevGetCacheProps(virStorageSource *src, virJSONValue *props) @@ -874,9 +888,9 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src, break; case VIR_STORAGE_TYPE_VHOST_VDPA: - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("vhostvdpa disk type not yet supported")); - return NULL; + if (!(fileprops = qemuBlockStorageSourceGetVhostVdpaProps(src))) + return NULL; + break; case VIR_STORAGE_TYPE_VHOST_USER: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7a1cdb0302..42837c4a8a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6820,6 +6820,28 @@ qemuProcessPrepareLaunchSecurityGuestInput(virDomainObj *vm) } +static int +qemuProcessPrepareHostStorageSourceVDPA(virStorageSource *src, + qemuDomainObjPrivate *priv) +{ + qemuDomainStorageSourcePrivate *srcpriv = NULL; + virStorageType actualType = virStorageSourceGetActualType(src); + int vdpafd = -1; + + if (actualType != VIR_STORAGE_TYPE_VHOST_VDPA) + return 0; + + if ((vdpafd = qemuVDPAConnect(src->vdpadev)) < 0) + return -1; + + srcpriv = qemuDomainStorageSourcePrivateFetch(src); + + srcpriv->fdpass = qemuFDPassNew(src->nodestorage, priv); + qemuFDPassAddFD(srcpriv->fdpass, &vdpafd, "-vdpa"); + return 0; +} + + static int qemuProcessPrepareHostStorage(virQEMUDriver *driver, virDomainObj *vm, @@ -6856,6 +6878,18 @@ qemuProcessPrepareHostStorage(virQEMUDriver *driver, return -1; } + /* connect to any necessary vdpa block devices */ + for (i = vm->def->ndisks; i > 0; i--) { + size_t idx = i - 1; + virDomainDiskDef *disk = vm->def->disks[idx]; + virStorageSource *src; + + for (src = disk->src; virStorageSourceIsBacking(src); src = src->backingStore) { + if (qemuProcessPrepareHostStorageSourceVDPA(src, vm->privateData) < 0) + return -1; + } + } + return 0; } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 165ab3a66a..5bae56b00f 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3175,13 +3175,39 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, } if (disk->src->type == VIR_STORAGE_TYPE_VHOST_USER) { + const char *vhosttype = virStorageTypeToString(disk->src->type); + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_BLK)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("vhostuser disk is not supported with this QEMU binary")); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%1$s disk is not supported with this QEMU binary"), + vhosttype); + return -1; + } + + if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, vhosttype) < 0) + return -1; + } + + if (disk->src->type == VIR_STORAGE_TYPE_VHOST_VDPA) { + const char *vhosttype = virStorageTypeToString(disk->src->type); + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%1$s disk is not supported with this QEMU binary"), + vhosttype); return -1; } - if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "vhostuser") < 0) { + if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, vhosttype) < 0) + return -1; + + if (disk->cachemode != VIR_DOMAIN_DISK_CACHE_DIRECTSYNC && + disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("disk type '%1$s' requires cache mode '%2$s' or '%3$s'"), + virStorageTypeToString(disk->src->type), + virDomainDiskCacheTypeToString(VIR_DOMAIN_DISK_CACHE_DIRECTSYNC), + virDomainDiskCacheTypeToString(VIR_DOMAIN_DISK_CACHE_DISABLE)); return -1; } } diff --git a/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args b/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args new file mode 100644 index 0000000000..b987455ee4 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/pc.ram","share":true,"x-use-canonical-path-for-ramblock-id":false,"size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-add-fd set=0,fd=801,opaque=libvirt-1-storage-vdpa \ +-blockdev '{"driver":"virtio-blk-vhost-vdpa","path":"/dev/fdset/0","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1,"write-cache":"on"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-vhostvdpa.xml b/tests/qemuxml2argvdata/disk-vhostvdpa.xml new file mode 100644 index 0000000000..0ac3899a34 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-vhostvdpa.xml @@ -0,0 +1,21 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <memoryBacking> + <access mode='shared'/> + </memoryBacking> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + </os> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='vhostvdpa' device='disk'> + <driver name='qemu' type='raw' cache='none'/> + <source dev='/dev/vhost-vdpa-0'/> + <target dev='vda' bus='virtio'/> + </disk> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2d06e2a0d1..0dd10f1fab 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -304,6 +304,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDef *disk = vm->def->disks[i]; + virStorageSource *src; /* host cdrom requires special treatment in qemu, mock it */ if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM && @@ -311,6 +312,37 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, virStorageSourceIsBlockLocal(disk->src) && STREQ(disk->src->path, "/dev/cdrom")) disk->src->hostcdrom = true; + + if (info->args.vdpafds) { + for (src = disk->src; virStorageSourceIsBacking(src); src = src->backingStore) { + gpointer value; + + if (src->type != VIR_STORAGE_TYPE_VHOST_VDPA) + continue; + + if ((value = g_hash_table_lookup(info->args.vdpafds, src->vdpadev))) { + int fd = GPOINTER_TO_INT(value); + qemuDomainStorageSourcePrivate *srcpriv; + VIR_AUTOCLOSE fakefd = open("/dev/zero", O_RDWR); + + if (fcntl(fd, F_GETFD) != -1) { + fprintf(stderr, "fd '%d' is already in use\n", fd); + abort(); + } + + if (dup2(fakefd, fd) < 0) { + fprintf(stderr, "failed to duplicate fake fd: %s", + g_strerror(errno)); + abort(); + } + + srcpriv = qemuDomainStorageSourcePrivateFetch(src); + + srcpriv->fdpass = qemuFDPassNew(src->nodestorage, priv); + qemuFDPassAddFD(srcpriv->fdpass, &fd, "-vdpa"); + } + } + } } if (vm->def->vsock) { @@ -1129,6 +1161,8 @@ mymain(void) DO_TEST_CAPS_VER("disk-vhostuser-numa", "4.2.0"); DO_TEST_CAPS_LATEST("disk-vhostuser-numa"); DO_TEST_CAPS_LATEST("disk-vhostuser"); + DO_TEST_CAPS_ARCH_LATEST_FULL("disk-vhostvdpa", "x86_64", + ARG_VDPA_FD, "/dev/vhost-vdpa-0", 801); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-device-lun-type-invalid"); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-attaching-partition-nosupport"); DO_TEST_CAPS_LATEST("disk-usb-device"); diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index bb3e1b52c5..7f8bf4c01c 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -709,6 +709,17 @@ testQemuInfoSetArgs(struct testQemuInfo *info, break; } + case ARG_VDPA_FD: { + const char *vdpadev = va_arg(argptr, char *); + int vdpafd = va_arg(argptr, unsigned int); + + if (!info->args.vdpafds) + info->args.vdpafds = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + + g_hash_table_insert(info->args.vdpafds, g_strdup(vdpadev), GINT_TO_POINTER(vdpafd)); + break; + } + case ARG_END: default: info->args.invalidarg = true; diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 2d7e2f7779..8398627f71 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -49,6 +49,7 @@ typedef enum { ARG_CAPS_VARIANT, ARG_CAPS_HOST_CPU_MODEL, ARG_FD_GROUP, /* name, nfds, fd[0], ... fd[n-1] */ + ARG_VDPA_FD, /* vdpadev, fd */ ARG_END, } testQemuInfoArgName; @@ -85,6 +86,7 @@ struct testQemuArgs { qemuTestCPUDef capsHostCPUModel; int gic; GHashTable *fds; + GHashTable *vdpafds; bool invalidarg; }; -- 2.41.0

On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>

On 9/12/23 7:00 AM, Peter Krempa wrote:
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
I pushed this series, but for some reason only the ubuntu images are failing CI with no useful output: https://gitlab.com/libvirt/libvirt/-/pipelines/1001459836 I suspect it may be related to address sanitizer stuff, does anybody have tips on getting more information about this failure? Jonathon

On Tue, Sep 12, 2023 at 16:11:01 -0500, Jonathon Jongsma wrote:
On 9/12/23 7:00 AM, Peter Krempa wrote:
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
I pushed this series, but for some reason only the ubuntu images are failing CI with no useful output: https://gitlab.com/libvirt/libvirt/-/pipelines/1001459836
I suspect it may be related to address sanitizer stuff, does anybody have tips on getting more information about this failure?
Usually valgrind does a good job of finding everyhting the sanitizer complains about: $ valgrind --trace-children=yes --leak-check=full ./tests/qemuxml2argvtest [...] ==352693== 18 bytes in 1 blocks are definitely lost in loss record 257 of 684 ==352693== at 0x484182F: malloc (vg_replace_malloc.c:431) ==352693== by 0x51DA07F: xmlStrndup (in /usr/lib64/libxml2.so.2.10.4) ==352693== by 0x49D918E: virXMLPropStringRequired (virxml.c:321) ==352693== by 0x4A0D866: virDomainStorageSourceParse (domain_conf.c:7526) ==352693== by 0x4A0E9F0: virDomainDiskDefParseSourceXML (domain_conf.c:7926) ==352693== by 0x4A0ECCF: virDomainDiskDefParseXML (domain_conf.c:8000) ==352693== by 0x4A2DA93: virDomainDefParseXML (domain_conf.c:18767) ==352693== by 0x4A31678: virDomainDefParseNode (domain_conf.c:19557) ==352693== by 0x134000: testCompareXMLToArgv (qemuxml2argvtest.c:566) ==352693== by 0x1356B9: virTestRun (testutils.c:143) ==352693== by 0x135940: virTestRunLog (testutils.c:198) ==352693== by 0x11D422: mymain (qemuxml2argvtest.c:1164) Looks like the new field is not freed. I'll post the patch soon

On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote:
On 9/12/23 7:00 AM, Peter Krempa wrote:
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
I pushed this series, but for some reason only the ubuntu images are failing CI with no useful output: https://gitlab.com/libvirt/libvirt/-/pipelines/1001459836
This is a behavioural regression from the recent CI refactoring of Eriks'. We have lost the "--no-suite syntax-check --print-errorlogs" arguments when running tests. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, Sep 13, 2023 at 08:56:35AM +0100, Daniel P. Berrangé wrote:
On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote:
On 9/12/23 7:00 AM, Peter Krempa wrote:
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
I pushed this series, but for some reason only the ubuntu images are failing CI with no useful output: https://gitlab.com/libvirt/libvirt/-/pipelines/1001459836
This is a behavioural regression from the recent CI refactoring of Eriks'.
We have lost the "--no-suite syntax-check --print-errorlogs" arguments when running tests.
Sigh. I'm already running a pipeline with a fix that adds those test options back. Erik

On Wed, Sep 13, 2023 at 12:57:09PM +0200, Erik Skultety wrote:
On Wed, Sep 13, 2023 at 08:56:35AM +0100, Daniel P. Berrangé wrote:
On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote:
On 9/12/23 7:00 AM, Peter Krempa wrote:
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote:
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770.
Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the qemuDomainPrepareStorageSource() function. This also required some additional support in the tests for setting up the objects properly for testing. - rebased to latest master branch
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
I pushed this series, but for some reason only the ubuntu images are failing CI with no useful output: https://gitlab.com/libvirt/libvirt/-/pipelines/1001459836
This is a behavioural regression from the recent CI refactoring of Eriks'.
We have lost the "--no-suite syntax-check --print-errorlogs" arguments when running tests.
Sigh. I'm already running a pipeline with a fix that adds those test options back.
Erik
How about this one? https://listman.redhat.com/archives/libvir-list/2023-September/242071.html Pipeline: https://gitlab.com/eskultety/libvirt/-/pipelines/1002436800 Erik
participants (4)
-
Daniel P. Berrangé
-
Erik Skultety
-
Jonathon Jongsma
-
Peter Krempa