[libvirt] [PATCH] qemu: driver: Remove unused 'driver' from qemuDomainSnapshotFSFreeze/Thaw
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 45363b0d6d..982a7d61cf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14496,8 +14496,7 @@ qemuDomainMigrateStartPostCopy(virDomainPtr dom,
* is sent but failed, and number of frozen filesystems on success. If -2 is
* returned, FSThaw should be called revert the quiesced status. */
static int
-qemuDomainSnapshotFSFreeze(virQEMUDriverPtr driver G_GNUC_UNUSED,
- virDomainObjPtr vm,
+qemuDomainSnapshotFSFreeze(virDomainObjPtr vm,
const char **mountpoints,
unsigned int nmountpoints)
{
@@ -14516,8 +14515,7 @@ qemuDomainSnapshotFSFreeze(virQEMUDriverPtr driver G_GNUC_UNUSED,
/* Return -1 on error, otherwise number of thawed filesystems. */
static int
-qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver G_GNUC_UNUSED,
- virDomainObjPtr vm,
+qemuDomainSnapshotFSThaw(virDomainObjPtr vm,
bool report)
{
qemuAgentPtr agent;
@@ -15617,7 +15615,7 @@ qemuDomainSnapshotCreateActiveExternal(virQEMUDriverPtr driver,
goto cleanup;
}
- freeze = qemuDomainSnapshotFSFreeze(driver, vm, NULL, 0);
+ freeze = qemuDomainSnapshotFSFreeze(vm, NULL, 0);
qemuDomainObjEndAgentJob(vm);
if (freeze < 0) {
@@ -15746,7 +15744,7 @@ qemuDomainSnapshotCreateActiveExternal(virQEMUDriverPtr driver,
if (thaw != 0 &&
qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_MODIFY) >= 0 &&
virDomainObjIsActive(vm)) {
- if (qemuDomainSnapshotFSThaw(driver, vm, ret == 0 && thaw > 0) < 0) {
+ if (qemuDomainSnapshotFSThaw(vm, ret == 0 && thaw > 0) < 0) {
/* helper reported the error, if it was needed */
if (thaw > 0)
ret = -1;
@@ -20297,7 +20295,7 @@ qemuDomainFSFreeze(virDomainPtr dom,
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
- ret = qemuDomainSnapshotFSFreeze(driver, vm, mountpoints, nmountpoints);
+ ret = qemuDomainSnapshotFSFreeze(vm, mountpoints, nmountpoints);
endjob:
qemuDomainObjEndAgentJob(vm);
@@ -20338,7 +20336,7 @@ qemuDomainFSThaw(virDomainPtr dom,
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
- ret = qemuDomainSnapshotFSThaw(driver, vm, true);
+ ret = qemuDomainSnapshotFSThaw(vm, true);
endjob:
qemuDomainObjEndAgentJob(vm);
--
2.23.0
5 years
[libvirt] [PATCH] src: Wrap long lines in Makefiles
by Michal Privoznik
In my previous commit of v5.9.0-83-g4ae7181376 I've fixed
check-aclrules but whilst doing so, I forgot to wrap long
lines that I've added.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial rule.
src/interface/Makefile.inc.am | 3 ++-
src/network/Makefile.inc.am | 4 +++-
src/nwfilter/Makefile.inc.am | 4 +++-
src/secret/Makefile.inc.am | 4 +++-
src/storage/Makefile.inc.am | 4 +++-
5 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am
index 7353bc4c82..34acdb7566 100644
--- a/src/interface/Makefile.inc.am
+++ b/src/interface/Makefile.inc.am
@@ -9,7 +9,8 @@ INTERFACE_DRIVER_NETCF_SOURCES = interface/interface_backend_netcf.c
INTERFACE_DRIVER_UDEV_SOURCES = interface/interface_backend_udev.c
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
-STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
+STATEFUL_DRIVER_SOURCE_FILES += \
+ $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
EXTRA_DIST += \
$(INTERFACE_DRIVER_SOURCES) \
diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am
index 354c130f35..1cef1c7bce 100644
--- a/src/network/Makefile.inc.am
+++ b/src/network/Makefile.inc.am
@@ -17,7 +17,9 @@ NETWORK_LEASES_HELPER_SOURCES = \
$(NULL)
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NETWORK_DRIVER_SOURCES))
-STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NETWORK_DRIVER_SOURCES))
+STATEFUL_DRIVER_SOURCE_FILES += \
+ $(addprefix $(srcdir)/,$(NETWORK_DRIVER_SOURCES))
+
EXTRA_DIST += \
$(NETWORK_DRIVER_SOURCES) \
$(NETWORK_DRIVER_PLATFORM_INC) \
diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am
index 7b57df3813..b51c8a5cda 100644
--- a/src/nwfilter/Makefile.inc.am
+++ b/src/nwfilter/Makefile.inc.am
@@ -19,7 +19,9 @@ NWFILTER_DRIVER_SOURCES = \
$(NULL)
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES))
-STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES))
+STATEFUL_DRIVER_SOURCE_FILES += \
+ $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES))
+
EXTRA_DIST += $(NWFILTER_DRIVER_SOURCES)
if WITH_NWFILTER
diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am
index 1ecea1ed4a..959d21099d 100644
--- a/src/secret/Makefile.inc.am
+++ b/src/secret/Makefile.inc.am
@@ -12,7 +12,9 @@ SECRET_UTIL_SOURCES = \
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(SECRET_DRIVER_SOURCES))
-STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(SECRET_DRIVER_SOURCES))
+STATEFUL_DRIVER_SOURCE_FILES += \
+ $(addprefix $(srcdir)/,$(SECRET_DRIVER_SOURCES))
+
EXTRA_DIST += \
$(SECRET_DRIVER_SOURCES) \
$(SECRET_UTIL_SOURCES) \
diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am
index 588df60652..3d453029a7 100644
--- a/src/storage/Makefile.inc.am
+++ b/src/storage/Makefile.inc.am
@@ -89,7 +89,9 @@ STORAGE_HELPER_DISK_SOURCES = \
$(NULL)
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES))
-STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES))
+STATEFUL_DRIVER_SOURCE_FILES += \
+ $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES))
+
EXTRA_DIST += \
$(STORAGE_DRIVER_SOURCES) \
$(STORAGE_DRIVER_FS_SOURCES) \
--
2.23.0
5 years
[libvirt] [PATCH] spec: fix vpath build on RHEL 7
by Pavel Hrdina
Macro _vpath_builddir is not defined so we have to define it ourselves.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
libvirt.spec.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index eb8b2df055..2374668722 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -36,6 +36,11 @@
%define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
%endif
+# On RHEL 7 and older macro _vpath_builddir is not defined.
+%if 0%{?rhel} <= 7
+ %define _vpath_builddir %{_target_platform}
+%endif
+
%ifarch %{qemu_kvm_arches}
%define with_qemu_kvm %{with_qemu}
%else
--
2.23.0
5 years
[libvirt] [PATCH 00/10] conf/caps: Modernize and clean up handling of domain caps
by Peter Krempa
Peter Krempa (10):
qemu: caps: Rework memory allocation in
virQEMUCapsFillDomainFeatureSEVCaps
qemu: caps: Make capability filler functions void
conf: domaincaps: Fix broken attempt at being const-correct
conf: storagecaps: Fix broken attempt at being const-correct
conf: Rename virDomainCapsFeature to virDomainProcessCapsFeature
conf: caps: Automaticaly free 'cpus_str'
conf: domain: Split up formatting of <memtune> and <memoryBacking>
conf: turn virDomainMemtuneFormat void
conf: caps: Modernize virCapabilitiesFormatCaches
conf: capabilities: Modernize virCapabilitiesFormatMemoryBandwidth
src/conf/capabilities.c | 36 +++++----------
src/conf/domain_capabilities.c | 32 ++++++-------
src/conf/domain_capabilities.h | 4 +-
src/conf/domain_conf.c | 30 ++++++------
src/conf/domain_conf.h | 82 ++++++++++++++++-----------------
src/conf/storage_capabilities.c | 4 +-
src/conf/storage_capabilities.h | 2 +-
src/libvirt_private.syms | 2 +-
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_container.c | 20 ++++----
src/lxc/lxc_native.c | 4 +-
src/qemu/qemu_capabilities.c | 81 +++++++++++---------------------
12 files changed, 132 insertions(+), 167 deletions(-)
--
2.23.0
5 years
[libvirt] [PATCH 0/6] qemu: Fix "Property '.pconfig' not found" error
by Jiri Denemark
The pconfig feature was enabled in QEMU by accident in 3.1.0. All other
newer versions do not support it and it was removed from the
Icelake-Server CPU model in QEMU.
We don't normally change our CPU models even when QEMU does so to avoid
breaking migrations between different versions of libvirt. But we can
safely do so in this specific case. QEMU never supported enabling
pconfig so any domain which was able to start has pconfig disabled.
With a small compatibility hack which explicitly disables pconfig when
CPU model equals Icelake-Server in migratable domain definition, only
one migration scenario stays broken (and there's nothing we can do about
it): from any host to a host with libvirt < 5.10.0 and QEMU > 3.1.0.
https://bugzilla.redhat.com/show_bug.cgi?id=1749672
Jiri Denemark (6):
cpu_conf: Pass policy to CPU feature filtering callbacks
qemuxml2*test: Add tests for Icelake-Server,-pconfig
qemu: Drop disabled CPU features unknown to QEMU
cpu_map: Drop comments about ospke
cputest: Add data for Ice Lake Server CPU
cpu_map: Drop pconfig from Icelake-Server CPU model
src/conf/cpu_conf.c | 6 +-
src/conf/cpu_conf.h | 1 +
src/cpu/cpu_x86.c | 13 +-
src/cpu/cpu_x86.h | 2 +
src/cpu_map/x86_Cascadelake-Server.xml | 2 -
src/cpu_map/x86_Icelake-Client.xml | 2 -
src/cpu_map/x86_Icelake-Server.xml | 3 -
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_domain.c | 23 +
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_migration_cookie.c | 3 +
src/qemu/qemu_process.c | 32 +
tests/cputest.c | 1 +
.../x86_64-cpuid-Ice-Lake-Server-disabled.xml | 7 +
.../x86_64-cpuid-Ice-Lake-Server-enabled.xml | 10 +
.../x86_64-cpuid-Ice-Lake-Server-guest.xml | 35 +
.../x86_64-cpuid-Ice-Lake-Server-host.xml | 36 +
.../x86_64-cpuid-Ice-Lake-Server-json.xml | 16 +
.../x86_64-cpuid-Ice-Lake-Server.json | 1142 +++++++++++++++++
.../x86_64-cpuid-Ice-Lake-Server.sig | 4 +
.../x86_64-cpuid-Ice-Lake-Server.xml | 65 +
...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 34 +
...-Icelake-Server-pconfig.x86_64-latest.args | 34 +
.../cpu-Icelake-Server-pconfig.xml | 22 +
tests/qemuxml2argvtest.c | 3 +
...pu-Icelake-Server-pconfig.x86_64-3.1.0.xml | 31 +
...u-Icelake-Server-pconfig.x86_64-latest.xml | 31 +
tests/qemuxml2xmltest.c | 3 +
29 files changed, 1555 insertions(+), 11 deletions(-)
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-enabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server.json
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server.sig
create mode 100644 tests/cputestdata/x86_64-cpuid-Ice-Lake-Server.xml
create mode 100644 tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args
create mode 100644 tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.xml
create mode 100644 tests/qemuxml2xmloutdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.xml
create mode 100644 tests/qemuxml2xmloutdata/cpu-Icelake-Server-pconfig.x86_64-latest.xml
--
2.24.0
5 years
[libvirt] [PATCH 0/2] First round of out-of-tree build fixes
by Michal Privoznik
Some low hanging fruit here.
There are more serious issues that I yet have to figure out:
1) docs/ is broken. Just open any site from your build directory. Our
main.js lives in the source dir but we are trying to load it relative to
build dir
2) Generation of acl.html is broken - it assumes aclperms.htmlinc file
lives under $srcdir which is not true anymore => page that's generated
is useless
3) I've tried to update Gentoo live ebuild, but it failed to compile:
Making all in src
make[2]: Entering directory '/var/tmp/portage/app-emulation/libvirt-9999/work/libvirt-9999_build/src'
...
/usr/bin/perl /var/tmp/portage/app-emulation/libvirt-9999/work/libvirt-9999/src/access/genpolkit.pl < /var/tmp/portage/app-emulation/libvirt-9999/work/libvirt-9999/src/access/viraccessperm.h > access/org.libvirt.api.policy || rm -f access/org.libvirt.api.policy
/usr/bin/perl -w /var/tmp/portage/app-emulation/libvirt-9999/work/libvirt-9999/src/rpc/gendispatch.pl --mode=aclheader \
remote REMOTE /var/tmp/portage/app-emulation/libvirt-9999/work/libvirt-9999/src/remote/remote_protocol.x \
> access/viraccessapicheck.h
/bin/sh: access/org.libvirt.api.policy: No such file or directory
The libvirt-9999_build/src/access dir doesn't exist (I'm surprised it
wasn't created automatically by autotools since src/ was). I'll have to
investigate further.
Michal Prívozník (2):
src: Make check-aclrules work again
make check-driverimpls work again
src/Makefile.am | 7 ++-----
src/bhyve/Makefile.inc.am | 4 ++--
src/esx/Makefile.inc.am | 2 +-
src/hyperv/Makefile.inc.am | 2 +-
src/interface/Makefile.inc.am | 4 ++--
src/libxl/Makefile.inc.am | 4 ++--
src/lxc/Makefile.inc.am | 4 ++--
src/network/Makefile.inc.am | 4 ++--
src/node_device/Makefile.inc.am | 8 ++++----
src/nwfilter/Makefile.inc.am | 4 ++--
src/openvz/Makefile.inc.am | 2 +-
src/phyp/Makefile.inc.am | 2 +-
src/qemu/Makefile.inc.am | 4 ++--
src/remote/Makefile.inc.am | 2 +-
src/secret/Makefile.inc.am | 4 ++--
src/storage/Makefile.inc.am | 4 ++--
src/test/Makefile.inc.am | 2 +-
src/vbox/Makefile.inc.am | 4 ++--
src/vmware/Makefile.inc.am | 2 +-
src/vz/Makefile.inc.am | 4 ++--
20 files changed, 35 insertions(+), 38 deletions(-)
--
2.23.0
5 years
[libvirt] [PATCH] storage: Don't get src in each loop since src is not changed
by 李义
The src of pool is not changed in each loop,
so don't VIR_FREE(src) and get when next iteration.
Signed-off-by: Yi Li <yili(a)winhong.com>
---
src/storage/storage_backend_fs.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 02b8248..27c1098 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -258,10 +258,10 @@
virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool)
goto cleanup;
}
- while ((getmntent_r(mtab, &ent, buf, sizeof(buf))) != NULL) {
- if (!(src = virStorageBackendFileSystemGetPoolSource(pool)))
- goto cleanup;
+ if ((src = virStorageBackendFileSystemGetPoolSource(pool)) == NULL)
+ goto cleanup;
+ while ((getmntent_r(mtab, &ent, buf, sizeof(buf))) != NULL) {
/* compare both mount destinations and sources to be sure the mounted
* FS pool is really the one we're looking for
*/
@@ -273,8 +273,6 @@
virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool)
ret = 1;
goto cleanup;
}
-
- VIR_FREE(src);
}
ret = 0;
--
2.7.5
5 years
[libvirt] [PATCH 0/4] consolidate cgroup code that is duplicated between
by Mao Zhongyi
Both QEMU and LXC drivers have some duplicate code when
dealing with cgroups, this serials mainly consolidate the
same chunk of src/qemu/qemu_cgroup.c and src/lxc/lxc_cgroup.c
into src/util/cgroup.c.
Mao Zhongyi (4):
lxc: remove duplicate header files
qemu: remove duplicate header files
util: consolidate QEMU and LXC block io related duplicate code
util: consolidate QEMU and LXC memory related duplicate code
src/libvirt_private.syms | 2 +
src/lxc/lxc_cgroup.c | 85 +------------------------------------
src/qemu/qemu_cgroup.c | 62 +--------------------------
src/util/vircgroup.c | 91 ++++++++++++++++++++++++++++++++++++++++
src/util/vircgroup.h | 4 ++
5 files changed, 101 insertions(+), 143 deletions(-)
--
2.17.1
5 years
[libvirt] [dbus PATCH] meson: fix construction of data directories
by Pavel Hrdina
We need to use prefix for all directories and there is no need to check
if the user provided path starts with '/' as that is done automatically
by the join_paths() function or '/' operator.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
meson.build | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/meson.build b/meson.build
index 472e4e2..b293b8c 100644
--- a/meson.build
+++ b/meson.build
@@ -9,12 +9,30 @@ project(
],
)
+prefix = get_option('prefix')
+datadir = prefix / get_option('datadir')
+sbindir = prefix / get_option('sbindir')
+
+opt_dirs = [
+ 'dbus_interfaces',
+ 'dbus_services',
+ 'dbus_system_services',
+ 'dbus_system_policies',
+ 'polkit_rules',
+]
+
+foreach opt_dir : opt_dirs
+ value = get_option(opt_dir)
+ varname = '@0@_dir'.format(opt_dir)
+ set_variable(varname, datadir / value)
+endforeach
+
conf = configuration_data()
conf.set('MESON_VERSION', '0.49.0')
conf.set('PACKAGE', meson.project_name())
conf.set('VERSION', meson.project_version())
conf.set('build_root', meson.build_root())
-conf.set('sbindir', get_option('sbindir'))
+conf.set('sbindir', sbindir)
conf.set('source_root', meson.source_root())
@@ -40,24 +58,6 @@ git = run_command('test', '-d', '.git').returncode() == 0
conf.set('SYSTEM_USER', get_option('system_user'))
-opt_dirs = [
- 'dbus_interfaces',
- 'dbus_services',
- 'dbus_system_services',
- 'dbus_system_policies',
- 'polkit_rules',
-]
-
-foreach opt_dir : opt_dirs
- value = get_option(opt_dir)
- varname = '@0@_dir'.format(opt_dir)
- if opt_dir.startswith('/')
- set_variable(varname, value)
- else
- set_variable(varname, join_paths(get_option('datadir'), value))
- endif
-endforeach
-
# Compile flags
--
2.21.0
5 years