[libvirt] [PATCH] remote: Fix the build by explicitly casting the obj pointer for xdr_free
by Erik Skultety
For some reason, xdr_free uses char * instead of void * for its 2nd
argument which is passed to a custom free routine. Commit
dc54b3ec missed this detail which made the build fail on a number of
platforms. Fix it by explicitly casting the object pointer to char *
just like we do in other places throughout the code base.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Pushed under the build breaker rule.
src/remote/remote_daemon_dispatch.c | 66 ++++++++++++++---------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index c087197634..51bc055564 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -337,7 +337,7 @@ remoteRelayDomainEventLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -378,7 +378,7 @@ remoteRelayDomainEventReboot(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_reboot_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -423,7 +423,7 @@ remoteRelayDomainEventRTCChange(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_rtc_change_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -467,7 +467,7 @@ remoteRelayDomainEventWatchdog(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_watchdog_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -516,7 +516,7 @@ remoteRelayDomainEventIOError(virConnectPtr conn,
return 0;
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_io_error_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -569,7 +569,7 @@ remoteRelayDomainEventIOErrorReason(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_io_error_reason_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -643,7 +643,7 @@ remoteRelayDomainEventGraphics(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_graphics_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -691,7 +691,7 @@ remoteRelayDomainEventBlockJob(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_block_job_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -733,7 +733,7 @@ remoteRelayDomainEventControlError(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_control_error_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -797,7 +797,7 @@ remoteRelayDomainEventDiskChange(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_disk_change_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -846,7 +846,7 @@ remoteRelayDomainEventTrayChange(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_tray_change_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -888,7 +888,7 @@ remoteRelayDomainEventPMWakeup(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_pmwakeup_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -930,7 +930,7 @@ remoteRelayDomainEventPMSuspend(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_pmsuspend_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -973,7 +973,7 @@ remoteRelayDomainEventBalloonChange(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_balloon_change_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1016,7 +1016,7 @@ remoteRelayDomainEventPMSuspendDisk(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_pmsuspend_disk_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1064,7 +1064,7 @@ remoteRelayDomainEventDeviceRemoved(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_device_removed_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1105,7 +1105,7 @@ remoteRelayDomainEventBlockJob2(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_block_job_2_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1150,7 +1150,7 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_tunable_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1191,7 +1191,7 @@ remoteRelayDomainEventAgentLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_agent_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1231,7 +1231,7 @@ remoteRelayDomainEventDeviceAdded(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_device_added_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1270,7 +1270,7 @@ remoteRelayDomainEventMigrationIteration(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_migration_iteration_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1315,7 +1315,7 @@ remoteRelayDomainEventJobCompleted(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_job_completed_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1355,7 +1355,7 @@ remoteRelayDomainEventDeviceRemovalFailed(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_device_removal_failed_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1405,7 +1405,7 @@ remoteRelayDomainEventMetadataChange(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_callback_metadata_change_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1453,7 +1453,7 @@ remoteRelayDomainEventBlockThreshold(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_domain_event_block_threshold_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1521,7 +1521,7 @@ remoteRelayNetworkEventLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_network_event_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1565,7 +1565,7 @@ remoteRelayStoragePoolEventLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_storage_pool_event_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1599,7 +1599,7 @@ remoteRelayStoragePoolEventRefresh(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_storage_pool_event_refresh_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1644,7 +1644,7 @@ remoteRelayNodeDeviceEventLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_node_device_event_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1678,7 +1678,7 @@ remoteRelayNodeDeviceEventUpdate(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_node_device_event_update_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1723,7 +1723,7 @@ remoteRelaySecretEventLifecycle(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_secret_event_lifecycle_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1757,7 +1757,7 @@ remoteRelaySecretEventValueChanged(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_remote_secret_event_value_changed_msg,
- &data);
+ (char *) &data);
return -1;
}
@@ -1812,7 +1812,7 @@ remoteRelayDomainQemuMonitorEvent(virConnectPtr conn,
error:
xdr_free((xdrproc_t)xdr_qemu_domain_monitor_event_msg,
- &data);
+ (char *) &data);
return;
}
--
2.19.2
5 years, 11 months
[libvirt] [PATCH v2 0/9] util: error: Reformat error messages and add tests
by Peter Krempa
V2 fixes gettext and simplifies some parts. Patch 4/9 is new and the
last two were dropped in comparison to v1.
Peter Krempa (9):
include: error: Add enum sentinel for virErrorNumber enum
util: error: Fix error message strings to play well with additional
info
util: error: Add error message versions with info for some error codes
util: error: Reword some unused error messages
util: error: Export virErrorMsg for use in testsuite
tests: Add test for virErrorMsg message constraints
util: error: Improve docs for virErrorMsg
DO NOT PUSH: Make sure that error messages are not moved around
util: error: Put error code messages into an array
include/libvirt/virterror.h | 5 +
src/libvirt_private.syms | 2 +
src/util/Makefile.inc.am | 1 +
src/util/virerror.c | 738 +++++++-----------------------------
src/util/virerrorpriv.h | 28 ++
tests/Makefile.am | 6 +
tests/virerrormessages.txt | 101 +++++
tests/virerrortest.c | 126 ++++++
8 files changed, 405 insertions(+), 602 deletions(-)
create mode 100644 src/util/virerrorpriv.h
create mode 100644 tests/virerrormessages.txt
create mode 100644 tests/virerrortest.c
--
2.19.2
5 years, 11 months
[libvirt] [RFC v3 4/4] nvdimm: update news.xml
by Luyao Zhong
add more configure options for NVDIMM
Signed-off-by: Luyao Zhong <luyao.zhong(a)intel.com>
---
docs/news.xml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 5bdbd34..0112c91 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -38,6 +38,15 @@
would normally prevent QEMU from accessing such a device.
</description>
</change>
+ <change>
+ <summary>
+ NVDIMM: support more configurations
+ </summary>
+ <description>
+ Introduce more configuration options supported by QEMU community,
+ including 'alignsize', 'pmem', 'unarmed' and 'persistence'.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
</section>
--
2.7.4
5 years, 11 months
[libvirt] [RFC v3 3/4] nvdimm: update qemu command-line generating for NVDIMM memory
by Luyao Zhong
According to the result parsing from xml, add corresponding properties
into QEMU command line, including 'align', 'pmem' and 'unarmed'.
Signed-off-by: Luyao Zhong <luyao.zhong(a)intel.com>
---
src/qemu/qemu_command.c | 32 ++++++++++++++++++++++
.../memory-hotplug-nvdimm-align.args | 31 +++++++++++++++++++++
.../memory-hotplug-nvdimm-pmem.args | 31 +++++++++++++++++++++
.../memory-hotplug-nvdimm-unarmed.args | 31 +++++++++++++++++++++
tests/qemuxml2argvtest.c | 11 ++++++++
5 files changed, 136 insertions(+)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 32ed83f..73600b7 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3400,6 +3400,34 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
if (virJSONValueObjectAdd(props, "U:size", mem->size * 1024, NULL) < 0)
goto cleanup;
+ if (mem->alignsize) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("align property is not available "
+ "with this QEMU binary"));
+ goto cleanup;
+ }
+ if (virJSONValueObjectAdd(props,
+ "U:align",
+ mem->alignsize * 1024,
+ NULL) < 0)
+ goto cleanup;
+ }
+
+ if (mem->nvdimmPmem) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("pmem property is not available "
+ "with this QEMU binary"));
+ goto cleanup;
+ }
+ if (virJSONValueObjectAdd(props,
+ "s:pmem",
+ mem->nvdimmPmem ? "on" : "off",
+ NULL) < 0)
+ goto cleanup;
+ }
+
if (mem->sourceNodes) {
nodemask = mem->sourceNodes;
} else {
@@ -3569,6 +3597,10 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem)
if (mem->labelsize)
virBufferAsprintf(&buf, "label-size=%llu,", mem->labelsize * 1024);
+ if (mem->nvdimmUnarmed)
+ virBufferAsprintf(&buf, "unarmed=%s,",
+ mem->nvdimmUnarmed ? "on" : "off");
+
virBufferAsprintf(&buf, "memdev=mem%s,id=%s",
mem->info.alias, mem->info.alias);
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
new file mode 100644
index 0000000..432f622
--- /dev/null
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
+-m size=219136k,slots=16,maxmem=1099511627776k \
+-smp 2,sockets=2,cores=1,threads=1 \
+-numa node,nodeid=0,cpus=0-1,mem=214 \
+-object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
+share=no,size=536870912,align=2097152 \
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
+bootindex=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args
new file mode 100644
index 0000000..d34ac5b
--- /dev/null
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
+-m size=219136k,slots=16,maxmem=1099511627776k \
+-smp 2,sockets=2,cores=1,threads=1 \
+-numa node,nodeid=0,cpus=0-1,mem=214 \
+-object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
+share=no,size=536870912,pmem=on \
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
+bootindex=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args
new file mode 100644
index 0000000..64dcc5a
--- /dev/null
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
+-m size=219136k,slots=16,maxmem=1099511627776k \
+-smp 2,sockets=2,cores=1,threads=1 \
+-numa node,nodeid=0,cpus=0-1,mem=214 \
+-object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
+share=no,size=536870912 \
+-device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
+bootindex=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index e17709e..8be62a0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2757,6 +2757,17 @@ mymain(void)
DO_TEST("memory-hotplug-nvdimm-label",
QEMU_CAPS_DEVICE_NVDIMM,
QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST("memory-hotplug-nvdimm-align",
+ QEMU_CAPS_DEVICE_NVDIMM,
+ QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE,
+ QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN);
+ DO_TEST("memory-hotplug-nvdimm-pmem",
+ QEMU_CAPS_DEVICE_NVDIMM,
+ QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE,
+ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM);
+ DO_TEST("memory-hotplug-nvdimm-unarmed",
+ QEMU_CAPS_DEVICE_NVDIMM,
+ QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("machine-aeskeywrap-on-caps",
QEMU_CAPS_AES_KEY_WRAP,
--
2.7.4
5 years, 11 months
[libvirt] [RFC v3 2/4] nvdimm: add nvdimm-related qemucapabilities check
by Luyao Zhong
-object memory-backend-file[,align=][,pmem=]
Signed-off-by: Luyao Zhong <luyao.zhong(a)intel.com>
---
src/qemu/qemu_capabilities.c | 8 +++++++-
src/qemu/qemu_capabilities.h | 4 ++++
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 2 ++
13 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 9258bf6..8b518b1 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -516,7 +516,11 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"memory-backend-memfd.hugetlb",
"iothread.poll-max-ns",
"machine.pseries.cap-nested-hv",
- "egl-headless.rendernode"
+ "egl-headless.rendernode",
+ "memory-backend-file.align",
+
+ /* 325 */
+ "memory-backend-file.pmem",
);
@@ -1366,6 +1370,8 @@ static virQEMUCapsObjectTypeProps virQEMUCapsDeviceProps[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = {
{ "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD },
+ { "align", QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN },
+ { "pmem", QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index c109887..f10b9a9 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -501,6 +501,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_IOTHREAD_POLLING, /* -object iothread.poll-max-ns */
QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, /* -machine pseries.cap-nested-hv */
QEMU_CAPS_EGL_HEADLESS_RENDERNODE, /* -display egl-headless,rendernode= */
+ QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN, /* -object memory-backend-file,align= */
+
+ /* 325 */
+ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index 8dd90f5..186a6cc 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -165,6 +165,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>345725</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index e646103..c47ebd7 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -163,6 +163,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>426509</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index b18bd74..49249f5 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -132,6 +132,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>375102</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index ac97e16..54c4a65 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -206,6 +206,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>414371</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index f11d860..24a3c2b 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -163,6 +163,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>444946</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
index 552b319..1b5d8e6 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
@@ -103,6 +103,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
index 4f9832d..3c76f63 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
@@ -103,6 +103,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
index 1c4177c..8569de6 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
@@ -134,6 +134,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>388416</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
index b2d98a6..15df8a5 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -208,6 +208,7 @@
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
+ <flag name='memory-backend-file.align'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>425972</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
index b06b173..175233a 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
@@ -166,6 +166,8 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<flag name='machine.pseries.cap-nested-hv'/>
+ <flag name='memory-backend-file.align'/>
+ <flag name='memory-backend-file.pmem'/>
<version>3000091</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>437731</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
index 6c9c0c6..faafbcd 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
@@ -209,6 +209,8 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<flag name='egl-headless.rendernode'/>
+ <flag name='memory-backend-file.align'/>
+ <flag name='memory-backend-file.pmem'/>
<version>3000092</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>440395</microcodeVersion>
--
2.7.4
5 years, 11 months
[libvirt] [RFC v3 0/4] update NVDIMM support
by Luyao Zhong
Hi libvirt experts,
This is the RFC v3 for updating NVDIMM support in libvirt.
There are some gaps between qemu and libvirt, libvirt has not
supported several config options about NVDIMM memory while
qemu is ready now, including 'align', 'pmem', 'unarmed'.
I reworded and recoded my patches according to some feedback
comments from community once more.
But I met some issues I can't handle. I list them as follows:
a. add qemu_capabilities check
I want to add some nvdimm-related qemu_capabilities check, just
like 'QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN' in patch 2/4, and
I try to add the relevant sections into *.replies files manually.
But the qemucapabilitiestest failed, I don't know why. It seems
something wrong with the *.replies file. I think the *.replies
doesn't depends on other code or file, right? Could you help me address
this issue? The test log doesn't give me any useful info.
b. DO_TEST & DO_TEST_CAPS_LATEST
In the previous patches, several experts suggest me using
DO_TEST_CAPS_LATEST, but the testcases will fail. I guess it may
be related to the qemu_capabilities check I mentioned above. I'm
not sure if this issue will disappeared when the first one is be
resolved.
Besides, the whole nvdimm stuff do not introduce enough qemu_capabilities
check and do not use DO_TEST_CAPS_LATEST. Maybe it is better to do these
modification in another patch set. Or we can rely on qemu errors, it's just
what libvirt do currently. What' your comments?
Thank you in advance.
Regards,
Luyao Zhong
Luyao Zhong (4):
nvdimm: introduce more config elements into xml for NVDIMM memory
nvdimm: add nvdimm-related qemucapabilities check
nvdimm: update qemu command-line generating for NVDIMM memory
nvdimm: update news.xml
docs/formatdomain.html.in | 80 ++++++++++++++++++----
docs/news.xml | 9 +++
docs/schemas/domaincommon.rng | 23 ++++++-
src/conf/domain_conf.c | 61 +++++++++++++++--
src/conf/domain_conf.h | 3 +
src/qemu/qemu_capabilities.c | 8 ++-
src/qemu/qemu_capabilities.h | 4 ++
src/qemu/qemu_command.c | 32 +++++++++
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 2 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 2 +
.../memory-hotplug-nvdimm-align.args | 31 +++++++++
.../memory-hotplug-nvdimm-align.xml | 58 ++++++++++++++++
.../memory-hotplug-nvdimm-pmem.args | 31 +++++++++
.../memory-hotplug-nvdimm-pmem.xml | 58 ++++++++++++++++
.../memory-hotplug-nvdimm-unarmed.args | 31 +++++++++
.../memory-hotplug-nvdimm-unarmed.xml | 58 ++++++++++++++++
tests/qemuxml2argvtest.c | 11 +++
.../memory-hotplug-nvdimm-align.xml | 1 +
.../memory-hotplug-nvdimm-pmem.xml | 1 +
.../memory-hotplug-nvdimm-unarmed.xml | 1 +
tests/qemuxml2xmltest.c | 3 +
30 files changed, 491 insertions(+), 26 deletions(-)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-align.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-unarmed.xml
--
2.7.4
5 years, 11 months
[libvirt] [PATCH 0/2] Sanitize header file conditionals and layout
by Daniel P. Berrangé
This series was inspired by the cleanup proposed by Michal in his recent
security driver work. I pointed out the mess he was cleaning up was in
fact across the entire codebase:
https://www.redhat.com/archives/libvir-list/2018-December/msg00136.html
This series addresses it globally
Daniel P. Berrangé (2):
Fix many mistakes & inconsistencies in header file layout
Enforce a standard header file guard symbol name
build-aux/header-ifdef.pl | 156 ++++++++++++++++++++
cfg.mk | 7 +-
docs/apibuild.py | 2 +
include/libvirt/libvirt-admin.h | 6 +-
include/libvirt/libvirt-domain-snapshot.h | 6 +-
include/libvirt/libvirt-domain.h | 6 +-
include/libvirt/libvirt-event.h | 6 +-
include/libvirt/libvirt-host.h | 6 +-
include/libvirt/libvirt-interface.h | 6 +-
include/libvirt/libvirt-lxc.h | 6 +-
include/libvirt/libvirt-network.h | 6 +-
include/libvirt/libvirt-nodedev.h | 6 +-
include/libvirt/libvirt-nwfilter.h | 6 +-
include/libvirt/libvirt-qemu.h | 6 +-
include/libvirt/libvirt-secret.h | 6 +-
include/libvirt/libvirt-storage.h | 6 +-
include/libvirt/libvirt-stream.h | 6 +-
include/libvirt/libvirt.h | 6 +-
include/libvirt/virterror.h | 6 +-
src/access/viraccessdriver.h | 6 +-
src/access/viraccessdrivernop.h | 6 +-
src/access/viraccessdriverpolkit.h | 6 +-
src/access/viraccessdriverstack.h | 6 +-
src/access/viraccessmanager.h | 6 +-
src/access/viraccessperm.h | 6 +-
src/admin/admin_server.h | 6 +-
src/admin/admin_server_dispatch.h | 6 +-
src/bhyve/bhyve_capabilities.h | 6 +-
src/bhyve/bhyve_command.h | 6 +-
src/bhyve/bhyve_conf.h | 6 +-
src/bhyve/bhyve_device.h | 6 +-
src/bhyve/bhyve_domain.h | 6 +-
src/bhyve/bhyve_driver.h | 6 +-
src/bhyve/bhyve_monitor.h | 6 +-
src/bhyve/bhyve_parse_command.h | 6 +-
src/bhyve/bhyve_process.h | 6 +-
src/bhyve/bhyve_utils.h | 6 +-
src/conf/capabilities.h | 6 +-
src/conf/cpu_conf.h | 6 +-
src/conf/device_conf.h | 6 +-
src/conf/domain_addr.h | 6 +-
src/conf/domain_audit.h | 6 +-
src/conf/domain_capabilities.h | 6 +-
src/conf/domain_conf.h | 6 +-
src/conf/domain_event.h | 9 +-
src/conf/domain_nwfilter.h | 7 +-
src/conf/interface_conf.h | 6 +-
src/conf/netdev_bandwidth_conf.h | 6 +-
src/conf/netdev_vlan_conf.h | 6 +-
src/conf/netdev_vport_profile_conf.h | 6 +-
src/conf/network_conf.h | 6 +-
src/conf/network_event.h | 12 +-
src/conf/networkcommon_conf.h | 6 +-
src/conf/node_device_conf.h | 6 +-
src/conf/node_device_event.h | 12 +-
src/conf/node_device_util.h | 6 +-
src/conf/numa_conf.h | 6 +-
src/conf/nwfilter_conf.h | 7 +-
src/conf/nwfilter_ipaddrmap.h | 6 +-
src/conf/nwfilter_params.h | 7 +-
src/conf/object_event.h | 10 +-
src/conf/object_event_private.h | 8 +-
src/conf/secret_conf.h | 7 +-
src/conf/secret_event.h | 12 +-
src/conf/snapshot_conf.h | 6 +-
src/conf/storage_adapter_conf.h | 6 +-
src/conf/storage_conf.h | 6 +-
src/conf/storage_event.h | 12 +-
src/conf/virchrdev.h | 8 +-
src/conf/virdomainobjlist.h | 6 +-
src/conf/virinterfaceobj.h | 6 +-
src/conf/virnetworkobj.h | 6 +-
src/conf/virnodedeviceobj.h | 6 +-
src/conf/virnwfilterbindingdef.h | 7 +-
src/conf/virnwfilterbindingobj.h | 7 +-
src/conf/virnwfilterbindingobjlist.h | 6 +-
src/conf/virnwfilterobj.h | 7 +-
src/conf/virsavecookie.h | 7 +-
src/conf/virsecretobj.h | 6 +-
src/conf/virstorageobj.h | 6 +-
src/cpu/cpu.h | 6 +-
src/cpu/cpu_arm.h | 6 +-
src/cpu/cpu_map.h | 6 +-
src/cpu/cpu_ppc64.h | 6 +-
src/cpu/cpu_ppc64_data.h | 6 +-
src/cpu/cpu_s390.h | 6 +-
src/cpu/cpu_x86.h | 6 +-
src/cpu/cpu_x86_data.h | 6 +-
src/datatypes.h | 6 +-
src/driver-hypervisor.h | 6 +-
src/driver-interface.h | 6 +-
src/driver-network.h | 6 +-
src/driver-nodedev.h | 6 +-
src/driver-nwfilter.h | 6 +-
src/driver-secret.h | 6 +-
src/driver-state.h | 6 +-
src/driver-storage.h | 6 +-
src/driver-stream.h | 6 +-
src/driver.h | 6 +-
src/esx/esx_driver.h | 6 +-
src/esx/esx_interface_driver.h | 6 +-
src/esx/esx_network_driver.h | 6 +-
src/esx/esx_private.h | 6 +-
src/esx/esx_storage_backend_iscsi.h | 6 +-
src/esx/esx_storage_backend_vmfs.h | 6 +-
src/esx/esx_storage_driver.h | 6 +-
src/esx/esx_stream.h | 6 +-
src/esx/esx_util.h | 6 +-
src/esx/esx_vi.h | 6 +-
src/esx/esx_vi_methods.h | 6 +-
src/esx/esx_vi_types.h | 6 +-
src/hyperv/hyperv_driver.h | 6 +-
src/hyperv/hyperv_private.h | 6 +-
src/hyperv/hyperv_util.h | 6 +-
src/hyperv/hyperv_wmi.h | 6 +-
src/hyperv/hyperv_wmi_classes.h | 6 +-
src/hyperv/openwsman.h | 6 +-
src/interface/interface_driver.h | 7 +-
src/internal.h | 6 +-
src/libvirt_internal.h | 6 +-
src/libxl/libxl_capabilities.h | 6 +-
src/libxl/libxl_conf.h | 6 +-
src/libxl/libxl_domain.h | 6 +-
src/libxl/libxl_driver.h | 6 +-
src/libxl/libxl_logger.h | 6 +-
src/libxl/libxl_migration.h | 6 +-
src/locking/domain_lock.h | 6 +-
src/locking/lock_daemon.h | 6 +-
src/locking/lock_daemon_config.h | 6 +-
src/locking/lock_daemon_dispatch.h | 6 +-
src/locking/lock_driver.h | 6 +-
src/locking/lock_driver_lockd.h | 6 +-
src/locking/lock_driver_nop.h | 6 +-
src/locking/lock_manager.h | 6 +-
src/logging/log_daemon.h | 6 +-
src/logging/log_daemon_config.h | 6 +-
src/logging/log_daemon_dispatch.h | 6 +-
src/logging/log_handler.h | 6 +-
src/logging/log_manager.h | 7 +-
src/lxc/lxc_cgroup.h | 6 +-
src/lxc/lxc_conf.h | 6 +-
src/lxc/lxc_container.h | 6 +-
src/lxc/lxc_domain.h | 7 +-
src/lxc/lxc_driver.h | 6 +-
src/lxc/lxc_fuse.h | 6 +-
src/lxc/lxc_hostdev.h | 6 +-
src/lxc/lxc_monitor.h | 6 +-
src/lxc/lxc_native.h | 6 +-
src/lxc/lxc_process.h | 6 +-
src/network/bridge_driver.h | 7 +-
src/network/bridge_driver_platform.h | 6 +-
src/node_device/node_device_driver.h | 6 +-
src/node_device/node_device_hal.h | 6 +-
src/node_device/node_device_udev.h | 13 +-
src/nwfilter/nwfilter_dhcpsnoop.h | 6 +-
src/nwfilter/nwfilter_driver.h | 6 +-
src/nwfilter/nwfilter_ebiptables_driver.h | 7 +-
src/nwfilter/nwfilter_gentech_driver.h | 7 +-
src/nwfilter/nwfilter_learnipaddr.h | 6 +-
src/nwfilter/nwfilter_tech_driver.h | 6 +-
src/openvz/openvz_conf.h | 6 +-
src/openvz/openvz_driver.h | 7 +-
src/openvz/openvz_util.h | 7 +-
src/phyp/phyp_driver.h | 6 +-
src/qemu/qemu_agent.h | 7 +-
src/qemu/qemu_alias.h | 6 +-
src/qemu/qemu_block.h | 6 +-
src/qemu/qemu_blockjob.h | 6 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 6 +-
src/qemu/qemu_capspriv.h | 11 +-
src/qemu/qemu_cgroup.h | 6 +-
src/qemu/qemu_command.h | 6 +-
src/qemu/qemu_conf.h | 6 +-
src/qemu/qemu_domain.h | 6 +-
src/qemu/qemu_domain_address.h | 7 +-
src/qemu/qemu_driver.h | 6 +-
src/qemu/qemu_extdevice.h | 7 +-
src/qemu/qemu_hostdev.h | 6 +-
src/qemu/qemu_hotplug.c | 1 +
src/qemu/qemu_hotplug.h | 6 +-
src/qemu/qemu_hotplugpriv.h | 10 +-
src/qemu/qemu_interface.h | 6 +-
src/qemu/qemu_migration.h | 6 +-
src/qemu/qemu_migration_cookie.h | 6 +-
src/qemu/qemu_migration_params.c | 1 +
src/qemu/qemu_migration_params.h | 6 +-
src/qemu/qemu_migration_paramspriv.h | 10 +-
src/qemu/qemu_monitor.c | 2 +-
src/qemu/qemu_monitor.h | 7 +-
src/qemu/qemu_monitor_json.h | 7 +-
src/qemu/qemu_monitor_priv.h | 10 +-
src/qemu/qemu_monitor_text.h | 7 +-
src/qemu/qemu_parse_command.h | 6 +-
src/qemu/qemu_process.c | 1 +
src/qemu/qemu_process.h | 6 +-
src/qemu/qemu_processpriv.h | 10 +-
src/qemu/qemu_qapi.h | 6 +-
src/qemu/qemu_security.h | 6 +-
src/qemu/qemu_tpm.h | 7 +-
src/remote/remote_daemon.h | 7 +-
src/remote/remote_daemon_config.h | 6 +-
src/remote/remote_daemon_dispatch.h | 6 +-
src/remote/remote_daemon_stream.h | 7 +-
src/remote/remote_driver.h | 6 +-
src/rpc/virkeepalive.h | 6 +-
src/rpc/virnetclient.h | 6 +-
src/rpc/virnetclientprogram.h | 6 +-
src/rpc/virnetclientstream.h | 6 +-
src/rpc/virnetdaemon.h | 6 +-
src/rpc/virnetlibsshsession.h | 7 +-
src/rpc/virnetmessage.h | 6 +-
src/rpc/virnetsaslcontext.h | 6 +-
src/rpc/virnetserver.h | 6 +-
src/rpc/virnetserverclient.h | 6 +-
src/rpc/virnetservermdns.h | 6 +-
src/rpc/virnetserverprogram.h | 6 +-
src/rpc/virnetserverservice.h | 6 +-
src/rpc/virnetsocket.h | 6 +-
src/rpc/virnetsshsession.h | 7 +-
src/rpc/virnettlscontext.h | 6 +-
src/secret/secret_driver.h | 6 +-
src/secret/secret_util.h | 6 +-
src/security/security_apparmor.h | 7 +-
src/security/security_dac.h | 8 +-
src/security/security_driver.h | 7 +-
src/security/security_manager.h | 6 +-
src/security/security_nop.h | 6 +-
src/security/security_selinux.h | 7 +-
src/security/security_stack.h | 8 +-
src/storage/storage_backend.h | 6 +-
src/storage/storage_backend_disk.h | 6 +-
src/storage/storage_backend_fs.h | 6 +-
src/storage/storage_backend_gluster.h | 6 +-
src/storage/storage_backend_iscsi.h | 6 +-
src/storage/storage_backend_iscsi_direct.h | 22 ++-
src/storage/storage_backend_logical.h | 6 +-
src/storage/storage_backend_mpath.h | 6 +-
src/storage/storage_backend_rbd.h | 6 +-
src/storage/storage_backend_scsi.h | 6 +-
src/storage/storage_backend_sheepdog.c | 1 +
src/storage/storage_backend_sheepdog.h | 6 +-
src/storage/storage_backend_sheepdog_priv.h | 10 +-
src/storage/storage_backend_vstorage.h | 6 +-
src/storage/storage_backend_zfs.h | 6 +-
src/storage/storage_driver.h | 6 +-
src/storage/storage_file_fs.h | 6 +-
src/storage/storage_file_gluster.h | 6 +-
src/storage/storage_util.h | 6 +-
src/test/test_driver.h | 6 +-
src/uml/uml_conf.h | 6 +-
src/uml/uml_driver.h | 7 +-
src/util/viralloc.h | 7 +-
src/util/virarch.h | 6 +-
src/util/virarptable.h | 6 +-
src/util/viratomic.h | 6 +-
src/util/viraudit.h | 7 +-
src/util/virauth.h | 6 +-
src/util/virauthconfig.h | 6 +-
src/util/virbitmap.h | 6 +-
src/util/virbuffer.h | 6 +-
src/util/vircgroup.c | 2 +-
src/util/vircgroup.h | 6 +-
src/util/vircgroupbackend.c | 3 +-
src/util/vircgroupbackend.h | 6 +-
src/util/vircgrouppriv.h | 10 +-
src/util/vircgroupv1.c | 3 +-
src/util/vircgroupv1.h | 6 +-
src/util/vircgroupv2.c | 3 +-
src/util/vircgroupv2.h | 6 +-
src/util/virclosecallbacks.h | 6 +-
src/util/vircommand.c | 2 +-
src/util/vircommand.h | 6 +-
src/util/vircommandpriv.h | 10 +-
src/util/virconf.h | 6 +-
src/util/vircrypto.h | 6 +-
src/util/virdbus.c | 1 +
src/util/virdbus.h | 6 +-
src/util/virdbuspriv.h | 10 +-
src/util/virdevmapper.h | 6 +-
src/util/virdnsmasq.h | 6 +-
src/util/virebtables.h | 6 +-
src/util/virendian.h | 6 +-
src/util/virerror.h | 6 +-
src/util/virevent.h | 6 +-
src/util/vireventpoll.h | 6 +-
src/util/virfcp.h | 6 +-
src/util/virfdstream.h | 7 +-
src/util/virfile.h | 7 +-
src/util/virfilecache.h | 6 +-
src/util/virfirewall.c | 3 +-
src/util/virfirewall.h | 6 +-
src/util/virfirewallpriv.h | 10 +-
src/util/virfirmware.h | 6 +-
src/util/virgettext.h | 7 +-
src/util/virgic.h | 6 +-
src/util/virhash.h | 6 +-
src/util/virhashcode.h | 6 +-
src/util/virhook.h | 6 +-
src/util/virhostcpu.c | 1 +
src/util/virhostcpu.h | 6 +-
src/util/virhostcpupriv.h | 10 +-
src/util/virhostdev.h | 6 +-
src/util/virhostmem.h | 6 +-
src/util/viridentity.h | 6 +-
src/util/virinitctl.h | 6 +-
src/util/viriptables.h | 6 +-
src/util/viriscsi.h | 7 +-
src/util/virjson.h | 7 +-
src/util/virkeycode.h | 6 +-
src/util/virkeyfile.h | 6 +-
src/util/virkmod.h | 6 +-
src/util/virlease.h | 7 +-
src/util/virlockspace.h | 6 +-
src/util/virlog.h | 6 +-
src/util/virmacaddr.h | 6 +-
src/util/virmacmap.h | 7 +-
src/util/virmdev.h | 6 +-
src/util/virmodule.h | 6 +-
src/util/virnetdev.h | 6 +-
src/util/virnetdevbandwidth.h | 6 +-
src/util/virnetdevbridge.h | 6 +-
src/util/virnetdevip.h | 6 +-
src/util/virnetdevmacvlan.h | 6 +-
src/util/virnetdevmidonet.h | 6 +-
src/util/virnetdevopenvswitch.h | 6 +-
src/util/virnetdevtap.h | 6 +-
src/util/virnetdevveth.h | 6 +-
src/util/virnetdevvlan.h | 7 +-
src/util/virnetdevvportprofile.h | 6 +-
src/util/virnetlink.h | 6 +-
src/util/virnodesuspend.h | 7 +-
src/util/virnuma.h | 6 +-
src/util/virobject.h | 6 +-
src/util/virpci.h | 6 +-
src/util/virperf.h | 6 +-
src/util/virpidfile.h | 6 +-
src/util/virpolkit.h | 6 +-
src/util/virportallocator.h | 6 +-
src/util/virprobe.h | 6 +-
src/util/virprocess.h | 6 +-
src/util/virqemu.h | 7 +-
src/util/virrandom.h | 6 +-
src/util/virresctrl.c | 1 +
src/util/virresctrl.h | 6 +-
src/util/virresctrlpriv.h | 10 +-
src/util/virrotatingfile.h | 6 +-
src/util/virscsi.h | 6 +-
src/util/virscsihost.h | 6 +-
src/util/virscsivhost.h | 6 +-
src/util/virseclabel.h | 6 +-
src/util/virsecret.h | 6 +-
src/util/virsexpr.h | 6 +-
src/util/virsocketaddr.h | 6 +-
src/util/virstorageencryption.h | 6 +-
src/util/virstoragefile.h | 6 +-
src/util/virstoragefilebackend.h | 6 +-
src/util/virstring.h | 6 +-
src/util/virsysinfo.c | 2 +-
src/util/virsysinfo.h | 6 +-
src/util/virsysinfopriv.h | 10 +-
src/util/virsystemd.c | 2 +-
src/util/virsystemd.h | 6 +-
src/util/virsystemdpriv.h | 10 +-
src/util/virthread.h | 6 +-
src/util/virthreadjob.h | 6 +-
src/util/virthreadpool.h | 6 +-
src/util/virtime.h | 6 +-
src/util/virtpm.h | 7 +-
src/util/virtypedparam.h | 7 +-
src/util/viruri.h | 6 +-
src/util/virusb.h | 6 +-
src/util/virutil.h | 6 +-
src/util/viruuid.h | 6 +-
src/util/virvhba.h | 6 +-
src/util/virvsock.h | 6 +-
src/util/virxdrdefs.h | 6 +-
src/util/virxml.h | 6 +-
src/vbox/vbox_MSCOMGlue.h | 6 +-
src/vbox/vbox_common.h | 6 +-
src/vbox/vbox_driver.h | 10 +-
src/vbox/vbox_get_driver.h | 6 +-
src/vbox/vbox_glue.h | 6 +-
src/vbox/vbox_snapshot_conf.h | 6 +-
src/vbox/vbox_uniformed_api.h | 6 +-
src/vmware/vmware_conf.h | 8 +-
src/vmware/vmware_driver.h | 11 +-
src/vmx/vmx.h | 6 +-
src/vz/vz_driver.h | 6 +-
src/vz/vz_sdk.h | 9 +-
src/vz/vz_utils.h | 8 +-
src/xenapi/xenapi_driver.h | 7 +-
src/xenapi/xenapi_driver_private.h | 7 +-
src/xenapi/xenapi_utils.h | 6 +-
src/xenconfig/xen_common.h | 6 +-
src/xenconfig/xen_sxpr.h | 6 +-
src/xenconfig/xen_xl.h | 6 +-
src/xenconfig/xen_xm.h | 6 +-
src/xenconfig/xenxs_private.h | 6 +-
tests/cputest.c | 3 +-
tests/networkxml2firewalltest.c | 4 +-
tests/nwfilterebiptablestest.c | 4 +-
tests/nwfilterxml2firewalltest.c | 4 +-
tests/qemucapabilitiestest.c | 4 +-
tests/qemucapsprobe.c | 2 +-
tests/qemucpumock.c | 3 +-
tests/qemuhotplugtest.c | 1 +
tests/qemumigparamstest.c | 1 +
tests/qemumonitorjsontest.c | 1 +
tests/qemumonitortestutils.c | 1 +
tests/qemumonitortestutils.h | 6 +-
tests/qemuxml2argvtest.c | 3 +-
tests/storagebackendsheepdogtest.c | 1 +
tests/sysinfotest.c | 2 +-
tests/testutils.h | 6 +-
tests/testutilshostcpus.h | 27 +++-
tests/testutilslxc.h | 27 +++-
tests/testutilsqemu.c | 2 +-
tests/testutilsqemu.h | 35 ++++-
tests/testutilsqemuschema.h | 11 +-
tests/testutilsxen.h | 22 ++-
tests/vircgrouptest.c | 2 +-
tests/virdbustest.c | 2 +-
tests/virfilewrapper.h | 5 +-
tests/virfirewalltest.c | 6 +-
tests/virhashdata.h | 21 +++
tests/virhostcputest.c | 1 +
tests/viriscsitest.c | 3 +-
tests/virkmodtest.c | 2 +-
tests/virmock.h | 6 +-
tests/virnetdevbandwidthtest.c | 2 +-
tests/virnettlshelpers.h | 17 ++-
tests/virresctrltest.c | 1 +
tests/virsystemdtest.c | 2 +-
tools/nss/libvirt_nss.h | 6 +-
tools/virsh-completer.h | 6 +-
tools/virsh-console.h | 6 +-
tools/virsh-domain-monitor.h | 6 +-
tools/virsh-domain.h | 6 +-
tools/virsh-host.h | 6 +-
tools/virsh-interface.h | 6 +-
tools/virsh-network.h | 6 +-
tools/virsh-nodedev.h | 6 +-
tools/virsh-nwfilter.h | 6 +-
tools/virsh-pool.h | 6 +-
tools/virsh-secret.h | 6 +-
tools/virsh-snapshot.h | 6 +-
tools/virsh-util.h | 6 +-
tools/virsh-volume.h | 6 +-
tools/virsh.h | 6 +-
tools/virt-admin-completer.h | 6 +-
tools/virt-admin.h | 6 +-
tools/virt-host-validate-bhyve.h | 6 +-
tools/virt-host-validate-common.h | 6 +-
tools/virt-host-validate-lxc.h | 6 +-
tools/virt-host-validate-qemu.h | 6 +-
tools/vsh-table.h | 6 +-
tools/vsh.h | 6 +-
tools/wireshark/src/packet-libvirt.h | 7 +-
459 files changed, 1685 insertions(+), 1358 deletions(-)
create mode 100644 build-aux/header-ifdef.pl
--
2.19.2
5 years, 11 months
[libvirt] [PATCH 0/2] random cgroup v2 fixes
by Pavel Hrdina
While working on cgroup v2 devices and doing some extended testing I
figured out that there are two issues with the current code.
Pavel Hrdina (2):
vircgroup: introduce virCgroupKillRecursiveCB
vircgroupv2: fix virCgroupV2ValidateMachineGroup
src/util/vircgroup.c | 69 ++++++++++++++++++++-----------------
src/util/vircgroupbackend.h | 7 ++++
src/util/vircgrouppriv.h | 8 +++++
src/util/vircgroupv1.c | 16 +++++++++
src/util/vircgroupv2.c | 22 ++++++++++++
5 files changed, 90 insertions(+), 32 deletions(-)
--
2.19.2
5 years, 11 months
[libvirt] [PATCH] qemu: fix device name passed to error report
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a trivial fix
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 72b09f92ca..68d021afbb 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -5964,7 +5964,7 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
if (qemuIsMultiFunctionDevice(vm->def, &detach->info)) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("cannot hot unplug multifunction PCI device: %s"),
- dev->data.disk->dst);
+ detach->ifname);
goto cleanup;
}
--
2.19.2
5 years, 11 months
[libvirt] [PATCH] storage: Fix build issue with MOUNT and VGCHANGE commands
by John Ferlan
Turns out there some build platforms that must not define MOUNT
or VGCHANGE in config.h... So moving the commands from the storage
backend specific module into a common storage_util module causes
issues for those platforms.
So instead of assuming they are there, let's just pass the command
string to the storage util API's from the storage backend specific
code (as would have been successful before). Also modify the test
to determine whether the MOUNT and/or VGCHANGE doesn't exist and
just define it to (for example) what Fedora has for the path. Could
have just used "mount" and "vgchange" in the call, but that defeats
the purpose of adding the call to virTestClearCommandPath.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Although it is a build breaker I figured I'd wait before pushing to ensure
no one had heartburn over my selected solution of just restoring the onus
of the MOUNT and VGCHANGE back to the storage backend specific module as
opposed to trying to use #ifdef's in the common module and of course the
testing code. This just seemed to be the path of least resistance.
src/storage/storage_backend_fs.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/storage/storage_util.c | 10 ++++++----
src/storage/storage_util.h | 6 ++++--
tests/storagepoolxml2argvtest.c | 11 +++++++++--
5 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index c5e75627b5..37feff79d1 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -330,7 +330,7 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool)
if (!(src = virStorageBackendFileSystemGetPoolSource(pool)))
return -1;
- cmd = virStorageBackendFileSystemMountCmd(def, src);
+ cmd = virStorageBackendFileSystemMountCmd(MOUNT, def, src);
if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 12fff651e8..0059e24308 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -52,7 +52,7 @@ virStorageBackendLogicalSetActive(virStoragePoolObjPtr pool,
{
int ret;
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
- virCommandPtr cmd = virStorageBackendLogicalChangeCmd(def, on);
+ virCommandPtr cmd = virStorageBackendLogicalChangeCmd(VGCHANGE, def, on);
ret = virCommandRun(cmd, NULL);
virCommandFree(cmd);
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 01f3c93008..a84ee5b600 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -4312,7 +4312,8 @@ virStorageBackendFileSystemMountDefaultArgs(virCommandPtr cmd,
virCommandPtr
-virStorageBackendFileSystemMountCmd(virStoragePoolDefPtr def,
+virStorageBackendFileSystemMountCmd(const char *cmdstr,
+ virStoragePoolDefPtr def,
const char *src)
{
/* 'mount -t auto' doesn't seem to auto determine nfs (or cifs),
@@ -4326,7 +4327,7 @@ virStorageBackendFileSystemMountCmd(virStoragePoolDefPtr def,
def->source.format == VIR_STORAGE_POOL_NETFS_CIFS);
virCommandPtr cmd = NULL;
- cmd = virCommandNew(MOUNT);
+ cmd = virCommandNew(cmdstr);
if (netauto)
virStorageBackendFileSystemMountNFSArgs(cmd, src, def);
else if (glusterfs)
@@ -4340,10 +4341,11 @@ virStorageBackendFileSystemMountCmd(virStoragePoolDefPtr def,
virCommandPtr
-virStorageBackendLogicalChangeCmd(virStoragePoolDefPtr def,
+virStorageBackendLogicalChangeCmd(const char *cmdstr,
+ virStoragePoolDefPtr def,
bool on)
{
- return virCommandNewArgList(VGCHANGE,
+ return virCommandNewArgList(cmdstr,
on ? "-aly" : "-aln",
def->source.name,
NULL);
diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h
index a2ef2ac07d..d0cb5d9884 100644
--- a/src/storage/storage_util.h
+++ b/src/storage/storage_util.h
@@ -181,11 +181,13 @@ char *
virStorageBackendFileSystemGetPoolSource(virStoragePoolObjPtr pool);
virCommandPtr
-virStorageBackendFileSystemMountCmd(virStoragePoolDefPtr def,
+virStorageBackendFileSystemMountCmd(const char *cmdstr,
+ virStoragePoolDefPtr def,
const char *src);
virCommandPtr
-virStorageBackendLogicalChangeCmd(virStoragePoolDefPtr def,
+virStorageBackendLogicalChangeCmd(const char *cmdstr,
+ virStoragePoolDefPtr def,
bool on);
#endif /* __VIR_STORAGE_UTIL_H__ */
diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c
index 534cb21144..196989cb6d 100644
--- a/tests/storagepoolxml2argvtest.c
+++ b/tests/storagepoolxml2argvtest.c
@@ -9,6 +9,13 @@
#define VIR_FROM_THIS VIR_FROM_NONE
+#ifndef MOUNT
+# define MOUNT "/usr/bin/mount"
+#endif
+
+#ifndef VGCHANGE
+# define VGCHANGE "/usr/sbin/vgchange"
+#endif
static int
testCompareXMLToArgvFiles(bool shouldFail,
@@ -40,11 +47,11 @@ testCompareXMLToArgvFiles(bool shouldFail,
goto cleanup;
}
- cmd = virStorageBackendFileSystemMountCmd(def, src);
+ cmd = virStorageBackendFileSystemMountCmd(MOUNT, def, src);
break;
case VIR_STORAGE_POOL_LOGICAL:
- cmd = virStorageBackendLogicalChangeCmd(def, true);
+ cmd = virStorageBackendLogicalChangeCmd(VGCHANGE, def, true);
break;
case VIR_STORAGE_POOL_DIR:
--
2.17.2
5 years, 11 months