[PATCH v2 4/6] qemu: Allow active disk snapshots for RBD disks
by ORO@il.ibm.com
From: Or Ozeri <oro(a)il.ibm.com>
This commit removes the check disallowing users to take
active disk-only snapshots of RBD disks.
The actual support for this functionality was added in a previous commit.
Signed-off-by: Or Ozeri <oro(a)il.ibm.com>
---
src/qemu/qemu_snapshot.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index e82352ba7d..a10bdf7bf2 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -630,6 +630,8 @@ qemuSnapshotPrepare(virDomainObj *vm,
for (i = 0; i < def->ndisks; i++) {
virDomainSnapshotDiskDef *disk = &def->disks[i];
virDomainDiskDef *dom_disk = vm->def->disks[i];
+ bool is_raw_rbd = (dom_disk->src->format == VIR_STORAGE_FILE_RAW &&
+ dom_disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD);
if (disk->snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_NO &&
qemuDomainDiskBlockJobIsActive(dom_disk))
@@ -639,7 +641,7 @@ qemuSnapshotPrepare(virDomainObj *vm,
case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL:
found_internal = true;
- if (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && active) {
+ if (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && active && !is_raw_rbd) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("active qemu domains require external disk "
"snapshots; disk %s requested internal"),
@@ -652,7 +654,8 @@ qemuSnapshotPrepare(virDomainObj *vm,
return -1;
if (dom_disk->src->format > 0 &&
- dom_disk->src->format != VIR_STORAGE_FILE_QCOW2) {
+ dom_disk->src->format != VIR_STORAGE_FILE_QCOW2 &&
+ !is_raw_rbd) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("internal snapshot for disk %s unsupported "
"for storage type %s"),
--
2.25.1
1 year, 9 months
[PATCH v2 3/6] qemu: Add internal support for active disk internal snapshots
by ORO@il.ibm.com
From: Or Ozeri <oro(a)il.ibm.com>
libvirt supports taking external disk snapshots on a running VM,
using qemu's "blockdev-snapshot" command.
qemu also supports "blockdev-snapshot-internal-sync" to do the
same for internal snapshots.
This commit wraps this (old) qemu capability to allow future libvirt
users to take internal disk snapshots on a running VM.
This will only work for disk types which support internal snapshots,
and thus we require the disk type to be part of a white list of known
types. For this commit, the list of supported formats is empty.
An upcoming commit will allow RBD disks to use this new capability.
Signed-off-by: Or Ozeri <oro(a)il.ibm.com>
---
src/qemu/qemu_monitor.c | 9 +++
src/qemu/qemu_monitor.h | 5 ++
src/qemu/qemu_monitor_json.c | 14 ++++
src/qemu/qemu_monitor_json.h | 5 ++
src/qemu/qemu_snapshot.c | 72 ++++++++++++-------
.../disk_snapshot.xml | 2 +-
.../disk_snapshot.xml | 2 +-
.../disk_snapshot_redefine.xml | 2 +-
tests/qemumonitorjsontest.c | 1 +
9 files changed, 82 insertions(+), 30 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 38f89167e0..f6dab34243 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -4225,6 +4225,15 @@ qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
}
+int
+qemuMonitorTransactionInternalSnapshotBlockdev(virJSONValue *actions,
+ const char *device,
+ const char *name)
+{
+ return qemuMonitorJSONTransactionInternalSnapshotBlockdev(actions, device, name);
+}
+
+
int
qemuMonitorTransactionBackup(virJSONValue *actions,
const char *device,
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 2d16214ba2..1bfd1ccbc2 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1411,6 +1411,11 @@ qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *overlay);
+int
+qemuMonitorTransactionInternalSnapshotBlockdev(virJSONValue *actions,
+ const char *device,
+ const char *name);
+
typedef enum {
QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_NONE = 0,
QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_INCREMENTAL,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index db99017555..002a6caa52 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8307,6 +8307,20 @@ qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
NULL);
}
+
+int
+qemuMonitorJSONTransactionInternalSnapshotBlockdev(virJSONValue *actions,
+ const char *device,
+ const char *name)
+{
+ return qemuMonitorJSONTransactionAdd(actions,
+ "blockdev-snapshot-internal-sync",
+ "s:device", device,
+ "s:name", name,
+ NULL);
+}
+
+
VIR_ENUM_DECL(qemuMonitorTransactionBackupSyncMode);
VIR_ENUM_IMPL(qemuMonitorTransactionBackupSyncMode,
QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_LAST,
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 6f376cf9b7..313004f327 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -779,6 +779,11 @@ qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *overlay);
+int
+qemuMonitorJSONTransactionInternalSnapshotBlockdev(virJSONValue *actions,
+ const char *device,
+ const char *name);
+
int
qemuMonitorJSONTransactionBackup(virJSONValue *actions,
const char *device,
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index c1855b3028..e82352ba7d 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -736,7 +736,7 @@ qemuSnapshotPrepare(virDomainObj *vm,
}
/* disk snapshot requires at least one disk */
- if (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && !external) {
+ if (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && !external && !found_internal) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("disk-only snapshots require at least "
"one disk to be selected for snapshot"));
@@ -852,6 +852,7 @@ qemuSnapshotDiskCleanup(qemuSnapshotDiskData *data,
struct _qemuSnapshotDiskContext {
qemuSnapshotDiskData *dd;
size_t ndd;
+ bool has_internal;
virJSONValue *actions;
@@ -1070,17 +1071,17 @@ qemuSnapshotDiskPrepareOne(qemuSnapshotDiskContext *snapctxt,
/**
- * qemuSnapshotDiskPrepareActiveExternal:
+ * qemuSnapshotDiskPrepareActive:
*
* Collects and prepares a list of structures that hold information about disks
* that are selected for the snapshot.
*/
static qemuSnapshotDiskContext *
-qemuSnapshotDiskPrepareActiveExternal(virDomainObj *vm,
- virDomainMomentObj *snap,
- bool reuse,
- GHashTable *blockNamedNodeData,
- virDomainAsyncJob asyncJob)
+qemuSnapshotDiskPrepareActive(virDomainObj *vm,
+ virDomainMomentObj *snap,
+ bool reuse,
+ GHashTable *blockNamedNodeData,
+ virDomainAsyncJob asyncJob)
{
g_autoptr(qemuSnapshotDiskContext) snapctxt = NULL;
size_t i;
@@ -1089,16 +1090,33 @@ qemuSnapshotDiskPrepareActiveExternal(virDomainObj *vm,
snapctxt = qemuSnapshotDiskContextNew(snapdef->ndisks, vm, asyncJob);
for (i = 0; i < snapdef->ndisks; i++) {
- if (snapdef->disks[i].snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL)
- continue;
+ switch (snapdef->disks[i].snapshot) {
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL: {
+ if (qemuSnapshotDiskPrepareOne(snapctxt,
+ vm->def->disks[i],
+ snapdef->disks + i,
+ blockNamedNodeData,
+ reuse,
+ true) < 0)
+ return NULL;
+ break;
+ }
- if (qemuSnapshotDiskPrepareOne(snapctxt,
- vm->def->disks[i],
- snapdef->disks + i,
- blockNamedNodeData,
- reuse,
- true) < 0)
- return NULL;
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL: {
+ snapctxt->has_internal = true;
+ if (qemuMonitorTransactionInternalSnapshotBlockdev(snapctxt->actions,
+ vm->def->disks[i]->src->nodeformat,
+ snapdef->disks[i].snapshot_name) < 0)
+ return NULL;
+ break;
+ }
+
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT:
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_NO:
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_MANUAL:
+ case VIR_DOMAIN_SNAPSHOT_LOCATION_LAST:
+ continue;
+ }
}
return g_steal_pointer(&snapctxt);
@@ -1182,7 +1200,7 @@ qemuSnapshotDiskCreate(qemuSnapshotDiskContext *snapctxt)
int rc;
/* check whether there's anything to do */
- if (snapctxt->ndd == 0)
+ if (snapctxt->ndd == 0 && !snapctxt->has_internal)
return 0;
if (qemuDomainObjEnterMonitorAsync(snapctxt->vm, snapctxt->asyncJob) < 0)
@@ -1215,11 +1233,11 @@ qemuSnapshotDiskCreate(qemuSnapshotDiskContext *snapctxt)
/* The domain is expected to be locked and active. */
static int
-qemuSnapshotCreateActiveExternalDisks(virDomainObj *vm,
- virDomainMomentObj *snap,
- GHashTable *blockNamedNodeData,
- unsigned int flags,
- virDomainAsyncJob asyncJob)
+qemuSnapshotCreateActiveDisks(virDomainObj *vm,
+ virDomainMomentObj *snap,
+ GHashTable *blockNamedNodeData,
+ unsigned int flags,
+ virDomainAsyncJob asyncJob)
{
bool reuse = (flags & VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT) != 0;
g_autoptr(qemuSnapshotDiskContext) snapctxt = NULL;
@@ -1229,8 +1247,8 @@ qemuSnapshotCreateActiveExternalDisks(virDomainObj *vm,
/* prepare a list of objects to use in the vm definition so that we don't
* have to roll back later */
- if (!(snapctxt = qemuSnapshotDiskPrepareActiveExternal(vm, snap, reuse,
- blockNamedNodeData, asyncJob)))
+ if (!(snapctxt = qemuSnapshotDiskPrepareActive(vm, snap, reuse,
+ blockNamedNodeData, asyncJob)))
return -1;
if (qemuSnapshotDiskCreate(snapctxt) < 0)
@@ -1370,9 +1388,9 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
/* the domain is now paused if a memory snapshot was requested */
- if ((ret = qemuSnapshotCreateActiveExternalDisks(vm, snap,
- blockNamedNodeData, flags,
- VIR_ASYNC_JOB_SNAPSHOT)) < 0)
+ if ((ret = qemuSnapshotCreateActiveDisks(vm, snap,
+ blockNamedNodeData, flags,
+ VIR_ASYNC_JOB_SNAPSHOT)) < 0)
goto cleanup;
/* the snapshot is complete now */
diff --git a/tests/qemudomainsnapshotxml2xmlin/disk_snapshot.xml b/tests/qemudomainsnapshotxml2xmlin/disk_snapshot.xml
index cf5ea0814e..87b6251a7f 100644
--- a/tests/qemudomainsnapshotxml2xmlin/disk_snapshot.xml
+++ b/tests/qemudomainsnapshotxml2xmlin/disk_snapshot.xml
@@ -4,7 +4,7 @@
<disks>
<disk name='/dev/HostVG/QEMUGuest1'/>
<disk name='hdb' snapshot='no'/>
- <disk name='hdc' snapshot='internal'/>
+ <disk name='hdc' snapshot='internal' snapshotName='snap1'/>
<disk name='hdd' snapshot='external'>
<source/>
<driver type='qed'/>
diff --git a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot.xml b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot.xml
index 76c543d25c..6cf93183d5 100644
--- a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot.xml
@@ -5,7 +5,7 @@
<disks>
<disk name='/dev/HostVG/QEMUGuest1'/>
<disk name='hdb' snapshot='no'/>
- <disk name='hdc' snapshot='internal'/>
+ <disk name='hdc' snapshot='internal' snapshotName='snap1'/>
<disk name='hdd' snapshot='external' type='file'>
<driver type='qed'/>
</disk>
diff --git a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
index 24b41ba7c5..f574793edf 100644
--- a/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
+++ b/tests/qemudomainsnapshotxml2xmlout/disk_snapshot_redefine.xml
@@ -10,7 +10,7 @@
<disks>
<disk name='hda' snapshot='no'/>
<disk name='hdb' snapshot='no'/>
- <disk name='hdc' snapshot='internal'/>
+ <disk name='hdc' snapshot='internal' snapshotName='snap1'/>
<disk name='hdd' snapshot='external' type='file'>
<driver type='qed'/>
<source file='/path/to/generated4'/>
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 1db1f2b949..1269c74e43 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2587,6 +2587,7 @@ testQemuMonitorJSONTransaction(const void *opaque)
qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 ||
qemuMonitorTransactionBitmapMerge(actions, "node5", "bitmap5", &mergebitmaps) < 0 ||
qemuMonitorTransactionSnapshotBlockdev(actions, "node7", "overlay7") < 0 ||
+ qemuMonitorTransactionInternalSnapshotBlockdev(actions, "device1", "snapshot1") < 0 ||
qemuMonitorTransactionBackup(actions, "dev8", "job8", "target8", "bitmap8",
QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_NONE) < 0 ||
qemuMonitorTransactionBackup(actions, "dev9", "job9", "target9", "bitmap9",
--
2.25.1
1 year, 9 months
[PATCH] rpc: Use struct zero initializer for args
by Michal Privoznik
In a recent commit of v9.0.0-104-g0211e430a8 I've turned all args
vars in src/remote/remote_driver.c to be initialized wit {0}.
What I've missed was the generated code.
Do what we've done in v9.0.0-13-g1c656836e3 and init also args,
not just ret.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/rpc/gendispatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index e9dc8e27d7..085e2a29d8 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -1330,7 +1330,7 @@ elsif ($mode eq "client") {
if ($argtype eq "void") {
$call_args = "NULL";
} else {
- push(@vars_list, "$argtype args");
+ push(@vars_list, "$argtype args = {0}");
my $is_first_arg = 1;
my $has_node_device = 0;
--
2.39.1
1 year, 10 months
[PATCH 0/2] Two forgotten build fixes (pushed under build-breaker rule)
by Martin Kletzander
These should've been amended into the last series, sorry.
Martin Kletzander (2):
qemuxml2argvdata: Fix watchdog parameters in crypto-builtin
qemuxml2argvdata: Fix missing device in crypto-builtin XML
tests/qemuxml2argvdata/crypto-builtin.x86_64-latest.args | 2 ++
tests/qemuxml2argvdata/crypto-builtin.xml | 1 +
2 files changed, 3 insertions(+)
--
2.39.1
1 year, 10 months
[PATCH] remote: Initialize args variable
by Michal Privoznik
Recently, in v9.0.0-7-gb2034bb04c we've dropped initialization of
@args variable. The reasoning was that eventually, all members of
the variable will be set. Well, this is not correct. For
instance, in remoteConnectGetAllDomainStats() the
args.doms.doms_val pointer is set iff @ndoms != 0. However,
regardless of that, the pointer is then passed to VIR_FREE().
Worse, the whole args is passed to
xdr_remote_connect_get_all_domain_stats_args() which then calls
xdr_array, which tests the (uninitialized) pointer against NULL.
This effectively reverts b2034bb04c61c75ddbfbed46879d641b6f8ca8dc.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/remote/remote_driver.c | 178 ++++++++++++++++++-------------------
1 file changed, 89 insertions(+), 89 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 7f84050f70..9f3a9520e4 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1434,7 +1434,7 @@ remoteNodeGetCPUStats(virConnectPtr conn,
unsigned int flags)
{
int rv = -1;
- remote_node_get_cpu_stats_args args;
+ remote_node_get_cpu_stats_args args = {0};
remote_node_get_cpu_stats_ret ret = {0};
size_t i;
struct private_data *priv = conn->privateData;
@@ -1496,7 +1496,7 @@ remoteNodeGetMemoryStats(virConnectPtr conn,
unsigned int flags)
{
int rv = -1;
- remote_node_get_memory_stats_args args;
+ remote_node_get_memory_stats_args args = {0};
remote_node_get_memory_stats_ret ret = {0};
size_t i;
struct private_data *priv = conn->privateData;
@@ -1554,7 +1554,7 @@ remoteNodeGetCellsFreeMemory(virConnectPtr conn,
int startCell,
int maxCells)
{
- remote_node_get_cells_free_memory_args args;
+ remote_node_get_cells_free_memory_args args = {0};
remote_node_get_cells_free_memory_ret ret = {0};
size_t i;
struct private_data *priv = conn->privateData;
@@ -1588,7 +1588,7 @@ remoteConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
int rv = -1;
size_t i;
- remote_connect_list_domains_args args;
+ remote_connect_list_domains_args args = {0};
remote_connect_list_domains_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1661,7 +1661,7 @@ remoteDomainBlockStatsFlags(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_block_stats_flags_args args;
+ remote_domain_block_stats_flags_args args = {0};
remote_domain_block_stats_flags_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1718,7 +1718,7 @@ remoteDomainGetMemoryParameters(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_memory_parameters_args args;
+ remote_domain_get_memory_parameters_args args = {0};
remote_domain_get_memory_parameters_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1762,7 +1762,7 @@ remoteDomainGetNumaParameters(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_numa_parameters_args args;
+ remote_domain_get_numa_parameters_args args = {0};
remote_domain_get_numa_parameters_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1807,7 +1807,7 @@ remoteDomainGetLaunchSecurityInfo(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_launch_security_info_args args;
+ remote_domain_get_launch_security_info_args args = {0};
remote_domain_get_launch_security_info_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1842,7 +1842,7 @@ remoteDomainGetPerfEvents(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_perf_events_args args;
+ remote_domain_get_perf_events_args args = {0};
remote_domain_get_perf_events_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1876,7 +1876,7 @@ remoteDomainGetBlkioParameters(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_blkio_parameters_args args;
+ remote_domain_get_blkio_parameters_args args = {0};
remote_domain_get_blkio_parameters_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1923,7 +1923,7 @@ remoteDomainGetVcpuPinInfo(virDomainPtr domain,
{
int rv = -1;
size_t i;
- remote_domain_get_vcpu_pin_info_args args;
+ remote_domain_get_vcpu_pin_info_args args = {0};
remote_domain_get_vcpu_pin_info_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -1988,7 +1988,7 @@ remoteDomainPinEmulator(virDomainPtr dom,
unsigned int flags)
{
struct private_data *priv = dom->conn->privateData;
- remote_domain_pin_emulator_args args;
+ remote_domain_pin_emulator_args args = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
if (cpumaplen > REMOTE_CPUMAP_MAX) {
@@ -2021,7 +2021,7 @@ remoteDomainGetEmulatorPinInfo(virDomainPtr domain,
{
int rv = -1;
size_t i;
- remote_domain_get_emulator_pin_info_args args;
+ remote_domain_get_emulator_pin_info_args args = {0};
remote_domain_get_emulator_pin_info_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2074,7 +2074,7 @@ remoteDomainGetVcpus(virDomainPtr domain,
{
int rv = -1;
size_t i;
- remote_domain_get_vcpus_args args;
+ remote_domain_get_vcpus_args args = {0};
remote_domain_get_vcpus_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2143,7 +2143,7 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom,
int rv = -1;
size_t i;
struct private_data *priv = dom->conn->privateData;
- remote_domain_get_iothread_info_args args;
+ remote_domain_get_iothread_info_args args = {0};
remote_domain_get_iothread_info_ret ret = {0};
remote_domain_iothread_info *src;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2202,7 +2202,7 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom,
static int
remoteDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel)
{
- remote_domain_get_security_label_args args;
+ remote_domain_get_security_label_args args = {0};
remote_domain_get_security_label_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
int rv = -1;
@@ -2235,7 +2235,7 @@ remoteDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel)
static int
remoteDomainGetSecurityLabelList(virDomainPtr domain, virSecurityLabelPtr* seclabels)
{
- remote_domain_get_security_label_list_args args;
+ remote_domain_get_security_label_list_args args = {0};
remote_domain_get_security_label_list_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
size_t i;
@@ -2276,7 +2276,7 @@ remoteDomainGetState(virDomainPtr domain,
int *reason,
unsigned int flags)
{
- remote_domain_get_state_args args;
+ remote_domain_get_state_args args = {0};
remote_domain_get_state_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2341,7 +2341,7 @@ remoteDomainMigratePrepare(virConnectPtr dconn,
unsigned long flags, const char *dname,
unsigned long resource)
{
- remote_domain_migrate_prepare_args args;
+ remote_domain_migrate_prepare_args args = {0};
remote_domain_migrate_prepare_ret ret = {0};
struct private_data *priv = dconn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2376,7 +2376,7 @@ remoteDomainMigratePrepare2(virConnectPtr dconn,
const char *dom_xml)
{
int rv = -1;
- remote_domain_migrate_prepare2_args args;
+ remote_domain_migrate_prepare2_args args = {0};
remote_domain_migrate_prepare2_ret ret = {0};
struct private_data *priv = dconn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2426,8 +2426,8 @@ remoteDomainMigratePrepare2(virConnectPtr dconn,
static int
remoteDomainCreate(virDomainPtr domain)
{
- remote_domain_create_args args;
- remote_domain_lookup_by_uuid_args args2;
+ remote_domain_create_args args = {0};
+ remote_domain_lookup_by_uuid_args args2 = {0};
remote_domain_lookup_by_uuid_ret ret2 = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2458,7 +2458,7 @@ remoteDomainCreate(virDomainPtr domain)
static char *
remoteDomainGetSchedulerType(virDomainPtr domain, int *nparams)
{
- remote_domain_get_scheduler_type_args args;
+ remote_domain_get_scheduler_type_args args = {0};
remote_domain_get_scheduler_type_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2483,7 +2483,7 @@ remoteDomainMemoryStats(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_memory_stats_args args;
+ remote_domain_memory_stats_args args = {0};
remote_domain_memory_stats_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
size_t i;
@@ -2525,7 +2525,7 @@ remoteDomainBlockPeek(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_block_peek_args args;
+ remote_domain_block_peek_args args = {0};
remote_domain_block_peek_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2572,7 +2572,7 @@ remoteDomainMemoryPeek(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_memory_peek_args args;
+ remote_domain_memory_peek_args args = {0};
remote_domain_memory_peek_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2616,7 +2616,7 @@ static int remoteDomainGetBlockJobInfo(virDomainPtr domain,
virDomainBlockJobInfoPtr info,
unsigned int flags)
{
- remote_domain_get_block_job_info_args args;
+ remote_domain_get_block_job_info_args args = {0};
remote_domain_get_block_job_info_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2650,7 +2650,7 @@ static int remoteDomainGetBlockIoTune(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_block_io_tune_args args;
+ remote_domain_get_block_io_tune_args args = {0};
remote_domain_get_block_io_tune_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -2700,7 +2700,7 @@ static int remoteDomainGetCPUStats(virDomainPtr domain,
unsigned int flags)
{
struct private_data *priv = domain->conn->privateData;
- remote_domain_get_cpu_stats_args args;
+ remote_domain_get_cpu_stats_args args = {0};
remote_domain_get_cpu_stats_ret ret = {0};
int rv = -1;
int cpu;
@@ -2789,7 +2789,7 @@ remoteConnectNetworkEventRegisterAny(virConnectPtr conn,
virFreeCallback freecb)
{
struct private_data *priv = conn->privateData;
- remote_connect_network_event_register_any_args args;
+ remote_connect_network_event_register_any_args args = {0};
remote_connect_network_event_register_any_ret ret = {0};
int callbackID;
int count;
@@ -2833,7 +2833,7 @@ remoteConnectNetworkEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct private_data *priv = conn->privateData;
- remote_connect_network_event_deregister_any_args args;
+ remote_connect_network_event_deregister_any_args args = {0};
int eventID;
int remoteID;
int count;
@@ -2870,7 +2870,7 @@ remoteConnectStoragePoolEventRegisterAny(virConnectPtr conn,
virFreeCallback freecb)
{
struct private_data *priv = conn->privateData;
- remote_connect_storage_pool_event_register_any_args args;
+ remote_connect_storage_pool_event_register_any_args args = {0};
remote_connect_storage_pool_event_register_any_ret ret = {0};
int callbackID;
int count;
@@ -2914,7 +2914,7 @@ remoteConnectStoragePoolEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct private_data *priv = conn->privateData;
- remote_connect_storage_pool_event_deregister_any_args args;
+ remote_connect_storage_pool_event_deregister_any_args args = {0};
int eventID;
int remoteID;
int count;
@@ -2953,7 +2953,7 @@ remoteConnectNodeDeviceEventRegisterAny(virConnectPtr conn,
virFreeCallback freecb)
{
struct private_data *priv = conn->privateData;
- remote_connect_node_device_event_register_any_args args;
+ remote_connect_node_device_event_register_any_args args = {0};
remote_connect_node_device_event_register_any_ret ret = {0};
int callbackID;
int count;
@@ -2998,7 +2998,7 @@ remoteConnectNodeDeviceEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct private_data *priv = conn->privateData;
- remote_connect_node_device_event_deregister_any_args args;
+ remote_connect_node_device_event_deregister_any_args args = {0};
int eventID;
int remoteID;
int count;
@@ -3037,7 +3037,7 @@ remoteConnectSecretEventRegisterAny(virConnectPtr conn,
virFreeCallback freecb)
{
struct private_data *priv = conn->privateData;
- remote_connect_secret_event_register_any_args args;
+ remote_connect_secret_event_register_any_args args = {0};
remote_connect_secret_event_register_any_ret ret = {0};
int callbackID;
int count;
@@ -3082,7 +3082,7 @@ remoteConnectSecretEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct private_data *priv = conn->privateData;
- remote_connect_secret_event_deregister_any_args args;
+ remote_connect_secret_event_deregister_any_args args = {0};
int eventID;
int remoteID;
int count;
@@ -3204,7 +3204,7 @@ remoteConnectFindStoragePoolSources(virConnectPtr conn,
unsigned int flags)
{
char *rv = NULL;
- remote_connect_find_storage_pool_sources_args args;
+ remote_connect_find_storage_pool_sources_args args = {0};
remote_connect_find_storage_pool_sources_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -3229,7 +3229,7 @@ remoteConnectFindStoragePoolSources(virConnectPtr conn,
static int
remoteNodeDeviceDettach(virNodeDevicePtr dev)
{
- remote_node_device_dettach_args args;
+ remote_node_device_dettach_args args = {0};
struct private_data *priv = dev->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -3248,7 +3248,7 @@ remoteNodeDeviceDetachFlags(virNodeDevicePtr dev,
const char *driverName,
unsigned int flags)
{
- remote_node_device_detach_flags_args args;
+ remote_node_device_detach_flags_args args = {0};
struct private_data *priv = dev->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -3267,7 +3267,7 @@ remoteNodeDeviceDetachFlags(virNodeDevicePtr dev,
static int
remoteNodeDeviceReAttach(virNodeDevicePtr dev)
{
- remote_node_device_re_attach_args args;
+ remote_node_device_re_attach_args args = {0};
struct private_data *priv = dev->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -3284,7 +3284,7 @@ remoteNodeDeviceReAttach(virNodeDevicePtr dev)
static int
remoteNodeDeviceReset(virNodeDevicePtr dev)
{
- remote_node_device_reset_args args;
+ remote_node_device_reset_args args = {0};
/* This method is unusual in that it uses the HV driver, not the devMon driver
* hence its use of privateData, instead of nodeDevicePrivateData */
struct private_data *priv = dev->conn->privateData;
@@ -3702,9 +3702,9 @@ remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
virConnectAuthPtr auth, const char *wantmech)
{
remote_auth_sasl_init_ret iret;
- remote_auth_sasl_start_args sargs;
+ remote_auth_sasl_start_args sargs = {0};
remote_auth_sasl_start_ret sret;
- remote_auth_sasl_step_args pargs;
+ remote_auth_sasl_step_args pargs = {0};
remote_auth_sasl_step_ret pret;
const char *clientout;
char *serverin = NULL;
@@ -3976,7 +3976,7 @@ remoteConnectDomainEventRegister(virConnectPtr conn,
if (count == 1) {
/* Tell the server when we are the first callback registering */
if (priv->serverEventFilter) {
- remote_connect_domain_event_callback_register_any_args args;
+ remote_connect_domain_event_callback_register_any_args args = {0};
remote_connect_domain_event_callback_register_any_ret ret = {0};
args.eventID = VIR_DOMAIN_EVENT_ID_LIFECYCLE;
@@ -4012,7 +4012,7 @@ remoteConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
struct private_data *priv = conn->privateData;
- remote_connect_domain_event_callback_deregister_any_args args;
+ remote_connect_domain_event_callback_deregister_any_args args = {0};
int callbackID;
int remoteID;
int count;
@@ -5085,7 +5085,7 @@ static unsigned char *
remoteSecretGetValue(virSecretPtr secret, size_t *value_size,
unsigned int flags)
{
- remote_secret_get_value_args args;
+ remote_secret_get_value_args args = {0};
remote_secret_get_value_ret ret = {0};
struct private_data *priv = secret->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5492,7 +5492,7 @@ remoteConnectDomainEventRegisterAny(virConnectPtr conn,
* events on the server */
if (count == 1) {
if (priv->serverEventFilter) {
- remote_connect_domain_event_callback_register_any_args args;
+ remote_connect_domain_event_callback_register_any_args args = {0};
remote_connect_domain_event_callback_register_any_ret ret = {0};
args.eventID = eventID;
@@ -5513,7 +5513,7 @@ remoteConnectDomainEventRegisterAny(virConnectPtr conn,
virObjectEventStateSetRemote(conn, priv->eventState, callbackID,
ret.callbackID);
} else {
- remote_connect_domain_event_register_any_args args;
+ remote_connect_domain_event_register_any_args args = {0};
args.eventID = eventID;
@@ -5553,7 +5553,7 @@ remoteConnectDomainEventDeregisterAny(virConnectPtr conn,
* events on the server */
if (count == 0) {
if (priv->serverEventFilter) {
- remote_connect_domain_event_callback_deregister_any_args args;
+ remote_connect_domain_event_callback_deregister_any_args args = {0};
args.callbackID = remoteID;
@@ -5563,7 +5563,7 @@ remoteConnectDomainEventDeregisterAny(virConnectPtr conn,
(xdrproc_t) xdr_void, (char *) NULL) == -1)
return -1;
} else {
- remote_connect_domain_event_deregister_any_args args;
+ remote_connect_domain_event_deregister_any_args args = {0};
args.eventID = eventID;
@@ -5668,7 +5668,7 @@ remoteDomainMigrateBegin3(virDomainPtr domain,
unsigned long resource)
{
char *rv = NULL;
- remote_domain_migrate_begin3_args args;
+ remote_domain_migrate_begin3_args args = {0};
remote_domain_migrate_begin3_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5719,7 +5719,7 @@ remoteDomainMigratePrepare3(virConnectPtr dconn,
const char *dom_xml)
{
int rv = -1;
- remote_domain_migrate_prepare3_args args;
+ remote_domain_migrate_prepare3_args args = {0};
remote_domain_migrate_prepare3_ret ret = {0};
struct private_data *priv = dconn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5781,7 +5781,7 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn,
const char *dom_xml)
{
struct private_data *priv = dconn->privateData;
- remote_domain_migrate_prepare_tunnel3_args args;
+ remote_domain_migrate_prepare_tunnel3_args args = {0};
remote_domain_migrate_prepare_tunnel3_ret ret = {0};
virNetClientStream *netst;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5847,7 +5847,7 @@ remoteDomainMigratePerform3(virDomainPtr dom,
const char *dname,
unsigned long resource)
{
- remote_domain_migrate_perform3_args args;
+ remote_domain_migrate_perform3_args args = {0};
remote_domain_migrate_perform3_ret ret = {0};
struct private_data *priv = dom->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5898,7 +5898,7 @@ remoteDomainMigrateFinish3(virConnectPtr dconn,
unsigned long flags,
int cancelled)
{
- remote_domain_migrate_finish3_args args;
+ remote_domain_migrate_finish3_args args = {0};
remote_domain_migrate_finish3_ret ret = {0};
struct private_data *priv = dconn->privateData;
virDomainPtr rv = NULL;
@@ -5947,7 +5947,7 @@ remoteDomainMigrateConfirm3(virDomainPtr domain,
unsigned long flags,
int cancelled)
{
- remote_domain_migrate_confirm3_args args;
+ remote_domain_migrate_confirm3_args args = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -5975,7 +5975,7 @@ remoteConnectGetCPUModelNames(virConnectPtr conn,
int rv = -1;
size_t i;
g_auto(GStrv) retmodels = NULL;
- remote_connect_get_cpu_model_names_args args;
+ remote_connect_get_cpu_model_names_args args = {0};
remote_connect_get_cpu_model_names_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6024,7 +6024,7 @@ remoteDomainOpenGraphics(virDomainPtr dom,
int fd,
unsigned int flags)
{
- remote_domain_open_graphics_args args;
+ remote_domain_open_graphics_args args = {0};
struct private_data *priv = dom->conn->privateData;
int fdin[] = { fd };
size_t fdinlen = G_N_ELEMENTS(fdin);
@@ -6052,7 +6052,7 @@ remoteDomainOpenGraphicsFD(virDomainPtr dom,
unsigned int flags)
{
int rv = -1;
- remote_domain_open_graphics_fd_args args;
+ remote_domain_open_graphics_fd_args args = {0};
struct private_data *priv = dom->conn->privateData;
int *fdout = NULL;
size_t fdoutlen = 0;
@@ -6139,7 +6139,7 @@ remoteDomainGetDiskErrors(virDomainPtr dom,
{
int rv = -1;
struct private_data *priv = dom->conn->privateData;
- remote_domain_get_disk_errors_args args;
+ remote_domain_get_disk_errors_args args = {0};
remote_domain_get_disk_errors_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6244,7 +6244,7 @@ remoteDomainGetInterfaceParameters(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_interface_parameters_args args;
+ remote_domain_get_interface_parameters_args args = {0};
remote_domain_get_interface_parameters_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6291,7 +6291,7 @@ remoteNodeGetMemoryParameters(virConnectPtr conn,
unsigned int flags)
{
int rv = -1;
- remote_node_get_memory_parameters_args args;
+ remote_node_get_memory_parameters_args args = {0};
remote_node_get_memory_parameters_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6336,7 +6336,7 @@ remoteNodeGetSEVInfo(virConnectPtr conn,
unsigned int flags)
{
int rv = -1;
- remote_node_get_sev_info_args args;
+ remote_node_get_sev_info_args args = {0};
remote_node_get_sev_info_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6370,7 +6370,7 @@ remoteNodeGetCPUMap(virConnectPtr conn,
unsigned int flags)
{
int rv = -1;
- remote_node_get_cpu_map_args args;
+ remote_node_get_cpu_map_args args = {0};
remote_node_get_cpu_map_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6439,7 +6439,7 @@ remoteDomainGetJobStats(virDomainPtr domain,
unsigned int flags)
{
int rv = -1;
- remote_domain_get_job_stats_args args;
+ remote_domain_get_job_stats_args args = {0};
remote_domain_get_job_stats_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6478,7 +6478,7 @@ remoteDomainMigrateBegin3Params(virDomainPtr domain,
unsigned int flags)
{
char *rv = NULL;
- remote_domain_migrate_begin3_params_args args;
+ remote_domain_migrate_begin3_params_args args = {0};
remote_domain_migrate_begin3_params_ret ret = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6536,7 +6536,7 @@ remoteDomainMigratePrepare3Params(virConnectPtr dconn,
unsigned int flags)
{
int rv = -1;
- remote_domain_migrate_prepare3_params_args args;
+ remote_domain_migrate_prepare3_params_args args = {0};
remote_domain_migrate_prepare3_params_ret ret = {0};
struct private_data *priv = dconn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6607,7 +6607,7 @@ remoteDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
{
struct private_data *priv = dconn->privateData;
int rv = -1;
- remote_domain_migrate_prepare_tunnel3_params_args args;
+ remote_domain_migrate_prepare_tunnel3_params_args args = {0};
remote_domain_migrate_prepare_tunnel3_params_ret ret = {0};
virNetClientStream *netst;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6684,7 +6684,7 @@ remoteDomainMigratePerform3Params(virDomainPtr dom,
unsigned int flags)
{
int rv = -1;
- remote_domain_migrate_perform3_params_args args;
+ remote_domain_migrate_perform3_params_args args = {0};
remote_domain_migrate_perform3_params_ret ret = {0};
struct private_data *priv = dom->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6744,7 +6744,7 @@ remoteDomainMigrateFinish3Params(virConnectPtr dconn,
unsigned int flags,
int cancelled)
{
- remote_domain_migrate_finish3_params_args args;
+ remote_domain_migrate_finish3_params_args args = {0};
remote_domain_migrate_finish3_params_ret ret = {0};
struct private_data *priv = dconn->privateData;
virDomainPtr rv = NULL;
@@ -6807,7 +6807,7 @@ remoteDomainMigrateConfirm3Params(virDomainPtr domain,
int cancelled)
{
int rv = -1;
- remote_domain_migrate_confirm3_params_args args;
+ remote_domain_migrate_confirm3_params_args args = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6845,7 +6845,7 @@ remoteDomainCreateXMLWithFiles(virConnectPtr conn, const char *xml_desc,
{
virDomainPtr rv = NULL;
struct private_data *priv = conn->privateData;
- remote_domain_create_xml_with_files_args args;
+ remote_domain_create_xml_with_files_args args = {0};
remote_domain_create_xml_with_files_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6873,7 +6873,7 @@ remoteDomainCreateWithFiles(virDomainPtr dom,
unsigned int flags)
{
struct private_data *priv = dom->conn->privateData;
- remote_domain_create_with_files_args args;
+ remote_domain_create_with_files_args args = {0};
remote_domain_create_with_files_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6900,7 +6900,7 @@ remoteDomainGetTime(virDomainPtr dom,
unsigned int flags)
{
struct private_data *priv = dom->conn->privateData;
- remote_domain_get_time_args args;
+ remote_domain_get_time_args args = {0};
remote_domain_get_time_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -6930,7 +6930,7 @@ remoteNodeGetFreePages(virConnectPtr conn,
unsigned long long *counts,
unsigned int flags)
{
- remote_node_get_free_pages_args args;
+ remote_node_get_free_pages_args args = {0};
remote_node_get_free_pages_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7010,7 +7010,7 @@ remoteNetworkGetDHCPLeases(virNetworkPtr net,
int rv = -1;
size_t i;
struct private_data *priv = net->conn->privateData;
- remote_network_get_dhcp_leases_args args;
+ remote_network_get_dhcp_leases_args args = {0};
remote_network_get_dhcp_leases_ret ret = {0};
virNetworkDHCPLeasePtr *leases_ret = NULL;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7072,7 +7072,7 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
struct private_data *priv = conn->privateData;
int rv = -1;
size_t i;
- remote_connect_get_all_domain_stats_args args;
+ remote_connect_get_all_domain_stats_args args = {0};
remote_connect_get_all_domain_stats_ret ret = {0};
virDomainStatsRecordPtr elem = NULL;
virDomainStatsRecordPtr *tmpret = NULL;
@@ -7150,7 +7150,7 @@ remoteNodeAllocPages(virConnectPtr conn,
unsigned int cellCount,
unsigned int flags)
{
- remote_node_alloc_pages_args args;
+ remote_node_alloc_pages_args args = {0};
remote_node_alloc_pages_ret ret = {0};
struct private_data *priv = conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7187,7 +7187,7 @@ remoteDomainGetFSInfo(virDomainPtr dom,
int rv = -1;
size_t i, j, len;
struct private_data *priv = dom->conn->privateData;
- remote_domain_get_fsinfo_args args;
+ remote_domain_get_fsinfo_args args = {0};
remote_domain_get_fsinfo_ret ret = {0};
remote_domain_fsinfo *src;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7261,7 +7261,7 @@ remoteDomainInterfaceAddresses(virDomainPtr dom,
size_t i, j;
virDomainInterfacePtr *ifaces_ret = NULL;
- remote_domain_interface_addresses_args args;
+ remote_domain_interface_addresses_args args = {0};
remote_domain_interface_addresses_ret ret = {0};
struct private_data *priv = dom->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7393,7 +7393,7 @@ remoteDomainRename(virDomainPtr dom, const char *new_name, unsigned int flags)
{
int rv = -1;
struct private_data *priv = dom->conn->privateData;
- remote_domain_rename_args args;
+ remote_domain_rename_args args = {0};
remote_domain_rename_ret ret = {0};
char *tmp = NULL;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7427,7 +7427,7 @@ remoteStorageVolGetInfoFlags(virStorageVolPtr vol,
unsigned int flags)
{
struct private_data *priv = vol->conn->privateData;
- remote_storage_vol_get_info_flags_args args;
+ remote_storage_vol_get_info_flags_args args = {0};
remote_storage_vol_get_info_flags_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7457,7 +7457,7 @@ remoteNetworkPortGetParameters(virNetworkPortPtr port,
{
int rv = -1;
struct private_data *priv = port->net->conn->privateData;
- remote_network_port_get_parameters_args args;
+ remote_network_port_get_parameters_args args = {0};
remote_network_port_get_parameters_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7492,7 +7492,7 @@ remoteDomainGetGuestInfo(virDomainPtr dom,
{
int rv = -1;
struct private_data *priv = dom->conn->privateData;
- remote_domain_get_guest_info_args args;
+ remote_domain_get_guest_info_args args = {0};
remote_domain_get_guest_info_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7530,7 +7530,7 @@ remoteDomainAuthorizedSSHKeysGet(virDomainPtr domain,
int rv = -1;
size_t i;
struct private_data *priv = domain->conn->privateData;
- remote_domain_authorized_ssh_keys_get_args args;
+ remote_domain_authorized_ssh_keys_get_args args = {0};
remote_domain_authorized_ssh_keys_get_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7570,7 +7570,7 @@ remoteDomainAuthorizedSSHKeysSet(virDomainPtr domain,
unsigned int flags)
{
struct private_data *priv = domain->conn->privateData;
- remote_domain_authorized_ssh_keys_set_args args;
+ remote_domain_authorized_ssh_keys_set_args args = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
if (nkeys > REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX) {
@@ -7603,7 +7603,7 @@ remoteDomainGetMessages(virDomainPtr domain,
int rv = -1;
size_t i;
struct private_data *priv = domain->conn->privateData;
- remote_domain_get_messages_args args;
+ remote_domain_get_messages_args args = {0};
remote_domain_get_messages_ret ret = {0};
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
@@ -7643,7 +7643,7 @@ remoteDomainFDAssociate(virDomainPtr domain,
int *fds,
unsigned int flags)
{
- remote_domain_fd_associate_args args;
+ remote_domain_fd_associate_args args = {0};
struct private_data *priv = domain->conn->privateData;
VIR_LOCK_GUARD lock = remoteDriverLock(priv);
--
2.39.1
1 year, 10 months
[libvirt PATCH] remote: Fix version annotation for remoteDomainFDAssociate
by Jiri Denemark
The API was added in libvirt 9.0.0.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 9f3a9520e4..2f421fb5e0 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -8101,7 +8101,7 @@ static virHypervisorDriver hypervisor_driver = {
.domainGetMessages = remoteDomainGetMessages, /* 7.1.0 */
.domainStartDirtyRateCalc = remoteDomainStartDirtyRateCalc, /* 7.2.0 */
.domainSetLaunchSecurityState = remoteDomainSetLaunchSecurityState, /* 8.0.0 */
- .domainFDAssociate = remoteDomainFDAssociate, /* 8.9.0 */
+ .domainFDAssociate = remoteDomainFDAssociate, /* 9.0.0 */
};
static virNetworkDriver network_driver = {
--
2.39.1
1 year, 10 months
[libvirt PATCH 0/4] remote: Random RPC fixes and cleanups
by Jiri Denemark
Jiri Denemark (4):
remote: Propagate error from virDomainGetSecurityLabelList via RPC
remote: Drop useless check in remoteDispatchDomainGetIOThreadInfo
remote: Avoid leaking uri_out
remote: Drop useless cleanup in remoteDispatchNodeGet{CPU,Memory}Stats
src/remote/remote_daemon_dispatch.c | 48 +++++++++--------------------
1 file changed, 15 insertions(+), 33 deletions(-)
--
2.39.1
1 year, 10 months
[libvirt PATCH 0/7] Extract the integration job commands to a shell scripts
by Erik Skultety
Using shell scripts rather than inlining shell commands to YAML feels more
natural, more readable, and will keep all different variations of execution
consistent. Essentially the only disadvantage is that we won't see each command
listed one-by-one in gitlab's log output (unless we set -x that is), but given
that shell would complain if something was wrong with the script, it's fairly
easy to identify the problem.
Here's a successful pipeline after the change:
https://gitlab.com/eskultety/libvirt/-/pipelines/753090691
Erik Skultety (7):
ci: integration: Extract several hidden job definitions to a script
ci: integration: Drop the 'install-deps' hidden job and reference
ci: integration-template: Drop Fedora 35 check
ci: integration.sh: Replace most 'sudo' usage with running as root
ci: integration.sh: Add/Rewrite/Reformat commentaries
ci: integration.sh: Replace 'test' with '[' operator
ci: integration.sh: Define the SCRATCH_DIR variable for local
execution
ci/integration-template.yml | 42 ++----------------------------
ci/integration.sh | 51 +++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 40 deletions(-)
create mode 100644 ci/integration.sh
--
2.39.0
1 year, 10 months
[PATCH] qemu_domain: Don't unref NULL hash table in qemuDomainRefreshStatsSchema()
by Michal Privoznik
The g_hash_table_unref() function does not accept NULL. Passing
NULL results in a glib warning being triggered. Check whether the
hash table is not NULL and unref it only then.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index b6ad118f1f..881c88d54c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11923,7 +11923,8 @@ qemuDomainRefreshStatsSchema(virDomainObj *dom)
if (!schema)
return -1;
- g_hash_table_unref(priv->statsSchema);
+ if (priv->statsSchema)
+ g_hash_table_unref(priv->statsSchema);
priv->statsSchema = schema;
return 0;
--
2.39.1
1 year, 10 months
[PATCH 0/7] qemu: Fix implicit q35 watchdog
by Martin Kletzander
More info in commit messages (duh).
Martin Kletzander (7):
Avoid unnecessary nesting
Support multiple watchdog devices
Add iTCO watchdog support
qemu: Enable iTCO watchdog by disabling its noreboot pin strap
qemu: Add implicit watchdog for q35 machine types
Document change to multiple watchdogs
news: Add information about iTCO watchdog changes
NEWS.rst | 6 ++
docs/formatdomain.rst | 10 ++-
src/conf/domain_conf.c | 83 +++++++++++++------
src/conf/domain_conf.h | 9 +-
src/conf/schemas/domaincommon.rng | 5 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 26 ++++--
src/qemu/qemu_alias.h | 5 +-
src/qemu/qemu_command.c | 34 ++++++--
src/qemu/qemu_domain.c | 44 ++++++++++
src/qemu/qemu_domain_address.c | 9 +-
src/qemu/qemu_driver.c | 14 ++--
src/qemu/qemu_hotplug.c | 71 +++++++---------
src/qemu/qemu_process.c | 3 +-
src/qemu/qemu_validate.c | 50 +++++++++++
.../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 +
tests/qemuxml2argvdata/autoindex.args | 2 +
.../boot-floppy-q35.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/boot-floppy-q35.xml | 1 +
tests/qemuxml2argvdata/cpu-host-model.args | 2 +
.../cpu-host-model.x86_64-4.2.0.args | 2 +
.../cpu-host-model.x86_64-5.0.0.args | 2 +
.../cpu-host-model.x86_64-5.1.0.args | 2 +
.../cpu-host-model.x86_64-5.2.0.args | 2 +
.../cpu-host-model.x86_64-6.0.0.args | 2 +
.../cpu-host-model.x86_64-6.1.0.args | 2 +
.../cpu-host-model.x86_64-latest.args | 2 +
.../disk-floppy-q35.x86_64-latest.args | 2 +
...are-auto-bios-stateless.x86_64-latest.args | 2 +
.../firmware-auto-bios.x86_64-latest.args | 2 +
...-auto-efi-enrolled-keys.x86_64-latest.args | 2 +
...-auto-efi-loader-secure.x86_64-latest.args | 2 +
...to-efi-no-enrolled-keys.x86_64-latest.args | 2 +
...are-auto-efi-no-secboot.x86_64-latest.args | 2 +
...firmware-auto-efi-nvram.x86_64-latest.args | 2 +
...rmware-auto-efi-secboot.x86_64-latest.args | 2 +
...ware-auto-efi-stateless.x86_64-latest.args | 2 +
.../firmware-auto-efi.x86_64-latest.args | 2 +
.../firmware-manual-efi-acpi-q35.args | 2 +
.../firmware-manual-efi-secure.args | 2 +
.../firmware-manual-noefi-acpi-q35.args | 2 +
.../firmware-manual-noefi-noacpi-q35.args | 2 +
...dev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args | 2 +
...ev-scsi-vhost-scsi-pcie.x86_64-latest.args | 2 +
.../hvf-x86_64-q35-headless.args | 2 +
.../intel-iommu-aw-bits.x86_64-latest.args | 2 +
.../qemuxml2argvdata/intel-iommu-aw-bits.xml | 1 +
...ntel-iommu-caching-mode.x86_64-latest.args | 2 +
.../intel-iommu-caching-mode.xml | 1 +
...ntel-iommu-device-iotlb.x86_64-latest.args | 2 +
.../intel-iommu-device-iotlb.xml | 1 +
.../intel-iommu-eim.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/intel-iommu-eim.xml | 1 +
.../intel-iommu.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/intel-iommu.xml | 1 +
...othreads-ids-pool-sizes.x86_64-latest.args | 2 +
.../iothreads-ids-pool-sizes.xml | 1 +
.../machine-smm-off.x86_64-latest.args | 2 +
.../machine-smm-on.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/pcie-expander-bus.args | 2 +
.../pcie-root-port-model-generic.args | 2 +
.../pcie-root-port-model-ioh3420.args | 2 +
...cie-root-port-nohotplug.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/pcie-root-port.args | 2 +
tests/qemuxml2argvdata/pcie-root.args | 2 +
.../pcie-switch-downstream-port.args | 2 +
.../pcie-switch-upstream-port.args | 2 +
tests/qemuxml2argvdata/pcihole64-q35.args | 2 +
...q35-default-devices-only.x86_64-4.2.0.args | 2 +
...35-default-devices-only.x86_64-latest.args | 2 +
.../q35-multifunction.x86_64-4.2.0.args | 2 +
.../q35-multifunction.x86_64-latest.args | 2 +
.../q35-pci-force-address.args | 2 +
.../q35-pcie-autoadd.x86_64-4.2.0.args | 2 +
.../q35-pcie-autoadd.x86_64-latest.args | 2 +
.../q35-pcie.x86_64-4.2.0.args | 2 +
.../q35-pcie.x86_64-latest.args | 2 +
.../q35-pm-disable-fallback.args | 2 +
tests/qemuxml2argvdata/q35-pm-disable.args | 2 +
tests/qemuxml2argvdata/q35-usb2-multi.args | 2 +
tests/qemuxml2argvdata/q35-usb2-reorder.args | 2 +
tests/qemuxml2argvdata/q35-usb2.args | 2 +
.../q35-virt-manager-basic.x86_64-4.2.0.args | 2 +
.../q35-virt-manager-basic.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/q35.args | 2 +
.../sgx-epc.x86_64-7.0.0.args | 2 +
tests/qemuxml2argvdata/sgx-epc.xml | 1 +
.../tseg-explicit-size.x86_64-latest.args | 2 +
.../usb-controller-default-q35.args | 2 +
.../usb-controller-explicit-q35.args | 2 +
.../user-aliases2.x86_64-latest.args | 2 +
.../vcpu-placement-static.args | 2 +
.../vcpu-placement-static.xml | 1 +
...vhost-user-fs-hugepages.x86_64-latest.args | 2 +
.../vhost-user-fs-hugepages.xml | 1 +
.../virtio-iommu-x86_64.x86_64-latest.args | 2 +
...virtio-non-transitional.x86_64-latest.args | 2 +
.../virtio-transitional.x86_64-latest.args | 2 +
.../watchdog-q35-multiple.x86_64-latest.args | 40 +++++++++
.../watchdog-q35-multiple.xml | 25 ++++++
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 2 +
...efault-cpu-tcg-features.x86_64-latest.args | 2 +
.../x86_64-default-cpu-tcg-features.xml | 1 +
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 2 +
.../x86_64-q35-graphics.x86_64-latest.args | 2 +
.../x86_64-q35-headless.x86_64-latest.args | 2 +
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/autoindex.xml | 1 +
...ware-auto-bios-stateless.x86_64-latest.xml | 1 +
.../firmware-auto-bios.x86_64-latest.xml | 1 +
...e-auto-efi-enrolled-keys.x86_64-latest.xml | 1 +
...e-auto-efi-loader-secure.x86_64-latest.xml | 1 +
...uto-efi-no-enrolled-keys.x86_64-latest.xml | 1 +
...ware-auto-efi-no-secboot.x86_64-latest.xml | 1 +
.../firmware-auto-efi-nvram.x86_64-latest.xml | 1 +
...irmware-auto-efi-secboot.x86_64-latest.xml | 1 +
.../firmware-auto-efi.x86_64-latest.xml | 1 +
...dev-scsi-vhost-scsi-pcie.x86_64-latest.xml | 1 +
.../hvf-x86_64-q35-headless.xml | 1 +
.../machine-smm-off.x86_64-latest.xml | 1 +
.../machine-smm-on.x86_64-latest.xml | 1 +
.../net-isolated-port.x86_64-latest.xml | 1 +
.../qemuxml2xmloutdata/pcie-expander-bus.xml | 1 +
.../pcie-root-port-model-generic.xml | 1 +
.../pcie-root-port-model-ioh3420.xml | 1 +
...pcie-root-port-nohotplug.x86_64-latest.xml | 1 +
tests/qemuxml2xmloutdata/pcie-root-port.xml | 1 +
tests/qemuxml2xmloutdata/pcie-root.xml | 1 +
.../pcie-switch-downstream-port.xml | 1 +
.../pcie-switch-upstream-port.xml | 1 +
tests/qemuxml2xmloutdata/pcihole64-q35.xml | 1 +
...q35-default-devices-only.x86_64-latest.xml | 1 +
.../q35-multifunction.x86_64-latest.xml | 1 +
.../q35-pci-force-address.xml | 1 +
.../q35-pcie-autoadd.x86_64-latest.xml | 1 +
.../q35-pcie.x86_64-latest.xml | 1 +
tests/qemuxml2xmloutdata/q35-usb2-multi.xml | 1 +
tests/qemuxml2xmloutdata/q35-usb2-reorder.xml | 1 +
tests/qemuxml2xmloutdata/q35-usb2.xml | 1 +
.../q35-virt-manager-basic.x86_64-latest.xml | 1 +
tests/qemuxml2xmloutdata/q35.xml | 1 +
.../tseg-explicit-size.x86_64-latest.xml | 1 +
.../usb-controller-default-q35.xml | 1 +
.../usb-controller-explicit-q35.xml | 1 +
.../virtio-iommu-x86_64.x86_64-latest.xml | 1 +
.../virtio-non-transitional.x86_64-latest.xml | 1 +
.../virtio-transitional.x86_64-latest.xml | 1 +
.../watchdog-q35-multiple.x86_64-latest.xml | 51 ++++++++++++
...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 1 +
...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 1 +
.../x86_64-q35-graphics.x86_64-latest.xml | 1 +
.../x86_64-q35-headless.x86_64-latest.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
153 files changed, 601 insertions(+), 97 deletions(-)
create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.xml
create mode 100644 tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml
--
2.39.1
1 year, 10 months