[libvirt] [RFC PATCH 0/3] RFC for X86 RDT Cache Monitoring Technology (CMT) support
by Wang Huaqiang
This is an RFC request for supporting CPU Cache Monitoring Technology (CMT) feature in libvirt. Since MBM is also another feature which is very close to CMT, for simplicity we only discuss CMT here. MBM is the followup that will be implemented after CMT.
About CMT please refer to Intel x86 SDM section 17.18 of volume 3 (link:https://software.intel.com/en-us/articles/intel-sdm).
## About '_virResctrlMon' interface
The cache allocation technology (CAT) has already been implemented in util/virresctrl.* which interacts with Linux kernel resctrl file system. Very simlimar to CAT, the CMT object is represented by 'struct _virResctrlMon', which is
```
struct _virResctrlMon {
virObject parent;
/* pairedalloc: pointer to a resctrl allocaion it paried with.
* NULL for a resctrl monitoring group not associated with
* any allocation. */
virResctrlAllocPtr pairedalloc;
/* The identifier (any unique string for now) */
char *id;
/* libvirt-generated path, may be identical to alloction path
* may not if allocation is ready */
char *path;
};
```
Almost following the same logic behind '_virResctrlAlloc' which is mainly presented in file 'virresctrl.c', a group of APIs has been designed to manipulate '_virResctrlMon'. The '_virResctrlMon' shares a lot in common with '_virResctrlAlloc' except field 'pairedalloc'.
'pairedalloc' stores the pointer of paired resctrl allocation object. With current libvirt resctrl implementation, if a resctrl '_virResctrlAlloc' object is created, the CMT hardware is enabled automatically and shares the same folder under same resctrlfs, I call the CMT '_virResctrlMon' object that shares the same folder under resctrlfs as 'paired' _virResctrlMon, further, one '_virResctrlMon' and one '_virResctrlAlloc' are a pare. In '_virResctrlMon' the paired '_virResctrlAlloc' is tracked through pairedalloc. paired mon group could not be dynamically enabled or disabled during runtime.
'pairedalloc' could be set to NULL, which creates a non-paired mon group object. Which is necessory because CMT could work independently to monitor the utilization of critical CPU resouces (cache or memory bandwidth) without allocating any dedicated cache or memory bandwidth. A non-paired mon group object represents an independent working CMT. Non-paired mon group could be enabled or disabled during runtime.
## About virsh command 'resctrl'
To set or get the resctrl mon group (hardware CMT), a virsh command 'resctrl' is created. here are the common usages:
```
[root@dl-c200 david]# virsh list --all
Id Name State
----------------------------------------------------
1 vm3 running
3 vm2 running
- vm1 shut off
```
### Test on a running domain vm3
To get RDT monitoring status, type 'virsh resctrl <domain>'
```
[root@dl-c200 david]# virsh resctrl vm3
RDT Monitoring Status: Enabled
```
To enable RDT monitoring, type 'virsh resctrl <domain> --enable'
```
[root@dl-c200 david]# virsh resctrl vm3 --enable
RDT Monitoring Status: Enabled
```
To diable RDT monitoring, type 'virsh resctrl <domain> --disable'
```
[root@dl-c200 david]# virsh resctrl vm3 --disable
RDT Monitoring Status: Disabled
[root@dl-c200 david]# virsh resctrl vm3
RDT Monitoring Status: Disabled
```
### test on domain not running vm1
if domain is not active, it will fail to set RDT monitoring status, and also get the state of 'disabled'
```
[root@dl-c200 david]# virsh resctrl vm1
RDT Monitoring Status: Disabled
[root@dl-c200 david]# virsh resctrl vm1 --enable
error: Requested operation is not valid: domain is not running
[root@dl-c200 david]# virsh resctrl vm1 --disable
error: Requested operation is not valid: domain is not running
```
### test on domain vm2
domain vm2 is active and the CAT functionality is enabled through 'cachetune' (configured in 'cputune/cachetune' section). So the resctrl mon group is a 'paried' one, for 'pared' mon group, the RDT monitoring could not be disabled. If it is allowed to disable 'paire' mon group, we have to destroy resctrl allocation folders which is not supported by current cache allocation design.
```
[root@dl-c200 libvirt]# virsh resctrl vm2 --enable
RDT Monitoring Status: Enabled (forced by cachetune)
[root@dl-c200 libvirt]# virsh resctrl vm2 --disable
RDT Monitoring Status: Enabled (forced by cachetune)
[root@dl-c200 libvirt]# virsh resctrl vm2
RDT Monitoring Status: Enabled (forced by cachetune)
```
## About showing the utilization information of RDT
A domstats field has been created to show the utilization of RDT resources, the command is like this:
```
[root@dl-c200 libvirt]# virsh domstats --resctrl
Domain: 'vm1'
resctrl.cmt=0
Domain: 'vm3'
resctrl.cmt=180224
Domain: 'vm2'
resctrl.cmt=2613248
```
Wang Huaqiang (3):
util: add Intel x86 RDT/CMT support
tools: virsh: add command for controling/monitoring resctrl
tools: virsh domstats: show RDT CMT resource utilization information
include/libvirt/libvirt-domain.h | 10 ++
src/conf/domain_conf.c | 28 ++++
src/conf/domain_conf.h | 3 +
src/driver-hypervisor.h | 8 +
src/libvirt-domain.c | 92 +++++++++++
src/libvirt_private.syms | 9 +
src/libvirt_public.syms | 6 +
src/qemu/qemu_driver.c | 189 +++++++++++++++++++++
src/qemu/qemu_process.c | 65 +++++++-
src/remote/remote_daemon_dispatch.c | 45 +++++
src/remote/remote_driver.c | 2 +
src/remote/remote_protocol.x | 28 +++-
src/remote_protocol-structs | 12 ++
src/util/virresctrl.c | 316 +++++++++++++++++++++++++++++++++++-
src/util/virresctrl.h | 44 +++++
tools/virsh-domain-monitor.c | 7 +
tools/virsh-domain.c | 74 +++++++++
17 files changed, 933 insertions(+), 5 deletions(-)
--
2.7.4
6 years, 5 months
[libvirt] [PATCH] appdev-guide/Connections: Remove duplicated entries
by Marcos Paulo de Souza
Both /hosts/cpu/arch and /hosts/cpu/features appear twice in the documentation.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org(a)gmail.com>
---
This is my first submission to libvirt, so let me know if I forgot something.
en-US/Connections.xml | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/en-US/Connections.xml b/en-US/Connections.xml
index 96fe011..d7b6af6 100644
--- a/en-US/Connections.xml
+++ b/en-US/Connections.xml
@@ -963,17 +963,6 @@ int main(int argc, char *argv[])
CPU architecture. As of this writing, all libvirt drivers initialize this
from the output of uname(2).
</para>
- <para>
- <literal>/host/cpu/features</literal> is an optional sub-document that describes additional cpu
- features present on the host. As of this writing, it is only used by the
- xen driver to report on the presence or lack of the svm or vmx flag, and to
- report on the presence or lack of the pae flag.
- </para>
- <para>
- <literal>/host/cpu/arch</literal> is a required XML node that describes the underlying
- host CPU architecture. As of this writing, all libvirt drivers
- initialize this from the output of uname(2).
- </para>
<para>
<literal>/host/cpu/model</literal> is an optional element that describes the CPU model
that the host CPUs most closely resemble. The list of CPU models
--
2.17.1
6 years, 5 months
[libvirt] [PATCH] docs: schema: Add missing <interleave> to devices
by Han Han
For input,hub,redirdev devices, their sub-elements should be interleaved.
input device: interleave for <driver>, <alias>, <address>
hub device: interleave for <alias>, <address>
redirdev device: interleave for <source>, <alias>, <address>, <boot>
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/schemas/domaincommon.rng | 60 +++++++++++++++++++----------------
1 file changed, 33 insertions(+), 27 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4a454dddb4..d262eb2b1b 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4270,11 +4270,19 @@
<define name="input">
<element name="input">
- <optional>
- <element name="driver">
- <ref name="virtioOptions"/>
- </element>
- </optional>
+ <interleave>
+ <optional>
+ <element name="driver">
+ <ref name="virtioOptions"/>
+ </element>
+ </optional>
+ <optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
+ <ref name="address"/>
+ </optional>
+ </interleave>
<choice>
<group>
<attribute name="type">
@@ -4309,12 +4317,6 @@
</element>
</group>
</choice>
- <optional>
- <ref name="alias"/>
- </optional>
- <optional>
- <ref name="address"/>
- </optional>
</element>
</define>
<define name="hub">
@@ -4322,12 +4324,14 @@
<attribute name="type">
<value>usb</value>
</attribute>
- <optional>
- <ref name="alias"/>
- </optional>
- <optional>
- <ref name="address"/>
- </optional>
+ <interleave>
+ <optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
+ <ref name="address"/>
+ </optional>
+ </interleave>
</element>
</define>
<define name="redirdev">
@@ -4338,16 +4342,18 @@
<attribute name="type">
<ref name="qemucdevSrcTypeChoice"/>
</attribute>
- <ref name="qemucdevSrcDef"/>
- <optional>
- <ref name="alias"/>
- </optional>
- <optional>
- <ref name="address"/>
- </optional>
- <optional>
- <ref name="deviceBoot"/>
- </optional>
+ <interleave>
+ <ref name="qemucdevSrcDef"/>
+ <optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
+ <ref name="address"/>
+ </optional>
+ <optional>
+ <ref name="deviceBoot"/>
+ </optional>
+ </interleave>
</element>
</define>
<define name="redirfilter">
--
2.17.1
6 years, 5 months
[libvirt] [PATCH] qemu: Fix memory leak in qemuDomainBlockJobSetSpeed()
by w00251574
Subject: [PATCH] qemu: Fix memory leak in qemuDomainBlockJobSetSpeed()
fix 'device' leak in qemuDomainBlockJobSetSpeed
Signed-off-by: Jie Wang <wangjie88.huawei.com>
---
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 921aafcd79..b45c26eb3b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17395,6 +17395,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
qemuDomainObjEndJob(driver, vm);
cleanup:
+ VIR_FREE(device);
virDomainObjEndAPI(&vm);
return ret;
--
2.15.0.windows.1
6 years, 5 months
[libvirt] [PATCH] spec: Move SASL configuration file from -libs to -daemon
by Andrea Bolognani
SASL authentication is configured server-side, so the sample
configuration file should be shipped along with the daemon
rather than with the libraries.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index ace05820aa..54549cc737 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1773,6 +1773,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
+%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
@@ -2060,8 +2061,6 @@ exit 0
%{_datadir}/libvirt/test-screenshot.png
-%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
-
%files admin
%{_mandir}/man1/virt-admin.1*
%{_bindir}/virt-admin
--
2.17.1
6 years, 5 months
[libvirt] [PATCH v1 00/21] use GCC's cleanup attribute in src/util
by Sukrit Bhatnagar
This series of patches introduces a new set of macros which help in
using GCC's __attribute__((cleanup)) in the code.
Then the patches modify a few files in src/util to use VIR_AUTOFREE
and VIR_AUTOPTR for automatic freeing of memory and get rid of some
VIR_FREE macro invocations and *Free function calls.
Sukrit Bhatnagar (21):
add macros for implementing automatic cleanup functionality
util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: iohelper: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: audit: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: fcp: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: eventpoll: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: filecache: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: authconfig: define cleanup function using
VIR_DEFINE_AUTOPTR_FUNC
util: authconfig: remove redundant include directive
util: authconfig: use VIR_AUTOFREE instead of VIR_FREE for scalar
types
util: auth: remove redundant include directive
util: auth: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: auth: use VIR_AUTOPTR for aggregate types
util: json: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: json: remove redundant include directive
util: json: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: json: use VIR_AUTOPTR for aggregate types
util: identity: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: bitmap: remove redundant include directive
util: bitmap: use VIR_AUTOPTR for aggregate types
src/util/iohelper.c | 4 +--
src/util/viralloc.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
src/util/virarptable.c | 14 +++-------
src/util/viraudit.c | 3 +--
src/util/virauth.c | 61 +++++++++++++------------------------------
src/util/virauthconfig.c | 35 +++++++++----------------
src/util/virauthconfig.h | 3 +++
src/util/virbitmap.c | 8 ++----
src/util/virbitmap.h | 3 +++
src/util/vireventpoll.c | 7 ++---
src/util/virfcp.c | 20 +++++---------
src/util/virfilecache.c | 35 ++++++++-----------------
src/util/viridentity.c | 54 ++++++++++++++++----------------------
src/util/virjson.c | 45 +++++++++-----------------------
src/util/virjson.h | 3 +++
15 files changed, 168 insertions(+), 195 deletions(-)
--
1.8.3.1
6 years, 5 months
[libvirt] [dbus PATCH] connect: fix deregistering of NodeDevice events
by Anya Harter
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
src/connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/connect.c b/src/connect.c
index 09e5628..32dda14 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -68,7 +68,7 @@ virtDBusConnectClose(virtDBusConnect *connect,
for (gint i = 0; i < VIR_NODE_DEVICE_EVENT_ID_LAST; i++) {
if (connect->nodeDevCallbackIds[i] >= 0) {
if (deregisterEvents) {
- virConnectNetworkEventDeregisterAny(connect->connection,
+ virConnectNodeDeviceEventDeregisterAny(connect->connection,
connect->nodeDevCallbackIds[i]);
}
connect->nodeDevCallbackIds[i] = -1;
--
2.17.1
6 years, 5 months
[libvirt] [PATCH] qemu: format serial, geometry and error policy on frontend disk device
by Daniel P. Berrangé
Currently we format the serial, geometry and error policy on the -drive
backend argument.
QEMU added the ability to set serial and geometry on the frontend in
the 1.2 release, and ability to set error policy in the 2.7 release.
usb-storage is an oddity, however, as it lacks error policy support
right now.
Setting any of these on -drive has been deprecated and support for this
will be removed very soon.
Note that some disk buses (sd) still don't support -device. Although
QEMU allowed these properties to be set on -drive for if=sd, they
have been ignored so we don't loose anything by removing this.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 31 ++++++++++++++++---
.../caps_2.10.0.aarch64.xml | 1 +
.../caps_2.10.0.ppc64.xml | 1 +
.../caps_2.10.0.s390x.xml | 1 +
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
.../caps_2.7.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
.../caps_2.8.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
.../caps_2.9.0.x86_64.xml | 1 +
.../disk-drive-network-tlsx509.args | 12 +++----
.../disk-drive-network-vxhs.args | 4 +--
tests/qemuxml2argvdata/disk-drive-shared.args | 5 +--
tests/qemuxml2argvdata/disk-geometry.args | 6 ++--
tests/qemuxml2argvdata/disk-ide-wwn.args | 5 ++-
.../qemuxml2argvdata/disk-scsi-disk-wwn.args | 4 +--
tests/qemuxml2argvdata/disk-serial.args | 10 +++---
tests/qemuxml2argvdata/disk-serial.xml | 1 -
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/disk-serial.xml | 1 -
29 files changed, 69 insertions(+), 30 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 419208ad5c..b9a6c2d612 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -500,6 +500,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 310 */
"sev-guest",
+ "disk-error",
);
@@ -1162,6 +1163,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBlk[] = {
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
+ { "werror", QEMU_CAPS_DISK_ERROR },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioNet[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 3519a194e9..1245fb46cf 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -484,6 +484,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 310 */
QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
+ QEMU_CAPS_DISK_ERROR, /* -device $DISK,werror=,rerror=X */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 446df3e1d8..e97158fe64 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1621,8 +1621,6 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk,
virBufferAddLit(buf, ",serial=");
virBufferEscape(buf, '\\', " ", "%s", disk->serial);
}
-
- qemuBuildDiskFrontendAttributeErrorPolicy(disk, buf);
}
@@ -1662,11 +1660,29 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
virBufferAsprintf(&opt, "if=%s",
virDomainDiskQEMUBusTypeToString(disk->bus));
virBufferAsprintf(&opt, ",index=%d", idx);
+
+ if (disk->serial) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Serial property not supported for drive bus '%s'"),
+ virDomainDiskBusTypeToString(disk->bus));
+ goto error;
+ }
+ if (disk->geometry.cylinders > 0 &&
+ disk->geometry.heads > 0 &&
+ disk->geometry.sectors > 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Geometry not supported for drive bus '%s'"),
+ virDomainDiskBusTypeToString(disk->bus));
+ goto error;
+ }
}
- /* Format attributes for the drive itself (not the storage backing it) which
- * we've formatted historically with -drive */
- qemuBuildDiskFrontendAttributes(disk, &opt);
+ /* werror/rerror are really frontend attributes, but older
+ * qemu requires them on -drive instead of -device */
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_ERROR) ||
+ disk->bus == VIR_DOMAIN_DISK_BUS_USB)
+ qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
+
/* While this is a frontend attribute, it only makes sense to be used when
* legacy -drive is used. In modern qemu the 'ide-cd' or 'scsi-cd' are used.
@@ -2125,6 +2141,11 @@ qemuBuildDriveDevStr(const virDomainDef *def,
if (qemuBuildDriveDevCacheStr(disk, &opt, qemuCaps) < 0)
goto error;
+ qemuBuildDiskFrontendAttributes(disk, &opt);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_ERROR) &&
+ disk->bus != VIR_DOMAIN_DISK_BUS_USB)
+ qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
+
if (virBufferCheckError(&opt) < 0)
goto error;
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
index 169641063c..35893bdac4 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
@@ -159,6 +159,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>307647</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
index 92c095abd2..0c7249a24b 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
@@ -158,6 +158,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>386992</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
index 5e22e21224..7576c59cb0 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
@@ -119,6 +119,7 @@
<flag name='sdl-gl'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>307899</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
index 10b066bff1..2cc10e2192 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -203,6 +203,7 @@
<flag name='vmgenid'/>
<flag name='vhost-vsock'/>
<flag name='mch'/>
+ <flag name='disk-error'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>367995</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
index 6ca2e57ef8..58ec9f4e02 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -126,6 +126,7 @@
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
<flag name='tpm-emulator'/>
+ <flag name='disk-error'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>346751</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index 5ed0290397..3073ea10f5 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -169,6 +169,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='disk-error'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>347313</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index c61029e479..acd6a8d8c4 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -166,6 +166,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='disk-error'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>424244</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index 6fac6d6906..7aa7e8d889 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -133,6 +133,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='disk-error'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>375762</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 2167f06976..92871de23f 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -211,6 +211,7 @@
<flag name='mch'/>
<flag name='mch.extended-tseg-mbytes'/>
<flag name='sev-guest'/>
+ <flag name='disk-error'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>415959</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
index 9ed25178f8..ce1752934c 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -107,6 +107,7 @@
<flag name='nbd-tls'/>
<flag name='virtual-css-bridge'/>
<flag name='sdl-gl'/>
+ <flag name='disk-error'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>220792</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 959a858349..3be3b383ec 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -180,6 +180,7 @@
<flag name='sdl-gl'/>
<flag name='hda-output'/>
<flag name='mch'/>
+ <flag name='disk-error'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>244005</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index 646239ff25..1cecf68b23 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -110,6 +110,7 @@
<flag name='virtual-css-bridge'/>
<flag name='sdl-gl'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2007093</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>246206</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index 3af44f0904..6ed95782ae 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -183,6 +183,7 @@
<flag name='hda-output'/>
<flag name='vhost-vsock'/>
<flag name='mch'/>
+ <flag name='disk-error'/>
<version>2008000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>260660</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
index 70a5936439..1ee5079ee8 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
@@ -150,6 +150,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>350708</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
index 09d68e1f18..a25f49f375 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
@@ -114,6 +114,7 @@
<flag name='sdl-gl'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='disk-error'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>269625</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 31ce52c787..0627d42bf3 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -198,6 +198,7 @@
<flag name='vmgenid'/>
<flag name='vhost-vsock'/>
<flag name='mch'/>
+ <flag name='disk-error'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>343984</microcodeVersion>
diff --git a/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args b/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args
index e25f45742c..b5e73064c0 100644
--- a/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args
+++ b/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args
@@ -28,22 +28,22 @@ server,nowait \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251,cache=none \
+id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
-id=virtio-disk0 \
+id=virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251 \
-object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\
,path,endpoint=client,verify-peer=yes \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,\
file.server.host=192.168.0.2,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk1,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252,cache=none \
+id=drive-virtio-disk1,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\
-id=virtio-disk1 \
+id=virtio-disk1,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
-drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc253,\
file.server.host=192.168.0.3,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk2,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252,cache=none \
+id=drive-virtio-disk2,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\
-id=virtio-disk2 \
+id=virtio-disk2,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
-object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/libvirt-nbd/dummy,,\
path,endpoint=client,verify-peer=yes \
-drive file.driver=nbd,file.server.type=inet,file.server.host=example.com,\
diff --git a/tests/qemuxml2argvdata/disk-drive-network-vxhs.args b/tests/qemuxml2argvdata/disk-drive-network-vxhs.args
index c2a1d4681f..fad4dfd942 100644
--- a/tests/qemuxml2argvdata/disk-drive-network-vxhs.args
+++ b/tests/qemuxml2argvdata/disk-drive-network-vxhs.args
@@ -25,6 +25,6 @@ server,nowait \
-usb \
-drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251,cache=none \
+id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
-id=virtio-disk0
+id=virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251
diff --git a/tests/qemuxml2argvdata/disk-drive-shared.args b/tests/qemuxml2argvdata/disk-drive-shared.args
index 5306fdf750..032e86e291 100644
--- a/tests/qemuxml2argvdata/disk-drive-shared.args
+++ b/tests/qemuxml2argvdata/disk-drive-shared.args
@@ -23,8 +23,9 @@ server,nowait \
-boot c \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0,\
-serial=XYZXYZXYZYXXYZYZYXYZY,cache=none \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
+cache=none \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
+serial=XYZXYZXYZYXXYZYZYXYZY \
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-1-0,\
media=cdrom,readonly=on \
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
diff --git a/tests/qemuxml2argvdata/disk-geometry.args b/tests/qemuxml2argvdata/disk-geometry.args
index b173ab6407..db0c7fb561 100644
--- a/tests/qemuxml2argvdata/disk-geometry.args
+++ b/tests/qemuxml2argvdata/disk-geometry.args
@@ -22,7 +22,7 @@ server,nowait \
-no-acpi \
-boot c \
-usb \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0,\
-cyls=16383,heads=16,secs=63,trans=lba \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
+-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,cyls=16383,\
+heads=16,secs=63,trans=lba \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/disk-ide-wwn.args b/tests/qemuxml2argvdata/disk-ide-wwn.args
index e6d2758ec3..a0e3f06b68 100644
--- a/tests/qemuxml2argvdata/disk-ide-wwn.args
+++ b/tests/qemuxml2argvdata/disk-ide-wwn.args
@@ -22,8 +22,7 @@ server,nowait \
-no-acpi \
-boot c \
-usb \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-1,\
-serial=WD-WMAP9A966149 \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-1 \
-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
-wwn=0x5000c50015ea71ad \
+wwn=0x5000c50015ea71ad,serial=WD-WMAP9A966149 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/disk-scsi-disk-wwn.args b/tests/qemuxml2argvdata/disk-scsi-disk-wwn.args
index 29607e8927..6407fd002d 100644
--- a/tests/qemuxml2argvdata/disk-scsi-disk-wwn.args
+++ b/tests/qemuxml2argvdata/disk-scsi-disk-wwn.args
@@ -25,9 +25,9 @@ server,nowait \
-device lsi,id=scsi1,bus=pci.0,addr=0x4 \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-1-0,\
-serial=WD-WMAP9A966149,readonly=on \
+readonly=on \
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,\
-id=scsi0-0-1-0,wwn=0x5000c50015ea71ac \
+id=scsi0-0-1-0,wwn=0x5000c50015ea71ac,serial=WD-WMAP9A966149 \
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-scsi0-0-0-0 \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\
id=scsi0-0-0-0,wwn=0x5000c50015ea71ad \
diff --git a/tests/qemuxml2argvdata/disk-serial.args b/tests/qemuxml2argvdata/disk-serial.args
index 88310b009f..5892f64c29 100644
--- a/tests/qemuxml2argvdata/disk-serial.args
+++ b/tests/qemuxml2argvdata/disk-serial.args
@@ -22,11 +22,11 @@ server,nowait \
-no-acpi \
-boot c \
-usb \
--drive 'file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-1,\
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-1 \
+-device 'ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
serial=\ \ WD-WMAP9A966149' \
--device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--drive 'file=/dev/HostVG/AllSerialChars,format=raw,if=none,id=drive-ide0-0-2,\
+-drive file=/dev/HostVG/AllSerialChars,format=raw,if=none,id=drive-ide0-0-2 \
+-device 'ide-drive,bus=ide.0,unit=2,drive=drive-ide0-0-2,id=ide0-0-2,\
serial=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\ .+' \
--device ide-drive,bus=ide.0,unit=2,drive=drive-ide0-0-2,id=ide0-0-2 \
--drive file=/some/file,format=raw,if=sd,index=0,serial=sdserial \
+-drive file=/some/file,format=raw,if=sd,index=0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/disk-serial.xml b/tests/qemuxml2argvdata/disk-serial.xml
index ea71f2c339..18e72bb4ba 100644
--- a/tests/qemuxml2argvdata/disk-serial.xml
+++ b/tests/qemuxml2argvdata/disk-serial.xml
@@ -29,7 +29,6 @@
<disk type='file' device='disk'>
<source file='/some/file'/>
<target dev='sda' bus='sd'/>
- <serial>sdserial</serial>
</disk>
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 582a9de7bb..06b94be625 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1038,6 +1038,7 @@ mymain(void)
DO_TEST("disk-drive-error-policy-stop", NONE);
DO_TEST("disk-drive-error-policy-enospace", NONE);
DO_TEST("disk-drive-error-policy-wreport-rignore", NONE);
+ DO_TEST("disk-drive-error-policy-front", QEMU_CAPS_DISK_ERROR);
DO_TEST("disk-drive-cache-v2-wt", NONE);
DO_TEST("disk-drive-cache-v2-wb", NONE);
DO_TEST("disk-drive-cache-v2-none", NONE);
diff --git a/tests/qemuxml2xmloutdata/disk-serial.xml b/tests/qemuxml2xmloutdata/disk-serial.xml
index 9313c699b6..a803cd959c 100644
--- a/tests/qemuxml2xmloutdata/disk-serial.xml
+++ b/tests/qemuxml2xmloutdata/disk-serial.xml
@@ -32,7 +32,6 @@
<driver name='qemu' type='raw'/>
<source file='/some/file'/>
<target dev='sda' bus='sd'/>
- <serial>sdserial</serial>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
--
2.17.1
6 years, 5 months
[libvirt] [PATCH] formatdomain.html.in: Amend the 'random' RNG backend section
by Kashyap Chamarthy
Since libvirt 1.3.4, any RNG source is accepted for the 'random'
backend. However, '/dev/urandom' is the _recommended_ source of
entropy.
Mention it so in the docs.
Suggested-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Kashyap Chamarthy <kchamart(a)redhat.com>
---
docs/formatdomain.html.in | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 89672a0486..3dd6a59a01 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7738,12 +7738,16 @@ qemu-kvm -net nic,model=? /dev/null
<dt><code>random</code></dt>
<dd>
<p>
- This backend type expects a non-blocking character device as
- input. The file name is specified as contents of the
- <code>backend</code> element. <span class='since'>Since 1.3.4</span>
- any path is accepted. Before that /dev/random and /dev/hwrng were
- the only accepted paths. When no file name is specified the hypervisor
- default is used. For qemu, the default is /dev/random
+ This backend type expects a non-blocking character device
+ as input. The file name is specified as contents of the
+ <code>backend</code> element. <span class='since'>Since
+ 1.3.4</span> any path is accepted. Before that
+ <code>/dev/random</code> and <code>/dev/hwrng</code> were
+ the only accepted paths. When no file name is specified,
+ the hypervisor default is used. For QEMU, the default is
+ <code>/dev/random</code>. However, the recommended source
+ of entropy is <code>/dev/urandom</code> (as it doesn't
+ have the limitations of <code>/dev/random</code>).
</p>
</dd>
<dt><code>egd</code></dt>
--
2.17.0
6 years, 5 months