libvirt-11.10.0-10.3.el10nv
- qemu_hotplug: Fix crash when attaching network inteface with hostdev network (VOYAGER-227) - qemu_command: Update cmdqv to the latest qemu-kvm changes (VOYAGER-296) Resolves: VOYAGER-227, VOYAGER-296
This commit is contained in:
parent
c3a2f6f18b
commit
e251f7f87c
@ -0,0 +1,51 @@
|
||||
From bbb78985cf3d7891578f6bfef8e5c2d65cb3868f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <bbb78985cf3d7891578f6bfef8e5c2d65cb3868f.1773230519.git.phrdina@redhat.com>
|
||||
From: Pavel Hrdina <phrdina@redhat.com>
|
||||
Date: Fri, 6 Mar 2026 09:19:30 +0100
|
||||
Subject: [PATCH] qemu_command: Update cmdqv to the latest qemu-kvm changes
|
||||
|
||||
From: Pavel Hrdina <phrdina@redhat.com>
|
||||
|
||||
The property was renamed and the type was changed from boolean to
|
||||
string in order to accept `auto` as valid value.
|
||||
|
||||
With the change to on/off/auto we need to use qemuOnOffAuto().
|
||||
|
||||
Resolves: https://issues.redhat.com/browse/VOYAGER-296
|
||||
|
||||
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_command.c | 2 +-
|
||||
.../iommu-smmuv3-pci-bus-accel-cmdqv.aarch64-latest.args | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||
index fdc79e18be..d419e92cdf 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -6325,7 +6325,7 @@ qemuBuildPCINestedSmmuv3DevProps(const virDomainDef *def,
|
||||
"s:primary-bus", bus,
|
||||
"s:id", iommu->info.alias,
|
||||
"B:accel", (iommu->accel == VIR_TRISTATE_SWITCH_ON),
|
||||
- "B:tegra241-cmdqv", (iommu->cmdqv == VIR_TRISTATE_SWITCH_ON),
|
||||
+ "S:cmdqv", qemuOnOffAuto(iommu->cmdqv),
|
||||
"B:ats", (iommu->ats == VIR_TRISTATE_SWITCH_ON),
|
||||
NULL) < 0)
|
||||
return NULL;
|
||||
diff --git a/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-cmdqv.aarch64-latest.args b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-cmdqv.aarch64-latest.args
|
||||
index 7c9d883661..d5a30927fe 100644
|
||||
--- a/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-cmdqv.aarch64-latest.args
|
||||
+++ b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-cmdqv.aarch64-latest.args
|
||||
@@ -30,8 +30,8 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"pxb-pcie","bus_nr":248,"id":"pci.2","bus":"pcie.0","addr":"0x2"}' \
|
||||
-device '{"driver":"pcie-root-port","port":0,"chassis":21,"id":"pci.3","bus":"pci.1","addr":"0x0"}' \
|
||||
-device '{"driver":"pcie-root-port","port":168,"chassis":22,"id":"pci.4","bus":"pci.2","addr":"0x0"}' \
|
||||
--device '{"driver":"arm-smmuv3","primary-bus":"pci.1","id":"iommu0","accel":true,"tegra241-cmdqv":true,"ats":true,"ssidsize":20,"oas":44}' \
|
||||
--device '{"driver":"arm-smmuv3","primary-bus":"pci.2","id":"iommu1","accel":true,"tegra241-cmdqv":true,"ats":true,"ssidsize":20,"oas":44}' \
|
||||
+-device '{"driver":"arm-smmuv3","primary-bus":"pci.1","id":"iommu0","accel":true,"cmdqv":"on","ats":true,"ssidsize":20,"oas":44}' \
|
||||
+-device '{"driver":"arm-smmuv3","primary-bus":"pci.2","id":"iommu1","accel":true,"cmdqv":"on","ats":true,"ssidsize":20,"oas":44}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
|
||||
-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.3","addr":"0x0"}' \
|
||||
--
|
||||
2.53.0
|
||||
@ -0,0 +1,98 @@
|
||||
From e90816b502675a2737ad1fa1c85b8ae5dfff8680 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <e90816b502675a2737ad1fa1c85b8ae5dfff8680.1773230519.git.phrdina@redhat.com>
|
||||
From: Pavel Hrdina <phrdina@redhat.com>
|
||||
Date: Tue, 10 Mar 2026 09:34:48 +0100
|
||||
Subject: [PATCH] qemu_hotplug: Fix crash when attaching network inteface with
|
||||
hostdev network
|
||||
|
||||
From: Pavel Hrdina <phrdina@redhat.com>
|
||||
|
||||
The following interface XML will crash libvirt when attached to
|
||||
running VM:
|
||||
|
||||
<interface type='network'>
|
||||
<source network='hostdev_net'/>
|
||||
</interface>
|
||||
|
||||
Instead of trying to figure out every single place where hostdev is used
|
||||
as struct directly and allocating empty private data check if iommufd
|
||||
is configured as that will happen only for <hostdev> device where the
|
||||
private data are correctly allocated.
|
||||
|
||||
This patch is best viewed with `git show -w`.
|
||||
|
||||
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
(cherry picked from commit 25662b3700da9c32b5083d46ff3831aa4afc2eab)
|
||||
|
||||
Resolves: https://issues.redhat.com/browse/VOYAGER-227
|
||||
|
||||
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_hotplug.c | 37 +++++++++++++++++++++----------------
|
||||
1 file changed, 21 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
|
||||
index bb88815e27..845f42bf20 100644
|
||||
--- a/src/qemu/qemu_hotplug.c
|
||||
+++ b/src/qemu/qemu_hotplug.c
|
||||
@@ -1638,20 +1638,23 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver,
|
||||
|
||||
qemuDomainObjEnterMonitor(vm);
|
||||
|
||||
- if (objprops) {
|
||||
- if ((ret = qemuFDPassDirectTransferMonitor(priv->iommufd, priv->mon)) < 0)
|
||||
- goto exit_monitor;
|
||||
|
||||
- if ((ret = qemuMonitorAddObject(priv->mon, &objprops, NULL)) < 0)
|
||||
- goto exit_monitor;
|
||||
+ if (virHostdevIsPCIDeviceWithIOMMUFD(hostdev)) {
|
||||
+ if (objprops) {
|
||||
+ if ((ret = qemuFDPassDirectTransferMonitor(priv->iommufd, priv->mon)) < 0)
|
||||
+ goto exit_monitor;
|
||||
+
|
||||
+ if ((ret = qemuMonitorAddObject(priv->mon, &objprops, NULL)) < 0)
|
||||
+ goto exit_monitor;
|
||||
|
||||
- priv->iommufdState = true;
|
||||
- removeiommufd = true;
|
||||
+ priv->iommufdState = true;
|
||||
+ removeiommufd = true;
|
||||
+ }
|
||||
+
|
||||
+ if ((ret = qemuFDPassDirectTransferMonitor(hostdevPriv->vfioDeviceFd, priv->mon)) < 0)
|
||||
+ goto exit_monitor;
|
||||
}
|
||||
|
||||
- if ((ret = qemuFDPassDirectTransferMonitor(hostdevPriv->vfioDeviceFd, priv->mon)) < 0)
|
||||
- goto exit_monitor;
|
||||
-
|
||||
if ((ret = qemuDomainAttachExtensionDevice(priv->mon, hostdev->info)) < 0)
|
||||
goto exit_monitor;
|
||||
|
||||
@@ -1682,15 +1685,17 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver,
|
||||
if (teardownmemlock && qemuDomainAdjustMaxMemLock(vm) < 0)
|
||||
VIR_WARN("Unable to reset maximum locked memory on hotplug fail");
|
||||
|
||||
- qemuDomainObjEnterMonitor(vm);
|
||||
+ if (virHostdevIsPCIDeviceWithIOMMUFD(hostdev)) {
|
||||
+ qemuDomainObjEnterMonitor(vm);
|
||||
|
||||
- if (removeiommufd)
|
||||
- ignore_value(qemuMonitorDelObject(priv->mon, "iommufd0", false));
|
||||
+ if (removeiommufd)
|
||||
+ ignore_value(qemuMonitorDelObject(priv->mon, "iommufd0", false));
|
||||
|
||||
- qemuFDPassDirectTransferMonitorRollback(hostdevPriv->vfioDeviceFd, priv->mon);
|
||||
- qemuFDPassDirectTransferMonitorRollback(priv->iommufd, priv->mon);
|
||||
+ qemuFDPassDirectTransferMonitorRollback(hostdevPriv->vfioDeviceFd, priv->mon);
|
||||
+ qemuFDPassDirectTransferMonitorRollback(priv->iommufd, priv->mon);
|
||||
|
||||
- qemuDomainObjExitMonitor(vm);
|
||||
+ qemuDomainObjExitMonitor(vm);
|
||||
+ }
|
||||
|
||||
if (releaseaddr)
|
||||
qemuDomainReleaseDeviceAddress(vm, info);
|
||||
--
|
||||
2.53.0
|
||||
@ -294,7 +294,7 @@
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 11.10.0
|
||||
Release: 10.2%{?dist}%{?extra_release}
|
||||
Release: 10.3%{?dist}%{?extra_release}
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
||||
URL: https://libvirt.org/
|
||||
|
||||
@ -387,6 +387,8 @@ Patch82: libvirt-qemu-add-IOMMU-attribute-cmdqv-for-smmuv3.patch
|
||||
Patch83: libvirt-tests-qemuxmlconfdata-provide-cmdqv-sample-XML-and-CLI-args.patch
|
||||
Patch84: libvirt-domain_conf-initialize-network-hostdev-private-data.patch
|
||||
Patch85: libvirt-qemu_hotplug-enter-monitor-in-order-to-rollback-passed-FD.patch
|
||||
Patch86: libvirt-qemu_hotplug-Fix-crash-when-attaching-network-inteface-with-hostdev-network.patch
|
||||
Patch87: libvirt-qemu_command-Update-cmdqv-to-the-latest-qemu-kvm-changes.patch
|
||||
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
@ -2778,6 +2780,10 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 11 2026 Pavel Hrdina <phrdina@redhat.com> - 11.10.0-10.3
|
||||
- qemu_hotplug: Fix crash when attaching network inteface with hostdev network (VOYAGER-227)
|
||||
- qemu_command: Update cmdqv to the latest qemu-kvm changes (VOYAGER-296)
|
||||
|
||||
* Wed Mar 4 2026 Pavel Hrdina <phrdina@redhat.com> - 11.10.0-10.2.el10nv
|
||||
- domain_conf: initialize network hostdev private data (VOYAGER-227)
|
||||
- qemu_hotplug: enter monitor in order to rollback passed FD (VOYAGER-227)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user