[PATCH 0/6] qemu: snapshot: Refactors prior to introduction of <transient> disk support
by Peter Krempa
We'll be installing overlays on top of <transient> disks via the
snapshot code. Prepare some aspects.
Peter Krempa (6):
qemu: snapshot: Rename 'qemuSnapshotCreateDiskActive' to
'qemuSnapshotCreateActiveExternalDisks'
qemuSnapshotDiskUpdateSource: Extract 'driver' and 'blockdev' from
'vm'
qemuSnapshotDiskPrepare/Cleanup: simplify passing of 'driver' and
'blockdev'
qemu: snapshot: Introduce qemuSnapshotDiskContext
qemuSnapshotCreateActiveExternalDisks: Extract actual snapshot
creation to 'qemuSnapshotDiskCreate'
qemuSnapshotDiskPrepare: rename to
qemuSnapshotDiskPrepareActiveExternal
src/qemu/qemu_snapshot.c | 215 ++++++++++++++++++++++-----------------
1 file changed, 124 insertions(+), 91 deletions(-)
--
2.26.2
4 years, 1 month
[libvirt PATCH 00/14] Various cleanups
by Ján Tomko
Some reported by cppcheck, maybe even Coverity, the rest
I noticed while looking at the code.
Ján Tomko (14):
tools: virshCheckpointListCollect: remove unused names
vbox: remove VBoxCGlueTerm
vbox: StartMachine: overwrite ret less often
Remove pointless assignments
Remove pointless initializations
virsh: virshStreamSourceSkip: remove unused 'off'
Do not check whether unsigned variables are negative
libxl: remove unused 'bits' from struct guest_arch
api: virDomainMemoryStats: use 'ret' variable
storage: createFileDir: remove useless 'err' variable
storage: createFileDir: use less ternary operators
vbox: reduce variable scope in vboxDumpStorageControllers
storage: storageBackendWipeLocal: reduce variable scope
Reduce scope of some variables
examples/c/admin/logging.c | 2 +-
src/libvirt-domain.c | 8 ++---
src/libvirt-host.c | 4 +--
src/libxl/libxl_capabilities.c | 1 -
src/libxl/libxl_driver.c | 2 +-
src/node_device/node_device_driver.c | 3 +-
src/openvz/openvz_driver.c | 2 +-
src/storage/storage_backend_mpath.c | 3 +-
src/storage/storage_util.c | 33 ++++++++++----------
src/test/test_driver.c | 2 +-
src/vbox/vbox_XPCOMCGlue.c | 19 ------------
src/vbox/vbox_XPCOMCGlue.h | 1 -
src/vbox/vbox_common.c | 46 +++++++++++++---------------
tests/virnumamock.c | 2 +-
tests/virrandommock.c | 2 +-
tools/virsh-checkpoint.c | 5 ---
tools/virsh-pool.c | 3 +-
tools/virsh-util.c | 3 +-
18 files changed, 53 insertions(+), 88 deletions(-)
--
2.26.2
4 years, 1 month
[PATCH] tests: Adjust libxlxml2domconfigtest to work with Xen < 4.10
by Jim Fehlig
Commit f253dc90f5 introduced a test regression in environments with
Xen < 4.10. The logic in libxl_conf.c correctly maps ACPI and APIC
from virDomainObj to libxl_domain_conf based on
LIBXL_HAVE_BUILDINFO_APIC, but the tests did not account for the
different libxl_domain_conf JSON representations.
One approach to fixing the test regression is to duplicate JSON test
data files, having one set for Xen <= 4.9 and another for Xen 4.10
and greater. To avoid duplicate data files, this patch takes the
approach of modifying the libxl_domain_conf object based on
LIBXL_HAVE_BUILDINFO_APIC, before retrieving the JSON representation.
It allows using the same test data files for all supported versions
of Xen by adjusting the intermediate form of libxl_domain_conf object
as needed.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
tests/libxlxml2domconfigtest.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c
index c4d5db9a7b..d58be1211b 100644
--- a/tests/libxlxml2domconfigtest.c
+++ b/tests/libxlxml2domconfigtest.c
@@ -97,6 +97,20 @@ testCompareXMLToDomConfig(const char *xmlfile,
"Failed to create libxl_domain_config from JSON doc");
goto cleanup;
}
+
+ /*
+ * In order to have common test files between Xen 4.9 and newer Xen versions,
+ * tweak the expected libxl_domain_config object before getting a json
+ * representation.
+ */
+# ifndef LIBXL_HAVE_BUILDINFO_APIC
+ if (expectconfig.c_info.type == LIBXL_DOMAIN_TYPE_HVM) {
+ libxl_defbool_unset(&expectconfig.b_info.acpi);
+ libxl_defbool_set(&expectconfig.b_info.u.hvm.apic, true);
+ libxl_defbool_set(&expectconfig.b_info.u.hvm.acpi, true);
+ }
+# endif
+
if (!(expectjson = libxl_domain_config_to_json(cfg->ctx, &expectconfig))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
"Failed to retrieve JSON doc for libxl_domain_config");
--
2.28.0
4 years, 1 month
[libvirt PATCH v2] qemu: substitute missing model name for host-passthrough
by Tim Wiederhake
From: Collin Walling <walling(a)linux.ibm.com>
Before:
$ uname -m
s390x
$ cat passthrough-cpu.xml
<cpu check="none" mode="host-passthrough" />
$ virsh hypervisor-cpu-compare passthrough-cpu.xml
error: Failed to compare hypervisor CPU with passthrough-cpu.xml
error: internal error: unable to execute QEMU command 'query-cpu-model-comp
arison': Invalid parameter type for 'modelb.name', expected: string
After:
$ virsh hypervisor-cpu-compare passthrough-cpu.xml
CPU described in passthrough-cpu.xml is identical to the CPU provided by hy
pervisor on the host
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/qemu/qemu_driver.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ae715c01d7..1cecef01f7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12336,6 +12336,15 @@ qemuConnectCompareHypervisorCPU(virConnectPtr conn,
if (virCPUDefParseXMLString(xmlCPU, VIR_CPU_TYPE_AUTO, &cpu) < 0)
goto cleanup;
+ if (!cpu->model) {
+ if (cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH) {
+ cpu->model = g_strdup("host");
+ } else {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("cpu parameter is missing a model name"));
+ goto cleanup;
+ }
+ }
ret = qemuConnectCPUModelComparison(qemuCaps, cfg->libDir,
cfg->user, cfg->group,
hvCPU, cpu, failIncompatible);
--
2.26.2
4 years, 1 month
[PATCH] apparmor: Allow /usr/libexec for libxl-save-helper and pygrub
by Jim Fehlig
Like other distros, openSUSE Tumbleweed recently changed libexecdir from
/usr/lib to /usr/libexec. Add it as an allowed path for libxl-save-helper
and pygrub.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
I considered including /usr/lib64, but I don't think any distros are
installing xen libexecdir targets to /usr/lib64. Happy to include it
if I'm wrong :-).
src/security/apparmor/usr.sbin.libvirtd.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/security/apparmor/usr.sbin.libvirtd.in b/src/security/apparmor/usr.sbin.libvirtd.in
index f2030764cd..bf4563e1e8 100644
--- a/src/security/apparmor/usr.sbin.libvirtd.in
+++ b/src/security/apparmor/usr.sbin.libvirtd.in
@@ -86,8 +86,8 @@ profile libvirtd @sbindir@/libvirtd flags=(attach_disconnected) {
/{usr/,}lib/udev/scsi_id PUx,
/usr/{lib,lib64}/xen-common/bin/xen-toolstack PUx,
/usr/{lib,lib64}/xen/bin/* Ux,
- /usr/lib/xen-*/bin/libxl-save-helper PUx,
- /usr/lib/xen-*/bin/pygrub PUx,
+ /usr/{lib,libexec}/xen-*/bin/libxl-save-helper PUx,
+ /usr/{lib,libexec}/xen-*/bin/pygrub PUx,
/usr/{lib,lib64,lib/qemu,libexec}/vhost-user-gpu PUx,
/usr/{lib,lib64,lib/qemu,libexec}/virtiofsd PUx,
--
2.28.0
4 years, 1 month
[PATCH] RFC: fix error message in virMigrate3 if connection is broken
by Nikolay Shirokovskiy
Currently virDomainMigrate3 reports "this function is not supported by the
connection driver: virDomainMigrate3" if connection to destination for example
is broken. This is a bit misleading.
This is a result of we treat errors as unsupported feature in
VIR_DRV_SUPPORTS_FEATURE macro. So let's handle errors instead. In order to
keep logic clean as before there are new helper functions
virDrvSupportsFeature/virDrvNSupportsFeature. They allow to keep if/else if
structure of feature tests.
I guess all the other occurences of VIR_DRV_SUPPORTS_FEATURE need to be
replaced with one these new helper functions so that we detect error early and
not have issues similar to virDomainMigrate3. I'm going to fix the other
places if this RFC is approved.
---
src/datatypes.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++
src/datatypes.h | 7 +++++
src/libvirt-domain.c | 76 +++++++++++++++++++++++++++++++---------------------
3 files changed, 123 insertions(+), 30 deletions(-)
diff --git a/src/datatypes.c b/src/datatypes.c
index 1db38c5..3fb71f4 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -1257,3 +1257,73 @@ virAdmClientDispose(void *obj)
virObjectUnref(clt->srv);
}
+
+
+/*
+ * Tests if feature is supported by connection. If testing failed
+ * due to error then function returns true as well and set @err flag
+ * to true. Thus positive result should be checked for an error.
+ * If @err is already set to true then no checking is done and
+ * the function returns true immediately so that previous error
+ * is not overwritten.
+ *
+ * Returns:
+ * true feature is supported or testing hit error
+ * false feature is not supported
+ */
+bool
+virDrvSupportsFeature(virConnectPtr conn,
+ virDrvFeature feature,
+ bool *err)
+{
+ int rc;
+
+ if (*err)
+ return true;
+
+ if (!conn->driver->connectSupportsFeature)
+ return false;
+
+ if ((rc = conn->driver->connectSupportsFeature(conn, feature)) < 0) {
+ *err = true;
+ return true;
+ }
+
+ return rc > 0 ? true : false;
+}
+
+
+/*
+ * Tests if feature is NOT supported by connection. If testing failed
+ * due to error then function returns true as well and set @err flag
+ * to true. Thus positive result should be checked for an error.
+ * If @err is already set to true then no checking is done and
+ * the function returns true immediately so that previous error
+ * is not overwritten.
+ *
+ * Note that this function is not merge negation of virDrvSupportsFeature.
+ *
+ * Returns:
+ * true feature is not supported or testing hit error
+ * false feature is supported
+ */
+bool
+virDrvNSupportsFeature(virConnectPtr conn,
+ virDrvFeature feature,
+ bool *err)
+{
+ int rc;
+
+ if (*err)
+ return true;
+
+ if (!conn->driver->connectSupportsFeature)
+ return true;
+
+ if ((rc = conn->driver->connectSupportsFeature(conn, feature)) < 0) {
+ *err = true;
+ return true;
+ }
+
+ return rc > 0 ? false : true;
+}
diff --git a/src/datatypes.h b/src/datatypes.h
index ade3779..e468d92 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -871,3 +871,10 @@ int virAdmConnectCloseCallbackDataRegister(virAdmConnectCloseCallbackDataPtr cbd
virFreeCallback freecb);
int virAdmConnectCloseCallbackDataUnregister(virAdmConnectCloseCallbackDataPtr cbdata,
virAdmConnectCloseFunc cb);
+
+bool virDrvSupportsFeature(virConnectPtr conn,
+ virDrvFeature feature,
+ bool *err);
+bool virDrvNSupportsFeature(virConnectPtr conn,
+ virDrvFeature feature,
+ bool *err);
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index cde86c7..f4f626a 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -3846,6 +3846,7 @@ virDomainMigrate3(virDomainPtr domain,
const char *dname = NULL;
const char *dxml = NULL;
unsigned long long bandwidth = 0;
+ bool err = false;
VIR_DOMAIN_DEBUG(domain, "dconn=%p, params=%p, nparms=%u flags=0x%x",
dconn, params, nparams, flags);
@@ -3878,18 +3879,20 @@ virDomainMigrate3(virDomainPtr domain,
}
if (flags & VIR_MIGRATE_OFFLINE) {
- if (!VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATION_OFFLINE)) {
- virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("offline migration is not supported by "
- "the source host"));
+ if (virDrvNSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_OFFLINE, &err)) {
+ if (!err)
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("offline migration is not supported by "
+ "the source host"));
goto error;
}
- if (!VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_OFFLINE)) {
- virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("offline migration is not supported by "
- "the destination host"));
+ if (virDrvNSupportsFeature(dconn,
+ VIR_DRV_FEATURE_MIGRATION_OFFLINE, &err)) {
+ if (!err)
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("offline migration is not supported by "
+ "the destination host"));
goto error;
}
}
@@ -3900,20 +3903,25 @@ virDomainMigrate3(virDomainPtr domain,
* migration from newer source to an older destination that
* rejects the flag. */
if (flags & VIR_MIGRATE_CHANGE_PROTECTION &&
- !VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION)) {
- virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("cannot enforce change protection"));
+ virDrvNSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION,
+ &err)) {
+ if (!err)
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("cannot enforce change protection"));
goto error;
}
flags &= ~VIR_MIGRATE_CHANGE_PROTECTION;
/* Prefer extensible API but fall back to older migration APIs if params
* only contains parameters which were supported by the older API. */
- if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATION_PARAMS) &&
- VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_PARAMS)) {
+ if (virDrvSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_PARAMS, &err) &&
+ virDrvSupportsFeature(dconn,
+ VIR_DRV_FEATURE_MIGRATION_PARAMS, &err)) {
+ if (err)
+ goto error;
+
VIR_DEBUG("Using migration protocol 3 with extensible parameters");
ddomain = virDomainMigrateVersion3Params(domain, dconn, params,
nparams, flags);
@@ -3939,17 +3947,22 @@ virDomainMigrate3(virDomainPtr domain,
goto error;
}
- if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATION_V3) &&
- VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_V3)) {
+ if (virDrvSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_V3, &err) &&
+ virDrvSupportsFeature(dconn, VIR_DRV_FEATURE_MIGRATION_V3, &err)) {
+ if (err)
+ goto error;
+
VIR_DEBUG("Using migration protocol 3");
ddomain = virDomainMigrateVersion3(domain, dconn, dxml, flags,
dname, uri, bandwidth);
- } else if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATION_V2) &&
- VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_V2)) {
+ } else if (virDrvSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_V2, &err) &&
+ virDrvSupportsFeature(dconn,
+ VIR_DRV_FEATURE_MIGRATION_V2, &err)) {
+ if (err)
+ goto error;
+
VIR_DEBUG("Using migration protocol 2");
if (dxml) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
@@ -3959,10 +3972,13 @@ virDomainMigrate3(virDomainPtr domain,
}
ddomain = virDomainMigrateVersion2(domain, dconn, flags,
dname, uri, bandwidth);
- } else if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
- VIR_DRV_FEATURE_MIGRATION_V1) &&
- VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_V1)) {
+ } else if (virDrvSupportsFeature(domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_V1, &err) &&
+ virDrvSupportsFeature(dconn,
+ VIR_DRV_FEATURE_MIGRATION_V1, &err)) {
+ if (err)
+ goto error;
+
VIR_DEBUG("Using migration protocol 1");
if (dxml) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
--
1.8.3.1
4 years, 1 month
[PATCH] libxl: use b_info->{acpi,acpi} when available
by Marek Marczykowski-Górecki
b_info->u.hvm.{acpi,apic} are deprecated. But also, on recent libxl
version (4.14) the old one seems to be broken. While libxl part should
be fixed too, update the usage here and at some point drop support for
the old version.
b_info->acpi was added in Xen 4.8
b_info->apic was added in Xen 4.10
Xen 4.10 is the oldest version that still has security support (until
December 2020).
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
src/libxl/libxl_conf.c | 13 +++++++++++++
tests/libxlxml2domconfigdata/basic-hvm.json | 4 ++--
tests/libxlxml2domconfigdata/cpu-shares-hvm.json | 4 ++--
.../libxlxml2domconfigdata/fullvirt-acpi-slic.json | 4 ++--
.../fullvirt-cpuid-legacy-nest.json | 4 ++--
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 4 ++--
.../max-eventchannels-hvm.json | 4 ++--
tests/libxlxml2domconfigdata/max-gntframes-hvm.json | 4 ++--
tests/libxlxml2domconfigdata/moredevs-hvm.json | 4 ++--
.../libxlxml2domconfigdata/variable-clock-hvm.json | 4 ++--
.../vnuma-hvm-legacy-nest.json | 4 ++--
tests/libxlxml2domconfigdata/vnuma-hvm.json | 4 ++--
12 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index befd5eb965..5b729a019a 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -508,12 +508,25 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
libxl_defbool_set(&b_info->u.hvm.pae,
def->features[VIR_DOMAIN_FEATURE_PAE] ==
VIR_TRISTATE_SWITCH_ON);
+#ifdef LIBXL_HAVE_BUILDINFO_APIC
+ libxl_defbool_set(&b_info->apic,
+ def->features[VIR_DOMAIN_FEATURE_APIC] ==
+ VIR_TRISTATE_SWITCH_ON);
+ /*
+ * Strictly speaking b_info->acpi was introduced earlier (Xen 4.8), but
+ * there is no separate #define in libxl.h.
+ */
+ libxl_defbool_set(&b_info->acpi,
+ def->features[VIR_DOMAIN_FEATURE_ACPI] ==
+ VIR_TRISTATE_SWITCH_ON);
+#else
libxl_defbool_set(&b_info->u.hvm.apic,
def->features[VIR_DOMAIN_FEATURE_APIC] ==
VIR_TRISTATE_SWITCH_ON);
libxl_defbool_set(&b_info->u.hvm.acpi,
def->features[VIR_DOMAIN_FEATURE_ACPI] ==
VIR_TRISTATE_SWITCH_ON);
+#endif
/* copy SLIC table path to acpi_firmware */
if (def->os.slic_table)
diff --git a/tests/libxlxml2domconfigdata/basic-hvm.json b/tests/libxlxml2domconfigdata/basic-hvm.json
index ccd5853854..87f8cb7d8a 100644
--- a/tests/libxlxml2domconfigdata/basic-hvm.json
+++ b/tests/libxlxml2domconfigdata/basic-hvm.json
@@ -21,10 +21,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
diff --git a/tests/libxlxml2domconfigdata/cpu-shares-hvm.json b/tests/libxlxml2domconfigdata/cpu-shares-hvm.json
index 2e647eada2..2aa97e88c5 100644
--- a/tests/libxlxml2domconfigdata/cpu-shares-hvm.json
+++ b/tests/libxlxml2domconfigdata/cpu-shares-hvm.json
@@ -21,10 +21,10 @@
"sched_params": {
"weight": 1500
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
diff --git a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
index f16b4a971a..a2d46797aa 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json
@@ -14,10 +14,10 @@
"shadow_memkb": 5656,
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"acpi_firmware": "/path/to/slic.dat",
"nographic": "True",
"vga": {
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
index 0944476151..6290655c20 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
@@ -21,10 +21,10 @@
],
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"nested_hvm": "False",
"nographic": "True",
"vga": {
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
index ddc423bca7..811a4f0ac7 100644
--- a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
@@ -22,10 +22,10 @@
"sched_params": {
},
"nested_hvm": "False",
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"nographic": "True",
"vga": {
"kind": "none"
diff --git a/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json b/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json
index d5b351beb5..4a5b0ca65f 100644
--- a/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json
+++ b/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json
@@ -22,10 +22,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
diff --git a/tests/libxlxml2domconfigdata/max-gntframes-hvm.json b/tests/libxlxml2domconfigdata/max-gntframes-hvm.json
index ef602f09fc..2883d057ff 100644
--- a/tests/libxlxml2domconfigdata/max-gntframes-hvm.json
+++ b/tests/libxlxml2domconfigdata/max-gntframes-hvm.json
@@ -22,10 +22,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
diff --git a/tests/libxlxml2domconfigdata/moredevs-hvm.json b/tests/libxlxml2domconfigdata/moredevs-hvm.json
index 474aa2cef6..58cf32a8d4 100644
--- a/tests/libxlxml2domconfigdata/moredevs-hvm.json
+++ b/tests/libxlxml2domconfigdata/moredevs-hvm.json
@@ -23,10 +23,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"hpet": "True",
"vga": {
"kind": "cirrus"
diff --git a/tests/libxlxml2domconfigdata/variable-clock-hvm.json b/tests/libxlxml2domconfigdata/variable-clock-hvm.json
index 69be9c64cb..9a25d51da2 100644
--- a/tests/libxlxml2domconfigdata/variable-clock-hvm.json
+++ b/tests/libxlxml2domconfigdata/variable-clock-hvm.json
@@ -23,10 +23,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json
index 3b2fc5f40f..6cda8d0252 100644
--- a/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json
+++ b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json
@@ -109,10 +109,10 @@
"sched_params": {
},
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"nested_hvm": "True",
"vga": {
"kind": "cirrus"
diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm.json b/tests/libxlxml2domconfigdata/vnuma-hvm.json
index 02c10a9deb..f578ccd3d3 100644
--- a/tests/libxlxml2domconfigdata/vnuma-hvm.json
+++ b/tests/libxlxml2domconfigdata/vnuma-hvm.json
@@ -110,10 +110,10 @@
},
"nested_hvm": "True",
+ "apic": "True",
+ "acpi": "True",
"type.hvm": {
"pae": "True",
- "apic": "True",
- "acpi": "True",
"vga": {
"kind": "cirrus"
},
--
2.25.4
4 years, 2 months
Help on meson build
by Wei Wang
Hi folks,
I'm trying to build libvirt using meson with the latest upstream libvirt,
but the compilation fails:
(followed on https://libvirt.org/compiling.html, not sure if any
dependencies are missed)
FAILED: src/util/libvirt_util.a.p/glibcompat.c.o
....
In file included from ../src/util/glibcompat.c:19:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
FAILED: src/util/libvirt_util.a.p/virfirmware.c.o
In file included from ../src/util/virarch.c:22:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
FAILED: src/util/libvirt_util.a.p/viraudit.c.o
In file included from ../src/util/viraudit.c:22:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
Any help is appreciated.
Thanks,
Wei
4 years, 2 months
[PATCH v2 0/6] qemu: Use memory-backend-* for regular guest memory
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-September/msg00023.html
diff to v1:
- I've dropped the capability (patch 5/7 in the original set) and am
relying on qemu providing default-ram-id.
I've tested migration from a daemon with these patches to a daemon
without and also vice versa and it worked.
Michal Prívozník (6):
qemuBuildMemoryBackendProps: Move @prealloc setting to backend
agnostic part
qemuBuildMemoryBackendProps: Respect
//memoryBacking/allocation/@mode=immediate
qemuBuildMemoryBackendProps: Prealloc mem for memfd backend
qemuBuildMemoryBackendProps: Fix const correctness
qemu: Track default-ram-id machine attribute
qemu: Use memory-backend-* for regular guest memory
src/qemu/qemu_capabilities.c | 35 +++-
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_capspriv.h | 3 +-
src/qemu/qemu_command.c | 96 +++++++--
src/qemu/qemu_command.h | 4 +-
src/qemu/qemu_monitor.c | 1 +
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 11 +
.../caps_5.2.0.x86_64.xml | 196 +++++++++---------
.../blkdeviotune-group-num.x86_64-latest.args | 3 +-
...blkdeviotune-max-length.x86_64-latest.args | 3 +-
.../blkdeviotune-max.x86_64-latest.args | 3 +-
.../channel-unix-guestfwd.x86_64-latest.args | 3 +-
.../console-virtio-unix.x86_64-latest.args | 3 +-
.../controller-virtio-scsi.x86_64-latest.args | 3 +-
...-Icelake-Server-pconfig.x86_64-latest.args | 3 +-
.../cpu-translation.x86_64-latest.args | 3 +-
.../cputune-cpuset-big-id.x86_64-latest.args | 3 +-
.../disk-aio-io_uring.x86_64-latest.args | 3 +-
.../disk-aio.x86_64-latest.args | 3 +-
...-backing-chains-noindex.x86_64-latest.args | 3 +-
.../disk-cache.x86_64-latest.args | 4 +-
.../disk-cdrom-bus-other.x86_64-latest.args | 3 +-
...m-empty-network-invalid.x86_64-latest.args | 3 +-
.../disk-cdrom-network.x86_64-latest.args | 3 +-
.../disk-cdrom-tray.x86_64-latest.args | 3 +-
.../disk-cdrom.x86_64-latest.args | 3 +-
.../disk-copy_on_read.x86_64-latest.args | 3 +-
.../disk-detect-zeroes.x86_64-latest.args | 3 +-
.../disk-discard.x86_64-latest.args | 3 +-
.../disk-error-policy.x86_64-latest.args | 3 +-
.../disk-floppy-q35-2_11.x86_64-latest.args | 4 +-
.../disk-floppy-q35-2_9.x86_64-latest.args | 4 +-
.../disk-floppy.x86_64-latest.args | 3 +-
.../disk-network-gluster.x86_64-latest.args | 3 +-
.../disk-network-http.x86_64-latest.args | 3 +-
.../disk-network-iscsi.x86_64-latest.args | 3 +-
.../disk-network-nbd.x86_64-latest.args | 3 +-
.../disk-network-rbd.x86_64-latest.args | 3 +-
.../disk-network-sheepdog.x86_64-latest.args | 3 +-
...isk-network-source-auth.x86_64-latest.args | 3 +-
...isk-network-tlsx509-nbd.x86_64-latest.args | 3 +-
.../disk-nvme.x86_64-latest.args | 3 +-
.../disk-readonly-disk.x86_64-latest.args | 3 +-
.../disk-scsi-device-auto.x86_64-latest.args | 3 +-
.../disk-scsi.x86_64-latest.args | 3 +-
.../disk-shared.x86_64-latest.args | 3 +-
.../disk-slices.x86_64-latest.args | 3 +-
...irtio-scsi-reservations.x86_64-latest.args | 3 +-
.../eoi-disabled.x86_64-latest.args | 3 +-
.../eoi-enabled.x86_64-latest.args | 3 +-
.../floppy-drive-fat.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/fs9p.x86_64-latest.args | 3 +-
.../genid-auto.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/genid.x86_64-latest.args | 3 +-
...egl-headless-rendernode.x86_64-latest.args | 3 +-
.../graphics-egl-headless.x86_64-latest.args | 3 +-
...pice-gl-auto-rendernode.x86_64-latest.args | 3 +-
...graphics-vnc-tls-secret.x86_64-latest.args | 3 +-
.../graphics-vnc-tls.x86_64-latest.args | 3 +-
...tdev-mdev-display-ramfb.x86_64-latest.args | 3 +-
...play-spice-egl-headless.x86_64-latest.args | 3 +-
...ev-display-spice-opengl.x86_64-latest.args | 3 +-
...isplay-vnc-egl-headless.x86_64-latest.args | 3 +-
...ostdev-mdev-display-vnc.x86_64-latest.args | 3 +-
.../hostdev-scsi-lsi.x86_64-latest.args | 3 +-
...ostdev-scsi-virtio-scsi.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/hugepages-memaccess.args | 30 +--
.../hugepages-memaccess2.args | 12 +-
.../hugepages-numa-nodeset-part.args | 5 +-
.../hugepages-numa-nodeset.args | 20 +-
.../hugepages-nvdimm.x86_64-latest.args | 15 +-
tests/qemuxml2argvdata/hugepages-shared.args | 24 +--
.../hyperv-off.x86_64-latest.args | 3 +-
.../hyperv-panic.x86_64-latest.args | 3 +-
.../hyperv-stimer-direct.x86_64-latest.args | 3 +-
.../hyperv.x86_64-latest.args | 3 +-
.../intel-iommu-aw-bits.x86_64-latest.args | 4 +-
...ntel-iommu-caching-mode.x86_64-latest.args | 4 +-
...ntel-iommu-device-iotlb.x86_64-latest.args | 4 +-
.../intel-iommu-eim.x86_64-latest.args | 4 +-
.../intel-iommu.x86_64-latest.args | 3 +-
...threads-virtio-scsi-pci.x86_64-latest.args | 3 +-
.../kvmclock+eoi-disabled.x86_64-latest.args | 3 +-
...luks-disks-source-qcow2.x86_64-latest.args | 4 +-
...memory-default-hugepage.x86_64-latest.args | 8 +-
.../memfd-memory-numa.x86_64-latest.args | 8 +-
.../memory-hotplug-dimm-addr.args | 6 +-
.../qemuxml2argvdata/memory-hotplug-dimm.args | 6 +-
...y-hotplug-nvdimm-access.x86_64-latest.args | 8 +-
...ry-hotplug-nvdimm-align.x86_64-latest.args | 8 +-
...ry-hotplug-nvdimm-label.x86_64-latest.args | 8 +-
...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 8 +-
...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 2 +-
...hotplug-nvdimm-readonly.x86_64-latest.args | 8 +-
.../memory-hotplug-nvdimm.x86_64-latest.args | 6 +-
.../mlock-off.x86_64-latest.args | 3 +-
.../mlock-on.x86_64-latest.args | 3 +-
.../net-vhostuser.x86_64-latest.args | 3 +-
.../numatune-hmat.x86_64-latest.args | 4 +-
.../os-firmware-bios.x86_64-latest.args | 4 +-
...os-firmware-efi-secboot.x86_64-latest.args | 4 +-
.../os-firmware-efi.x86_64-latest.args | 4 +-
.../qemuxml2argvdata/pages-dimm-discard.args | 4 +-
.../parallel-unix-chardev.x86_64-latest.args | 3 +-
...cie-root-port-nohotplug.x86_64-latest.args | 3 +-
.../pv-spinlock-disabled.x86_64-latest.args | 3 +-
.../pv-spinlock-enabled.x86_64-latest.args | 3 +-
.../qemu-ns.x86_64-latest.args | 3 +-
.../serial-unix-chardev.x86_64-latest.args | 3 +-
...rtcard-passthrough-unix.x86_64-latest.args | 3 +-
.../tpm-emulator-tpm2-enc.x86_64-latest.args | 4 +-
.../tpm-emulator-tpm2.x86_64-latest.args | 4 +-
.../tpm-emulator.x86_64-latest.args | 4 +-
.../tpm-passthrough-crb.x86_64-latest.args | 4 +-
.../tpm-passthrough.x86_64-latest.args | 4 +-
.../tseg-explicit-size.x86_64-latest.args | 4 +-
.../usb-redir-unix.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/user-aliases.args | 16 +-
...vhost-user-fs-fd-memory.x86_64-latest.args | 4 +-
...vhost-user-fs-hugepages.x86_64-latest.args | 10 +-
...host-user-gpu-secondary.x86_64-latest.args | 3 +-
.../vhost-user-vga.x86_64-latest.args | 3 +-
.../vhost-vsock-auto.x86_64-latest.args | 4 +-
.../vhost-vsock.x86_64-latest.args | 3 +-
...eo-bochs-display-device.x86_64-latest.args | 3 +-
...video-qxl-device-vram64.x86_64-latest.args | 3 +-
...o-qxl-sec-device-vram64.x86_64-latest.args | 3 +-
...eo-ramfb-display-device.x86_64-latest.args | 3 +-
.../virtio-9p-multidevs.x86_64-latest.args | 3 +-
...virtio-non-transitional.x86_64-latest.args | 3 +-
...-options-controller-ats.x86_64-latest.args | 3 +-
...ptions-controller-iommu.x86_64-latest.args | 3 +-
...tions-controller-packed.x86_64-latest.args | 3 +-
...virtio-options-disk-ats.x86_64-latest.args | 3 +-
...rtio-options-disk-iommu.x86_64-latest.args | 3 +-
...tio-options-disk-packed.x86_64-latest.args | 3 +-
.../virtio-options-fs-ats.x86_64-latest.args | 3 +-
...virtio-options-fs-iommu.x86_64-latest.args | 3 +-
...irtio-options-fs-packed.x86_64-latest.args | 3 +-
...irtio-options-input-ats.x86_64-latest.args | 3 +-
...tio-options-input-iommu.x86_64-latest.args | 3 +-
...io-options-input-packed.x86_64-latest.args | 3 +-
...-options-memballoon-ats.x86_64-latest.args | 3 +-
...ptions-memballoon-iommu.x86_64-latest.args | 3 +-
...tions-memballoon-packed.x86_64-latest.args | 3 +-
.../virtio-options-net-ats.x86_64-latest.args | 3 +-
...irtio-options-net-iommu.x86_64-latest.args | 3 +-
...rtio-options-net-packed.x86_64-latest.args | 3 +-
.../virtio-options-rng-ats.x86_64-latest.args | 3 +-
...irtio-options-rng-iommu.x86_64-latest.args | 3 +-
...rtio-options-rng-packed.x86_64-latest.args | 3 +-
...irtio-options-video-ats.x86_64-latest.args | 3 +-
...tio-options-video-iommu.x86_64-latest.args | 3 +-
...io-options-video-packed.x86_64-latest.args | 3 +-
.../virtio-options.x86_64-latest.args | 3 +-
.../virtio-rng-builtin.x86_64-latest.args | 3 +-
.../virtio-rng-egd-unix.x86_64-latest.args | 3 +-
.../virtio-transitional.x86_64-latest.args | 3 +-
...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 4 +-
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 4 +-
...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 4 +-
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 4 +-
.../x86_64-pc-graphics.x86_64-latest.args | 3 +-
.../x86_64-pc-headless.x86_64-latest.args | 3 +-
.../x86_64-q35-graphics.x86_64-latest.args | 3 +-
.../x86_64-q35-headless.x86_64-latest.args | 3 +-
tests/testutilsqemu.c | 24 ++-
168 files changed, 667 insertions(+), 357 deletions(-)
--
2.26.2
4 years, 2 months