[libvirt PATCH 0/3] Invalidate the cpu flags cache on changes of kernel command line
by Tim Wiederhake
The kernel command line can contain settings affecting the availability
of cpu features, eg. "tsx=on". This series adds the kernel command line
to the cpu flags cache and declares the cache invalid if the current
kernel command line differs.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1953389.
Tim Wiederhake (3):
virQEMUCaps: Add kernel command line
virQEMUCapsCachePriv: Add kernel command line
qemu: Invalidate capabilities cache on kernel command line mismatch
src/qemu/qemu_capabilities.c | 34 ++++++++++++++++++++++++++++++++--
src/qemu/qemu_capspriv.h | 3 ++-
tests/qemucapsprobe.c | 2 +-
3 files changed, 35 insertions(+), 4 deletions(-)
--
2.31.1
3 years, 4 months
[libvirt PATCH] run: set abs_builddir variables
by Ján Tomko
test-lib.sh needs these to be set.
Export them so that the virsh-* tests can be run using:
builddir$ ./run srcdir/tests/virsh-snapshot
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
meson.build | 1 +
run.in | 3 +++
2 files changed, 4 insertions(+)
diff --git a/meson.build b/meson.build
index 32ad688c9c..5af09d319a 100644
--- a/meson.build
+++ b/meson.build
@@ -2233,6 +2233,7 @@ configure_file(output: 'meson-config.h', configuration: conf)
# generate run helper
run_conf = configuration_data()
run_conf.set('abs_builddir', meson.build_root())
+run_conf.set('abs_top_builddir', meson.build_root())
configure_file(
input: 'run.in',
output: '@BASENAME@',
diff --git a/run.in b/run.in
index 9aae27a79e..64f99751fe 100644
--- a/run.in
+++ b/run.in
@@ -80,6 +80,9 @@ env["LIBVIRT_DIR_OVERRIDE"] = "1"
# read problems when using glibc.
env["MALLOC_PERTURB_"] = "%d" % random.randint(1, 255)
+env["abs_builddir"] = "@abs_builddir@"
+env["abs_top_builddir"] = "@abs_top_builddir@"
+
modular_daemons = [
"virtinterfaced",
"virtlxcd",
--
2.31.1
3 years, 4 months
[libvirt PATCH 00/10] virsh: moments: use g_auto more (glib chronicles)
by Ján Tomko
Ján Tomko (10):
vsh: table: define cleanup function
virsh: add cleanup function for virshDomainCheckpoint
virsh: add cleanup function for virshDomainSnapshot
virsh: checkpoint: move variables inside the loop
virsh: snapshot: move variables inside the loop
virsh: cmdCheckpointInfo: delete unused variables
virsh: checkpoint: use g_auto where possible
virsh: checkpoint: remove pointless cleanup labels
virsh: snapshot: use g_auto where possible
virsh: snapshot: remove pointless cleanup labels
tools/virsh-checkpoint.c | 188 ++++++++-----------------
tools/virsh-snapshot.c | 288 +++++++++++++--------------------------
tools/virsh-util.h | 4 +
tools/vsh-table.h | 1 +
4 files changed, 156 insertions(+), 325 deletions(-)
--
2.31.1
3 years, 4 months
[libvirt PATCH 0/5] vsh: use g_auto more (glib chronicles)
by Ján Tomko
Except for vshCommandParse.
-EPARSE
Ján Tomko (5):
vsh: do not cast away const
vsh: cmdEcho: use separate variable for argument
vsh: use g_auto where possible
vsh: remove pointless cleanup labels
vsh: use g_clear_pointer
tools/vsh.c | 91 ++++++++++++++++++-----------------------------------
1 file changed, 31 insertions(+), 60 deletions(-)
--
2.31.1
3 years, 4 months
[libvirt PATCH] meson: Always use the / operator to join paths
by Andrea Bolognani
This is the preferred way to do it, but there were a few
instances in which some of the path components had embedded
slashes instead.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
docs/internals/meson.build | 2 +-
docs/kbase/meson.build | 2 +-
docs/manpages/meson.build | 2 +-
src/security/meson.build | 2 +-
src/storage/meson.build | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/internals/meson.build b/docs/internals/meson.build
index 5aa67ded5c..2d0ae6195c 100644
--- a/docs/internals/meson.build
+++ b/docs/internals/meson.build
@@ -12,7 +12,7 @@ html_xslt_gen = []
foreach name : internals_in_files
html_xslt_gen += {
'name': name,
- 'source': 'docs/internals' / name + '.html.in',
+ 'source': 'docs' / 'internals' / name + '.html.in',
}
endforeach
diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build
index 8d8fd695ea..73dc11837f 100644
--- a/docs/kbase/meson.build
+++ b/docs/kbase/meson.build
@@ -31,7 +31,7 @@ foreach name : docs_kbase_files
html_xslt_gen += {
'name': name,
'file': docs_rst2html5_gen.process(rst_file),
- 'source': 'docs/kbase' / rst_file,
+ 'source': 'docs' / 'kbase' / rst_file,
}
endforeach
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index fe91a43614..cafe29a545 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -125,7 +125,7 @@ foreach data : docs_man_files
html_xslt_gen += {
'name': data['name'],
'file': html_in,
- 'source': 'docs/manpages' / rst_in_file,
+ 'source': 'docs' / 'manpages' / rst_in_file,
}
endforeach
diff --git a/src/security/meson.build b/src/security/meson.build
index 6f5e1dec1d..6230b34aa4 100644
--- a/src/security/meson.build
+++ b/src/security/meson.build
@@ -47,7 +47,7 @@ if conf.has('WITH_LIBVIRTD') and conf.has('WITH_APPARMOR')
conf_inc_dir,
hypervisor_inc_dir,
include_directories('.'),
- include_directories('../storage_file'),
+ include_directories('..' / 'storage_file'),
],
}
endif
diff --git a/src/storage/meson.build b/src/storage/meson.build
index 915ae46f61..d1aa66b147 100644
--- a/src/storage/meson.build
+++ b/src/storage/meson.build
@@ -79,7 +79,7 @@ if conf.has('WITH_STORAGE')
],
include_directories: [
conf_inc_dir,
- include_directories('../storage_file'),
+ include_directories('..' / 'storage_file'),
],
)
@@ -163,7 +163,7 @@ if conf.has('WITH_STORAGE_GLUSTER')
glusterfs_dep,
],
'include': [
- include_directories('../storage_file'),
+ include_directories('..' / 'storage_file'),
],
'install_dir': storage_backend_install_dir,
}
--
2.31.1
3 years, 4 months
[PATCH v2 0/4] interface define: add support for validation against schema
by Kristina Hanicova
This is v2 of:
https://listman.redhat.com/archives/libvir-list/2021-August/msg00187.html
Changes since v1 (suggested by Peter):
* split of the patch containing api and virsh adjustments into separate
patches
* change of documentation (which I forgot to do before)
Kristina Hanicova (4):
conf: propagate xmlDocPtr and flags into virInterfaceDefParseXML()
api: add virInterfaceDefineFlags
virsh: add support for '--validate' option in define interface
interface_conf: add validation against schema in define
docs/manpages/virsh.rst | 5 ++--
include/libvirt/libvirt-interface.h | 4 +++
src/conf/interface_conf.c | 38 ++++++++++++++++++-------
src/conf/interface_conf.h | 6 ++--
src/conf/virinterfaceobj.c | 2 +-
src/interface/interface_backend_netcf.c | 6 ++--
src/libvirt-interface.c | 2 +-
src/test/test_driver.c | 4 +--
tests/interfacexml2xmltest.c | 2 +-
tools/virsh-interface.c | 10 ++++++-
10 files changed, 55 insertions(+), 24 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH 0/4] qemu: Open chardev logfile on behalf of QEMU
by Michal Privoznik
See 4/4 for explanation.
Michal Prívozník (4):
virDomainDefGetSecurityLabelDef: Fix const correctness
qemuDomainOpenFile: Take virDomainDef instead of virDomainObj
qemuDomainOpenFile: Take @cfg instead of driver
qemu: Open chardev logfile on behalf of QEMU
src/conf/domain_conf.c | 2 +-
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_command.c | 68 +++++++++++++++++++++++++++++----------
src/qemu/qemu_domain.c | 13 ++++----
src/qemu/qemu_domain.h | 4 +--
src/qemu/qemu_driver.c | 4 +--
src/qemu/qemu_saveimage.c | 5 +--
7 files changed, 66 insertions(+), 32 deletions(-)
--
2.31.1
3 years, 4 months
[PATCH v2] domain_conf: Fix memory leak when free'ing virDomainObj
by Luke Yue
Free dom->deprecations when free'ing virDomainObj
Signed-off-by: Luke Yue <lukedyue(a)gmail.com>
---
src/conf/domain_conf.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 09da4ab952..7e1d30bdb2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3730,6 +3730,16 @@ void virDomainDefFree(virDomainDef *def)
g_free(def);
}
+static void
+virDomainObjDeprecationFree(virDomainObj *dom)
+{
+ size_t i = 0;
+ for (i = 0; i < dom->ndeprecations; i++) {
+ g_free(dom->deprecations[i]);
+ }
+ g_free(dom->deprecations);
+}
+
static void virDomainObjDispose(void *obj)
{
virDomainObj *dom = obj;
@@ -3742,6 +3752,7 @@ static void virDomainObjDispose(void *obj)
if (dom->privateDataFreeFunc)
(dom->privateDataFreeFunc)(dom->privateData);
+ virDomainObjDeprecationFree(dom);
virDomainSnapshotObjListFree(dom->snapshots);
virDomainCheckpointObjListFree(dom->checkpoints);
}
--
2.32.0
3 years, 4 months
[PATCH 0/2] virDomain: fix problems when setting qos on ovs managed interface
by zhangjl02
Two problems are found and fixed below:
1. Ingress rules is not clean on previous version of virNetDevOpenvswitchInterfaceClearQos.
2. If errors occurs when removing inbound qos on multi interfaces vm, some rules may not be delete as aspected.
Fix by:
Instead of cleaning all qos rules each time new qos is set, tx and rx's qos are set or cleaned respectively.
Replace virReportError with VIR_WARN to let the cleaning process continue when error occurs.
Add ifname into ovs querying statements, which will reduce failure of removing qos on the other interfaces of the same vm.
Test virNetDevOpenvswitchInterfaceSetQos and virNetDevOpenvswitchInterfaceClearQos with dryrun method.
Since commands in tests are not actually run, it is difficult to emulate some complex senario, such as set and then update qos.
So basic tests are added in patches.
Jinsheng Zhang (2):
virDomain: interface: add virNetDevOpenvswitchInterfaceClearTxQos and
virNetDevOpenvswitchInterfaceClearRxQos.
tests: add test on virNetDevOpenvswitchInterfaceSetQos and
virNetDevOpenvswitchInterfaceClearQos
src/libvirt_private.syms | 2 +
src/util/virnetdevopenvswitch.c | 69 +++++++++--
src/util/virnetdevopenvswitch.h | 7 ++
tests/virnetdevopenvswitchtest.c | 196 ++++++++++++++++++++++++++++++-
4 files changed, 262 insertions(+), 12 deletions(-)
--
2.30.2.windows.1
3 years, 4 months
[PATCH] domain_conf: Fix memory leak when free'ing virDomainObj
by Luke Yue
Free dom->deprecations when free'ing virDomainObj
Signed-off-by: Luke Yue <lukedyue(a)gmail.com>
---
src/conf/domain_conf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 09da4ab952..2527cd1d70 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3733,6 +3733,7 @@ void virDomainDefFree(virDomainDef *def)
static void virDomainObjDispose(void *obj)
{
virDomainObj *dom = obj;
+ size_t i = 0;
VIR_DEBUG("obj=%p", dom);
virCondDestroy(&dom->cond);
@@ -3742,6 +3743,11 @@ static void virDomainObjDispose(void *obj)
if (dom->privateDataFreeFunc)
(dom->privateDataFreeFunc)(dom->privateData);
+ for (i = 0; i < dom->ndeprecations; i++) {
+ g_free(dom->deprecations[i]);
+ }
+ g_free(dom->deprecations);
+
virDomainSnapshotObjListFree(dom->snapshots);
virDomainCheckpointObjListFree(dom->checkpoints);
}
--
2.32.0
3 years, 4 months