[libvirt] [PATCH v2 00/11] Add admin protocol support for virtlogd/virtlockd
by Daniel P. Berrange
The initial admin protocol support was only integrated into libvirtd.
This series extracts that code so that it is reusable with all the
daemons we have (and more than we'll get).
In v2:
- Fixed completely broken post-exec restart support for admin servers
- Misc fixes from v1 review
Daniel P. Berrange (11):
admin: move admins server impl/dispatch into src/admin directory
libvirtd: rename virNetServerClient callback impls to match type names
admin: add support for post-exec restart callbacks
util: add virGetUNIXSocketPath helper
rpc: clarify "void *" values passed to client callbacks
rpc: pass virNetServer to post-exec restart callback in typesafe
manner
rpc: annotate various parameters as being required to be non-NULL
rpc: add method for checking if a named server exists
rpc: refactor virNetServer setup for post-exec restarts
logd: add support for admin protocol in virtlogd
lockd: add support for admin protocol in virtlockd
.gitignore | 1 +
cfg.mk | 10 +-
daemon/Makefile.am | 33 +---
daemon/libvirtd.c | 10 +-
daemon/libvirtd.h | 10 --
daemon/remote.c | 6 +-
daemon/remote.h | 6 +-
po/POTFILES.in | 6 +-
src/Makefile.am | 33 +++-
{daemon => src/admin}/admin_server.c | 4 +-
{daemon => src/admin}/admin_server.h | 6 +-
.../admin.c => src/admin/admin_server_dispatch.c | 48 ++++--
.../admin.h => src/admin/admin_server_dispatch.h | 18 +-
src/libvirt-admin.c | 23 ++-
src/libvirt_private.syms | 1 +
src/libvirt_remote.syms | 2 +-
src/locking/lock_daemon.c | 186 +++++++++++++++-----
src/locking/lock_daemon_config.c | 3 +
src/locking/lock_daemon_config.h | 1 +
src/locking/test_virtlockd.aug.in | 4 +
src/locking/virtlockd-admin.socket.in | 10 ++
src/locking/virtlockd.aug | 1 +
src/locking/virtlockd.conf | 6 +
src/locking/virtlockd.service.in | 1 +
src/logging/log_daemon.c | 188 ++++++++++++++++-----
src/logging/log_daemon_config.c | 3 +
src/logging/log_daemon_config.h | 1 +
src/logging/test_virtlogd.aug.in | 4 +
src/logging/virtlogd-admin.socket.in | 10 ++
src/logging/virtlogd.aug | 1 +
src/logging/virtlogd.service.in | 1 +
src/rpc/virnetdaemon.c | 164 ++++++++++--------
src/rpc/virnetdaemon.h | 20 ++-
src/rpc/virnetserver.c | 6 +-
src/rpc/virnetserver.h | 7 +-
src/rpc/virnetserverclient.c | 14 +-
src/rpc/virnetserverclient.h | 23 ++-
src/rpc/virnetserverprogram.h | 3 -
src/util/virutil.c | 45 +++++
src/util/virutil.h | 1 +
tests/virnetdaemontest.c | 37 +++-
41 files changed, 670 insertions(+), 287 deletions(-)
rename {daemon => src/admin}/admin_server.c (99%)
rename {daemon => src/admin}/admin_server.h (96%)
rename daemon/admin.c => src/admin/admin_server_dispatch.c (92%)
rename daemon/admin.h => src/admin/admin_server_dispatch.h (59%)
create mode 100644 src/locking/virtlockd-admin.socket.in
create mode 100644 src/logging/virtlogd-admin.socket.in
--
2.14.3
6 years, 9 months
[libvirt] [PATCH] qemu: Expose rx/tx_queue_size in qemu.conf too
by Michal Privoznik
In 2074ef6cd4a2 and c56cdf259 (and friends) we've added two
attributes to virtio NICs: rx_queue_size and tx_queue_size.
However, sysadmins might want to set these on per-host basis but
don't necessarily have an access to domain XML (e.g. because they
are generated by some other app). So let's expose them under
qemu.conf (the settings from domain XML still take precedence as
they are more specific ones).
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/formatdomain.html.in | 12 +++++++++--
src/qemu/libvirtd_qemu.aug | 4 ++++
src/qemu/qemu.conf | 7 +++++++
src/qemu/qemu_command.c | 42 ++++++++++++++++++++++++++++++--------
src/qemu/qemu_command.h | 3 ++-
src/qemu/qemu_conf.c | 4 ++++
src/qemu/qemu_conf.h | 3 +++
src/qemu/qemu_hotplug.c | 2 +-
src/qemu/test_libvirtd_qemu.aug.in | 2 ++
9 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d272cc1ba..c0107ab4b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5373,7 +5373,11 @@ qemu-kvm -net nic,model=? /dev/null
some restrictions on actual value. For instance, latest
QEMU (as of 2016-09-01) requires value to be a power of two
from [256, 1024] range.
- <span class="since">Since 2.3.0 (QEMU and KVM only)</span><br/><br/>
+ <span class="since">Since 2.3.0 (QEMU and KVM only)</span>
+ Then, <span class="since">Since 4.1.0</span> the default value can be
+ set in <code>qemu.conf</code> file and thus overrides hypervisor
+ default.
+ <br/><br/>
<b>In general you should leave this option alone, unless you
are very certain you know what you are doing.</b>
@@ -5389,7 +5393,11 @@ qemu-kvm -net nic,model=? /dev/null
range. In addition to that, this may work only for a subset of
interface types, e.g. aforementioned QEMU enables this option
only for <code>vhostuser</code> type.
- <span class="since">Since 3.7.0 (QEMU and KVM only)</span><br/><br/>
+ <span class="since">Since 3.7.0 (QEMU and KVM only)</span>
+ Then, <span class="since">Since 4.1.0</span> the default value can be
+ set in <code>qemu.conf</code> file and thus overrides hypervisor
+ default.
+ <br/><br/>
<b>In general you should leave this option alone, unless you
are very certain you know what you are doing.</b>
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index c19bf3a43..084290296 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -118,6 +118,9 @@ module Libvirtd_qemu =
let vxhs_entry = bool_entry "vxhs_tls"
| str_entry "vxhs_tls_x509_cert_dir"
+ let virtio_entry = int_entry "rx_queue_size"
+ | int_entry "tx_queue_size"
+
(* Each entry in the config is one of the following ... *)
let entry = default_tls_entry
| vnc_entry
@@ -137,6 +140,7 @@ module Libvirtd_qemu =
| gluster_debug_level_entry
| memory_entry
| vxhs_entry
+ | virtio_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 43dd561cc..a945ebdd5 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -775,3 +775,10 @@
# This directory is used for memoryBacking source if configured as file.
# NOTE: big files will be stored here
#memory_backing_dir = "/var/lib/libvirt/qemu/ram"
+
+# The following two values set the default RX/TX ring buffer size for virtio
+# interfaces. These values are taken unless overridden in domain XML. Please
+# note that QEMU accepts 256, 512 and 1024 only. These values correspond to
+# those from domain XML.
+#rx_queue_size = 1024
+#tx_queue_size = 1024
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b8aede32d..771c12445 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3693,7 +3693,8 @@ qemuBuildNicStr(virDomainNetDefPtr net,
char *
-qemuBuildNicDevStr(virDomainDefPtr def,
+qemuBuildNicDevStr(virQEMUDriverConfigPtr cfg,
+ virDomainDefPtr def,
virDomainNetDefPtr net,
int vlan,
unsigned int bootindex,
@@ -3813,21 +3814,40 @@ qemuBuildNicDevStr(virDomainDefPtr def,
virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2);
}
}
- if (usingVirtio && net->driver.virtio.rx_queue_size) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE)) {
+ if (usingVirtio) {
+ unsigned int rx_queue_size = net->driver.virtio.rx_queue_size;
+
+ if (rx_queue_size == 0 &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE))
+ rx_queue_size = cfg->rx_queue_size;
+
+
+ if (rx_queue_size &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE)) {
+ net->driver.virtio.rx_queue_size = rx_queue_size;
+ virBufferAsprintf(&buf, ",rx_queue_size=%u", rx_queue_size);
+ } else if (rx_queue_size) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("virtio rx_queue_size option is not supported with this QEMU binary"));
goto error;
}
- virBufferAsprintf(&buf, ",rx_queue_size=%u", net->driver.virtio.rx_queue_size);
}
- if (usingVirtio && net->driver.virtio.tx_queue_size) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE)) {
+ if (usingVirtio) {
+ unsigned int tx_queue_size = net->driver.virtio.tx_queue_size;
+
+ if (tx_queue_size == 0 &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE))
+ tx_queue_size = cfg->tx_queue_size;
+
+ if (tx_queue_size &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE)) {
+ net->driver.virtio.tx_queue_size = tx_queue_size;
+ virBufferAsprintf(&buf, ",tx_queue_size=%u", tx_queue_size);
+ } else if (tx_queue_size) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("virtio tx_queue_size option is not supported with this QEMU binary"));
goto error;
}
- virBufferAsprintf(&buf, ",tx_queue_size=%u", net->driver.virtio.tx_queue_size);
}
if (usingVirtio && net->mtu) {
@@ -8489,7 +8509,7 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver,
virCommandAddArg(cmd, netdev);
VIR_FREE(netdev);
- if (!(nic = qemuBuildNicDevStr(def, net, -1, bootindex,
+ if (!(nic = qemuBuildNicDevStr(cfg, def, net, -1, bootindex,
queues, qemuCaps))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("Error generating NIC -device string"));
@@ -8526,6 +8546,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
int **nicindexes,
bool chardevStdioLogd)
{
+ virQEMUDriverConfigPtr cfg;
int ret = -1;
char *nic = NULL, *host = NULL;
int *tapfd = NULL;
@@ -8587,6 +8608,8 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
return -1;
}
+ cfg = virQEMUDriverGetConfig(driver);
+
switch (actualType) {
case VIR_DOMAIN_NET_TYPE_NETWORK:
case VIR_DOMAIN_NET_TYPE_BRIDGE:
@@ -8782,7 +8805,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
virCommandAddArgList(cmd, "-netdev", host, NULL);
}
if (qemuDomainSupportsNicdev(def, net)) {
- if (!(nic = qemuBuildNicDevStr(def, net, vlan, bootindex,
+ if (!(nic = qemuBuildNicDevStr(cfg, def, net, vlan, bootindex,
vhostfdSize, qemuCaps)))
goto cleanup;
virCommandAddArgList(cmd, "-device", nic, NULL);
@@ -8826,6 +8849,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
VIR_FREE(host);
VIR_FREE(tapfdName);
VIR_FREE(vhostfdName);
+ virObjectUnref(cfg);
return ret;
}
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index bdde6f918..85f7bd1b4 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -90,7 +90,8 @@ char *qemuBuildNicStr(virDomainNetDefPtr net,
int vlan);
/* Current, best practice */
-char *qemuBuildNicDevStr(virDomainDefPtr def,
+char *qemuBuildNicDevStr(virQEMUDriverConfigPtr cfg,
+ virDomainDefPtr def,
virDomainNetDefPtr net,
int vlan,
unsigned int bootindex,
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index af503d31c..2fa96431f 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -912,6 +912,10 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
if (virConfGetValueString(conf, "memory_backing_dir", &cfg->memoryBackingDir) < 0)
goto cleanup;
+ if (virConfGetValueUInt(conf, "rx_queue_size", &cfg->rx_queue_size) < 0 ||
+ virConfGetValueUInt(conf, "tx_queue_size", &cfg->tx_queue_size) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index a553e30e2..3f38a76c2 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -206,6 +206,9 @@ struct _virQEMUDriverConfig {
bool vxhsTLS;
char *vxhsTLSx509certdir;
+
+ unsigned int rx_queue_size;
+ unsigned int tx_queue_size;
};
/* Main driver state */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 6b245bd6a..18b460704 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1116,7 +1116,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
for (i = 0; i < vhostfdSize; i++)
VIR_FORCE_CLOSE(vhostfd[i]);
- if (!(nicstr = qemuBuildNicDevStr(vm->def, net, vlan, 0,
+ if (!(nicstr = qemuBuildNicDevStr(cfg, vm->def, net, vlan, 0,
queueSize, priv->qemuCaps)))
goto try_remove;
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 688e5b9fd..4fc4e2f4e 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -100,3 +100,5 @@ module Test_libvirtd_qemu =
{ "1" = "mount" }
}
{ "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
+{ "rx_queue_size" = "1024" }
+{ "tx_queue_size" = "1024" }
--
2.13.6
6 years, 9 months
[libvirt] [PATCH v2 0/6] Last CAT fixups v2
by Martin Kletzander
Few finishing touches for the Cache Allocation Technology. This series
copies the default group's mask to newly created groups, fixes a
possible wrong memory access, and cleans up after domains even if daemon
was restarted.
Martin Kletzander (6):
util: Add helpers for getting resctrl group allocs
util: Use default group's mask for unspecified resctrl allocations
util: Don't overwrite mask in virResctrlAllocFindUnused
qemu: Restore machinename even without cgroups
util: Extract path formatting into virResctrlAllocDeterminePath
qemu: Restore resctrl alloc data after restart
src/libvirt_private.syms | 1 +
src/qemu/qemu_cgroup.c | 4 -
src/qemu/qemu_process.c | 11 +++
src/util/virresctrl.c | 219 +++++++++++++++++++++++++++++------------------
src/util/virresctrl.h | 4 +
5 files changed, 152 insertions(+), 87 deletions(-)
--
2.15.1
6 years, 9 months
[libvirt] [Question] nodedev-list --cap return nothing after creating a mdev
by Wuzongyong (Euler Dept)
Hi,
I meet a problem that libvirt handle new mediated devices wrongly.
Command `virsh nodedev-list -cap mdev` return none after I create a mdev, and the root cause I found is:
// kernel code
int mdev_device_create(struct kobject *kobj, struct device *dev, uuid_le uuid)
{
...
ret = device_register(&mdev->dev); // send udev event here --- 1
if (ret) {
put_device(&mdev->dev);
goto create_err;
}
ret = mdev_device_create_ops(kobj, mdev);
if (ret)
goto create_failed;
ret = mdev_create_sysfs_files(&mdev->dev, type); // create mdev_type symbol link here --- 2
if (ret) {
mdev_device_remove_ops(mdev, true);
goto create_failed;
}
mdev->type_kobj = kobj;
dev_dbg(&mdev->dev, "MDEV: created\n");
...
}
At point 1, kernel send a udev event(add). If libvirt receive this event and handle it before kernel code reach point 2, libvirt
just fail to resolve link such as '/sys/devices/pci0000:80/0000:80:02.0/0000:81:00.0/36b79575-ada8-4406-893d-8cfd8d10a984/mdev_type'
because the link haven't been created yet. Then libvirt thinks this devices doesn't exsit and stop tracking info of this device.
Finally, command `vish nodedev-list -cap` return nothing though the device exist at host indeed.
To make it easy to reproduce this problem, I just add a `udelay(1)` before point 2 by kprobe.
So I think maybe we should add 'kobject_uevent(..., KOBJ_ADD)' after point 2 instead of point 1 ?
Or is there any other method to solve this problem?
Thanks,
Zongyong Wu
6 years, 9 months
[libvirt] [PATCH] tools: unlink bash completion files before symlinking
by Daniel P. Berrangé
"ln" will not replace an existing symlink, so if you run 'make install'
twice, the second time will get an error:
ln: failed to create symbolic link 'virsh': File exists
We must always remove the symlink target first.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a build fix
tools/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e173f56347..4c33e78a1d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -425,6 +425,7 @@ install-bash-completion:
$(INSTALL_SCRIPT) $(srcdir)/bash-completion/vsh \
"$(DESTDIR)$(BASH_COMPLETIONS_DIR)/vsh"
( cd $(DESTDIR)$(BASH_COMPLETIONS_DIR) && \
+ rm -f virsh virt-admin && \
$(LN_S) vsh virsh && \
$(LN_S) vsh virt-admin )
--
2.14.3
6 years, 9 months
[libvirt] [PATCH] cpu: Add support for al57 Intel features
by Shaohe Feng
We can start qemu with a "cpu,+la57" to set 57-bit vitrual address
space. So VM can be aware that it need to enable 5-level paging.
Corresponding QEMU commits:
al57 6c7c3c21f95dd9af8a0691c0dd29b07247984122
---
src/cpu/cpu_map.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index e5da7a8..922a195 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -285,6 +285,9 @@
<feature name='ospke'>
<cpuid eax_in='0x07' ecx_in='0x00' ecx='0x00000010'/>
</feature>
+ <feature name='la57'>
+ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x00010000'/>
+ </feature>
<feature name='avx512-4vnniw'>
<cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000004'/>
--
2.7.4
6 years, 9 months
[libvirt] [PATCH go] go: Add ERR_DEVICE_MISSING constants
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
error.go | 3 +++
error_compat.h | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/error.go b/error.go
index fb218f7..9de277c 100644
--- a/error.go
+++ b/error.go
@@ -353,6 +353,9 @@ const (
// error in libssh transport driver
ERR_LIBSSH = ErrorNumber(C.VIR_ERR_LIBSSH)
+
+ // libvirt fail to find the desired device
+ ERR_DEVICE_MISSING = ErrorNumber(C.VIR_ERR_DEVICE_MISSING)
)
type ErrorDomain int
diff --git a/error_compat.h b/error_compat.h
index f26dc09..64ed991 100644
--- a/error_compat.h
+++ b/error_compat.h
@@ -147,4 +147,10 @@
#define VIR_FROM_RESCTRL 67
#endif
+/* 4.1.0 */
+
+#ifndef VIR_ERR_DEVICE_MISSING
+#define VIR_ERR_DEVICE_MISSING 99
+#endif
+
#endif /* LIBVIRT_GO_ERROR_COMPAT_H__ */
--
2.14.3
6 years, 9 months
[libvirt] [PATCH perl] perl: Add ERR_DEVICE_MISSING constants
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
Changes | 2 +-
Virt.xs | 1 +
lib/Sys/Virt/Error.pm | 4 ++++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Changes b/Changes
index eda3ec5..22d5752 100644
--- a/Changes
+++ b/Changes
@@ -2,7 +2,7 @@ Revision history for perl module Sys::Virt
4.1.0 2018-00-00
- - XXX
+ - Add VIR_ERR_DEVICE_MISSING constants
4.0.0 2018-01-23
diff --git a/Virt.xs b/Virt.xs
index 7d2f1a7..f19880f 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -9488,4 +9488,5 @@ BOOT:
REGISTER_CONSTANT(VIR_ERR_NO_CLIENT, ERR_NO_CLIENT);
REGISTER_CONSTANT(VIR_ERR_AGENT_UNSYNCED, ERR_AGENT_UNSYNCED);
REGISTER_CONSTANT(VIR_ERR_LIBSSH, ERR_LIBSSH);
+ REGISTER_CONSTANT(VIR_ERR_DEVICE_MISSING, ERR_DEVICE_MISSING);
}
diff --git a/lib/Sys/Virt/Error.pm b/lib/Sys/Virt/Error.pm
index b97985d..78f33f3 100644
--- a/lib/Sys/Virt/Error.pm
+++ b/lib/Sys/Virt/Error.pm
@@ -812,6 +812,10 @@ Libvirt guest agent replies with wrong id to guest-sync command
The libSSH operation failed
+=item Sys::Virt::Error::ERR_DEVICE_MISSING
+
+Libvirt fail to find the desired device.
+
=back
=head1 AUTHORS
--
2.14.3
6 years, 9 months
[libvirt] [PATCH] conf: Small indentation and coding style fixes
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8efe83489..b83e31d8c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -26862,8 +26862,9 @@ virDomainDefFormatInternal(virDomainDefPtr def,
case VIR_DOMAIN_FEATURE_CAPABILITIES:
if (def->features[i] == VIR_DOMAIN_CAPABILITIES_POLICY_DEFAULT &&
- !virDomainDefHasCapabilitiesFeatures(def))
+ !virDomainDefHasCapabilitiesFeatures(def)) {
break;
+ }
virBufferAsprintf(buf, "<capabilities policy='%s'>\n",
virDomainCapabilitiesPolicyTypeToString(def->features[i]));
--
2.14.3
6 years, 9 months