[libvirt PATCHv2 0/9] support running virtiofsd in session mode
by Ján Tomko
Now with automatic id mapping selection.
Ján Tomko (9):
conf: move idmap definition earlier
conf: move idmap parsing earlier
conf: add idmap element to filesystem
qemu: format uid/gid map for virtiofs
qemu: virtiofs: do not force UID 0
qemu: allow running virtiofsd in session mode
util: add virGetSubUIDs
qemu: virtiofs: auto-fill idmap for unprivileged use
docs: virtiofs: add section about ID remapping
docs/formatdomain.rst | 8 +
docs/kbase/virtiofs.rst | 19 +++
src/conf/domain_conf.c | 152 ++++++++++++------
src/conf/domain_conf.h | 29 ++--
src/conf/schemas/domaincommon.rng | 3 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_validate.c | 7 +-
src/qemu/qemu_virtiofs.c | 95 ++++++++++-
src/util/virutil.c | 70 ++++++++
src/util/virutil.h | 12 ++
.../vhost-user-fs-fd-memory.xml | 4 +
tests/utiltest.c | 33 ++++
tests/virutiltestdata/subuid | 4 +
13 files changed, 362 insertions(+), 76 deletions(-)
create mode 100644 tests/virutiltestdata/subuid
--
2.42.0
11 months, 2 weeks
[PATCH] Unreacheble code cleanup
by Dmitry Frolov
Removed code is unreacheble, since the following functions always return 0:
virCPUx86DataAdd()
libxlCapsAddCPUID()
virCapabilitiesAddHostFeature()
libxl_get_physinfo()
virCapabilitiesSetNetPrefix()
libxlMakeDomainOSCaps()
libxlMakeDomainDeviceDiskCaps()
libxlMakeDomainDeviceGraphicsCaps()
libxlMakeDomainDeviceVideoCaps()
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Frolov <frolov(a)swemel.ru>
---
src/libxl/libxl_capabilities.c | 34 ++++++++++++----------------------
1 file changed, 12 insertions(+), 22 deletions(-)
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 177e8b988e..68908874fb 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -64,12 +64,7 @@ libxlCapsAddCPUID(virCPUData *data, virCPUx86CPUID *cpuid, ssize_t ncaps)
item.type = VIR_CPU_X86_DATA_CPUID;
for (i = 0; i < ncaps; i++) {
item.data.cpuid = cpuid[i];
-
- if (virCPUx86DataAdd(data, &item) < 0) {
- VIR_DEBUG("Failed to add CPUID(%x,%x)",
- cpuid[i].eax_in, cpuid[i].ecx_in);
- return -1;
- }
+ virCPUx86DataAdd(data, &item) < 0);
}
return 0;
@@ -119,8 +114,7 @@ libxlCapsNodeData(virCPUDef *cpu, libxl_hwcap hwcap)
return NULL;
ncaps = G_N_ELEMENTS(cpuid);
- if (libxlCapsAddCPUID(cpudata, cpuid, ncaps) < 0)
- return NULL;
+ libxlCapsAddCPUID(cpudata, cpuid, ncaps);
return g_steal_pointer(&cpudata);
}
@@ -145,9 +139,10 @@ libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_info)
cpu = virCPUDefNew();
host_pae = phy_info->hw_cap[0] & LIBXL_X86_FEATURE_PAE_MASK;
- if (host_pae &&
- virCapabilitiesAddHostFeature(caps, "pae") < 0)
+ if (host_pae) {
+ virCapabilitiesAddHostFeature(caps, "pae");
return -1;
+ }
host_lm = (phy_info->hw_cap[2] & LIBXL_X86_FEATURE_LM_MASK);
if (host_lm)
@@ -179,17 +174,12 @@ libxlCapsInitHost(libxl_ctx *ctx, virCaps *caps)
int ret = -1;
libxl_physinfo_init(&phy_info);
- if (libxl_get_physinfo(ctx, &phy_info) != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Failed to get node physical info from libxenlight"));
- goto cleanup;
- }
+ libxl_get_physinfo(ctx, &phy_info);
if (libxlCapsInitCPU(caps, &phy_info) < 0)
goto cleanup;
- if (virCapabilitiesSetNetPrefix(caps, LIBXL_GENERATED_PREFIX_XEN) < 0)
- goto cleanup;
+ virCapabilitiesSetNetPrefix(caps, LIBXL_GENERATED_PREFIX_XEN);
ret = 0;
@@ -685,11 +675,11 @@ libxlMakeDomainCapabilities(virDomainCaps *domCaps,
else
domCaps->maxvcpus = PV_MAX_VCPUS;
- if (libxlMakeDomainOSCaps(domCaps->machine, os, firmwares, nfirmwares) < 0 ||
- libxlMakeDomainDeviceDiskCaps(disk) < 0 ||
- libxlMakeDomainDeviceGraphicsCaps(graphics) < 0 ||
- libxlMakeDomainDeviceVideoCaps(video) < 0)
- return -1;
+ libxlMakeDomainOSCaps(domCaps->machine, os, firmwares, nfirmwares);
+ libxlMakeDomainDeviceDiskCaps(disk);
+ libxlMakeDomainDeviceGraphicsCaps(graphics);
+ libxlMakeDomainDeviceVideoCaps(video);
+
if (STRNEQ(domCaps->machine, "xenpvh") &&
libxlMakeDomainDeviceHostdevCaps(hostdev) < 0)
return -1;
--
2.34.1
11 months, 2 weeks
[PATCH v2 0/4] Support for dirty-limit live migration
by Hyman Huang
v2:
- mark the VIR_MIGRATE_DIRTY_LIMIT flag since 10.0.0
v1:
The dirty-limit functionality for live migration was
introduced since qemu>=8.1.
In the live migration scenario, it implements the force
convergence using the dirty-limit approach, which results
in better reliable read performance.
A straightforward dirty-limit capability for live migration
is added by this patchset. Users might not care about other
dirty-limit arguments like "x-vcpu-dirty-limit-period"
or "vcpu-dirty-limit," thus do not expose them to Libvirt
and Keep the default configurations and values in place.
For more details about dirty-limit, please see the following
reference:
https://lore.kernel.org/qemu-
devel/169024923116.19090.10825599068950039132-0(a)git.sr.ht/
Hyman Huang (4):
Add VIR_MIGRATE_DIRTY_LIMIT flag
qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag
virsh: Add support for VIR_MIGRATE_DIRTY_LIMIT flag
NEWS: document support for dirty-limit live migration
NEWS.rst | 8 ++++++++
docs/manpages/virsh.rst | 10 +++++++++-
include/libvirt/libvirt-domain.h | 5 +++++
src/libvirt-domain.c | 8 ++++++++
src/qemu/qemu_migration.c | 8 ++++++++
src/qemu/qemu_migration.h | 1 +
src/qemu/qemu_migration_params.c | 6 ++++++
src/qemu/qemu_migration_params.h | 1 +
tools/virsh-domain.c | 10 ++++++++++
9 files changed, 56 insertions(+), 1 deletion(-)
--
2.39.1
11 months, 2 weeks
[PATCH v2 0/9] RFC: Add versioned CPUs to libvirt
by Jonathon Jongsma
For SEV-SNP support we will need to be able to specify versioned CPU models
that are not yet available in libvirt. Rather than just adding a versioned CPU
or two that would satisfy that immediate need, I decided to try to add
versioned CPUs in a more standard way. This series generates CPU definitions
for all cpu versions that are defined in upstream qemu (at least for
recent Intel and AMD CPUs).
libvirt already provides a select subset of these versions as configurable CPU
models. But we only include the ones that have defined aliases in qemu, such as
EPYC-IBPB. After this patchset, all verisioned cpu models supported by qemu
will be available in libvirt.
Note that I'm only adding versions that are not already available via their
alias. For example, I am not adding an EPYC-v2 CPU model since it is already
available as EPYC-IBPB.
Changes in v2:
- don't make any changes to existing CPU models
- drop concept of aliases from libvirt and only provide new versioned models
that aren't already available via their qemu alias.
Jonathon Jongsma (9):
cpu_map: update script to generate versioned CPUs
cpu_map: Add versioned EPYC CPUs
cpu_map: Add versioned Intel Skylake CPUs
cpu_map: Add versioned Intel Cascadelake CPUs
cpu_map: Add versioned Intel Icelake CPUs
cpu_map: Add versioned Intel Cooperlake CPUs
cpu_map: Add versioned Intel Snowridge CPUs
cpu_map: Add versioned Intel SapphireRapids CPUs
cpu_map: Add versioned Dhyana CPUs
src/cpu_map/index.xml | 22 +++
src/cpu_map/meson.build | 22 +++
src/cpu_map/sync_qemu_models_i386.py | 44 ++++--
src/cpu_map/x86_Cascadelake-Server-v2.xml | 93 +++++++++++++
src/cpu_map/x86_Cascadelake-Server-v4.xml | 91 +++++++++++++
src/cpu_map/x86_Cascadelake-Server-v5.xml | 92 +++++++++++++
src/cpu_map/x86_Cooperlake-v2.xml | 98 ++++++++++++++
src/cpu_map/x86_Dhyana-v2.xml | 81 ++++++++++++
src/cpu_map/x86_EPYC-Milan-v2.xml | 108 +++++++++++++++
src/cpu_map/x86_EPYC-Rome-v2.xml | 93 +++++++++++++
src/cpu_map/x86_EPYC-Rome-v3.xml | 95 +++++++++++++
src/cpu_map/x86_EPYC-Rome-v4.xml | 94 +++++++++++++
src/cpu_map/x86_EPYC-v3.xml | 87 ++++++++++++
src/cpu_map/x86_EPYC-v4.xml | 88 ++++++++++++
src/cpu_map/x86_Icelake-Server-v3.xml | 103 +++++++++++++++
src/cpu_map/x86_Icelake-Server-v4.xml | 108 +++++++++++++++
src/cpu_map/x86_Icelake-Server-v5.xml | 109 +++++++++++++++
src/cpu_map/x86_Icelake-Server-v6.xml | 109 +++++++++++++++
src/cpu_map/x86_SapphireRapids-v2.xml | 125 ++++++++++++++++++
src/cpu_map/x86_Skylake-Client-v4.xml | 77 +++++++++++
src/cpu_map/x86_Skylake-Server-v4.xml | 83 ++++++++++++
src/cpu_map/x86_Skylake-Server-v5.xml | 85 ++++++++++++
src/cpu_map/x86_Snowridge-v2.xml | 78 +++++++++++
src/cpu_map/x86_Snowridge-v3.xml | 80 +++++++++++
src/cpu_map/x86_Snowridge-v4.xml | 78 +++++++++++
.../x86_64-cpuid-Atom-P5362-guest.xml | 3 +-
.../x86_64-cpuid-Atom-P5362-json.xml | 3 +-
.../x86_64-cpuid-Cooperlake-host.xml | 3 +-
.../x86_64-cpuid-EPYC-7502-32-Core-host.xml | 5 +-
.../x86_64-cpuid-EPYC-7601-32-Core-guest.xml | 9 +-
...6_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml | 8 +-
..._64-cpuid-Hygon-C86-7185-32-core-guest.xml | 5 +-
...6_64-cpuid-Hygon-C86-7185-32-core-host.xml | 5 +-
...6_64-cpuid-Hygon-C86-7185-32-core-json.xml | 6 +-
...4-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 9 +-
.../x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 9 +-
.../x86_64-cpuid-Xeon-Platinum-8268-host.xml | 9 +-
.../x86_64-cpuid-Xeon-Platinum-9242-guest.xml | 9 +-
.../x86_64-cpuid-Xeon-Platinum-9242-host.xml | 9 +-
.../x86_64-cpuid-Xeon-Platinum-9242-json.xml | 9 +-
..._64-cpuid-baseline-Cascadelake+Icelake.xml | 9 +-
...-cpuid-baseline-Cooperlake+Cascadelake.xml | 9 +-
...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 9 +-
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 2 +
.../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 2 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 2 +
.../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 4 +
.../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 4 +
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 4 +
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 7 +
.../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 7 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 7 +
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 7 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 7 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 7 +
.../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 8 ++
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 8 ++
tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 8 ++
.../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 15 +++
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 15 +++
tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 15 +++
.../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 16 +++
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 16 +++
tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 16 +++
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 17 +++
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 17 +++
tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 17 +++
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 17 +++
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 17 +++
tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 17 +++
.../domaincapsdata/qemu_7.2.0-q35.x86_64.xml | 17 +++
.../qemu_7.2.0-tcg.x86_64+hvf.xml | 17 +++
.../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml | 17 +++
tests/domaincapsdata/qemu_7.2.0.x86_64.xml | 17 +++
.../domaincapsdata/qemu_8.0.0-q35.x86_64.xml | 17 +++
.../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml | 17 +++
tests/domaincapsdata/qemu_8.0.0.x86_64.xml | 17 +++
.../domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 27 +++-
.../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml | 22 +++
tests/domaincapsdata/qemu_8.1.0.x86_64.xml | 27 +++-
.../domaincapsdata/qemu_8.2.0-q35.x86_64.xml | 27 +++-
.../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml | 22 +++
tests/domaincapsdata/qemu_8.2.0.x86_64.xml | 27 +++-
...-host-model-fallback-kvm.x86_64-8.1.0.args | 2 +-
...host-model-fallback-kvm.x86_64-latest.args | 2 +-
.../cpu-host-model-kvm.x86_64-8.1.0.args | 2 +-
.../cpu-host-model-kvm.x86_64-latest.args | 2 +-
...ost-model-nofallback-kvm.x86_64-8.1.0.args | 2 +-
...st-model-nofallback-kvm.x86_64-latest.args | 2 +-
89 files changed, 2710 insertions(+), 123 deletions(-)
create mode 100644 src/cpu_map/x86_Cascadelake-Server-v2.xml
create mode 100644 src/cpu_map/x86_Cascadelake-Server-v4.xml
create mode 100644 src/cpu_map/x86_Cascadelake-Server-v5.xml
create mode 100644 src/cpu_map/x86_Cooperlake-v2.xml
create mode 100644 src/cpu_map/x86_Dhyana-v2.xml
create mode 100644 src/cpu_map/x86_EPYC-Milan-v2.xml
create mode 100644 src/cpu_map/x86_EPYC-Rome-v2.xml
create mode 100644 src/cpu_map/x86_EPYC-Rome-v3.xml
create mode 100644 src/cpu_map/x86_EPYC-Rome-v4.xml
create mode 100644 src/cpu_map/x86_EPYC-v3.xml
create mode 100644 src/cpu_map/x86_EPYC-v4.xml
create mode 100644 src/cpu_map/x86_Icelake-Server-v3.xml
create mode 100644 src/cpu_map/x86_Icelake-Server-v4.xml
create mode 100644 src/cpu_map/x86_Icelake-Server-v5.xml
create mode 100644 src/cpu_map/x86_Icelake-Server-v6.xml
create mode 100644 src/cpu_map/x86_SapphireRapids-v2.xml
create mode 100644 src/cpu_map/x86_Skylake-Client-v4.xml
create mode 100644 src/cpu_map/x86_Skylake-Server-v4.xml
create mode 100644 src/cpu_map/x86_Skylake-Server-v5.xml
create mode 100644 src/cpu_map/x86_Snowridge-v2.xml
create mode 100644 src/cpu_map/x86_Snowridge-v3.xml
create mode 100644 src/cpu_map/x86_Snowridge-v4.xml
--
2.41.0
11 months, 3 weeks
[PATCH] remote: Fix cached hypervisor type
by Jim Fehlig
Commit 501825011c switched the remote driver to using g_auto, but missed
one case of needing to steal a pointer holding the hypervisor type.
Without it, memory is freed and the output of 'virsh version' has random
output
Compiled against library: libvirt 10.0.0
Using library: libvirt 10.0.0
Using API: ��%�U 10.0.0
Running hypervisor: ��U 8.1.3
Ths change also fixes random SIGABRT from perl processes running
libvirt-tck tests.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index c4831db6cd..132d0194c6 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1408,7 +1408,7 @@ remoteConnectGetType(virConnectPtr conn)
return NULL;
/* Stash. */
- return priv->type = ret.type;
+ return priv->type = g_steal_pointer(&ret.type);
}
static int remoteConnectIsSecure(virConnectPtr conn)
--
2.43.0
11 months, 3 weeks
[PATCH 0/8] migration fixes for non-shared storage migration
by Peter Krempa
Peter Krempa (8):
qemuMigrationDstPrecreateStorage: Improve error messages
qemuMigrationDstPrecreateStorage: Refactor cleanup
qemuMigrationDstPrecreateStorage: Fix and clarify logic
qemu: migration: Improve handling of VIR_MIGRATE_PARAM_DEST_XML with
VIR_MIGRATE_PERSIST_DEST
qemuDomainStorageOpenStat: Remove unused 'driver' argument and
untangle callers
qemu: migration: Rename qemuMigrationDstPrecreateStorage to
qemuMigrationDstPrepareStorage
qemu: Move and export qemuDomainStorageUpdatePhysical and dependencies
qemu: migration: Automatically fix non-shared-storage migration to
bigger block devices
src/qemu/qemu_domain.c | 114 +++++++++++++++++++++++++++++
src/qemu/qemu_domain.h | 16 ++++
src/qemu/qemu_driver.c | 149 ++++----------------------------------
src/qemu/qemu_migration.c | 146 +++++++++++++++++++++++++++----------
4 files changed, 249 insertions(+), 176 deletions(-)
--
2.43.0
11 months, 3 weeks
[PATCH 0/3] nodedev: Storage device size fixes
by Peter Krempa
Peter Krempa (3):
virNodeDeviceCapStorageDefFormat: Don't check argument for
virBufferEscapeString
virNodeDeviceCapStorageDefFormat: Extract formatting of block size
data
virNodeDeviceCapStorageDefFormatBlocksize: Report sector size and
count together
src/conf/node_device_conf.c | 65 +++++++++++++++----------------------
1 file changed, 27 insertions(+), 38 deletions(-)
--
2.43.0
11 months, 3 weeks
[PATCH v1] qemu_driver: Don't handle the EOF event if monitor changed
by tugy@chinatelecom.cn
From: Guoyi Tu <tugy(a)chinatelecom.cn>
Currently, libvirt creates a thread pool with only on thread to handle all
qemu monitor events for virtual machines, In the cases that if the thread
gets stuck while handling a monitor EOF event, such as unable to kill the
virtual machine process or release resources, the events of other virtual
machine will be also blocked, which will lead to the abnormal behavior of
other virtual machines.
For instance, when another virtual machine completes a shutdown operation
and the monitor EOF event has been queued but remains unprocessed, we
immediately destroy and start the virtual machine again, at a later time
when EOF event get processed, the processMonitorEOFEvent() will kill the
virtual machine that just started.
To address this issue, in the processMonitorEOFEvent(), we check whether
the current virtual machine's monitor object matches the one at the time
the event was generated. If they do not match, we immediately return.
Signed-off-by: Guoyi Tu <tugy(a)chinatelecom.cn>
Signed-off-by: dengpengcheng <dengpc12(a)chinatelecom.cn>
---
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 11 +++++++++--
src/qemu/qemu_process.c | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 953808fcfe..435ee621df 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11470,7 +11470,6 @@ qemuProcessEventFree(struct qemuProcessEvent *event)
case QEMU_PROCESS_EVENT_NETDEV_STREAM_DISCONNECTED:
case QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED:
case QEMU_PROCESS_EVENT_SERIAL_CHANGED:
- case QEMU_PROCESS_EVENT_MONITOR_EOF:
case QEMU_PROCESS_EVENT_GUEST_CRASHLOADED:
g_free(event->data);
break;
@@ -11484,6 +11483,7 @@ qemuProcessEventFree(struct qemuProcessEvent *event)
case QEMU_PROCESS_EVENT_UNATTENDED_MIGRATION:
case QEMU_PROCESS_EVENT_RESET:
case QEMU_PROCESS_EVENT_NBDKIT_EXITED:
+ case QEMU_PROCESS_EVENT_MONITOR_EOF:
case QEMU_PROCESS_EVENT_LAST:
break;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d00d2a27c6..57acafb48b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3854,7 +3854,8 @@ processJobStatusChangeEvent(virDomainObj *vm,
static void
processMonitorEOFEvent(virQEMUDriver *driver,
- virDomainObj *vm)
+ virDomainObj *vm,
+ qemuMonitor *mon)
{
qemuDomainObjPrivate *priv = vm->privateData;
int eventReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
@@ -3863,6 +3864,12 @@ processMonitorEOFEvent(virQEMUDriver *driver,
unsigned int stopFlags = 0;
virObjectEvent *event = NULL;
+ if (priv->mon != mon) {
+ VIR_DEBUG("Domain %p '%s' has been shutdown, ignoring EOF",
+ vm, vm->def->name);
+ return;
+ }
+
if (qemuProcessBeginStopJob(vm, VIR_JOB_DESTROY, true) < 0)
return;
@@ -4082,7 +4089,7 @@ static void qemuProcessEventHandler(void *data, void *opaque)
processJobStatusChangeEvent(vm, processEvent->data);
break;
case QEMU_PROCESS_EVENT_MONITOR_EOF:
- processMonitorEOFEvent(driver, vm);
+ processMonitorEOFEvent(driver, vm, processEvent->data);
break;
case QEMU_PROCESS_EVENT_PR_DISCONNECT:
processPRDisconnectEvent(vm);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f32e82bbd1..ff54e947fe 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -316,7 +316,7 @@ qemuProcessHandleMonitorEOF(qemuMonitor *mon,
}
qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_MONITOR_EOF,
- 0, 0, NULL);
+ 0, 0, priv->mon);
/* We don't want this EOF handler to be called over and over while the
* thread is waiting for a job.
--
2.17.1
11 months, 3 weeks
[PATCH] network: fix check in virNetworkLoadConfig
by Anastasia Belova
virFileLinkPointsTo return non-zero value on fail. This value
may be positive or negative, so check should be != 0.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: bddbda99df ("network: Introduce virnetworkobj")
Signed-off-by: Anastasia Belova <abelova(a)astralinux.ru>
---
src/conf/virnetworkobj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index 20ee8eb58a..47658986e8 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -945,7 +945,7 @@ virNetworkLoadConfig(virNetworkObjList *nets,
if ((autostartLink = virNetworkConfigFile(autostartDir, name)) == NULL)
return NULL;
- if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) < 0)
+ if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) != 0)
return NULL;
if (!(def = virNetworkDefParse(NULL, configFile, xmlopt, false)))
--
2.30.2
11 months, 3 weeks
[PATCH] security_util: fix log in virSecurityMoveRememberedLabel
by Anastasia Belova
Fix incorrect log message for timestamp value.
Probably this line was copied from the check for attr.
Found by Linux Verification Center (linuxtesting.org).
Fixes: 7cfb7aab57 ("security_util: Remove stale XATTRs")
Signed-off-by: Anastasia Belova <abelova(a)astralinux.ru>
---
src/security/security_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security/security_util.c b/src/security/security_util.c
index a4e6687561..b96b4ccb1f 100644
--- a/src/security/security_util.c
+++ b/src/security/security_util.c
@@ -502,7 +502,7 @@ virSecurityMoveRememberedLabel(const char *name,
} else if (errno != ENODATA) {
virReportSystemError(errno,
_("Unable to get XATTR %1$s on %2$s"),
- attr_name, src);
+ timestamp_name, src);
return -1;
}
}
--
2.30.2
11 months, 3 weeks