[libvirt] [PATCH] qemu: do not format <usedQMP/> in qemu caps XML
by Ján Tomko
Since commit a7424faff QMP is always used.
Also, commit 932534e8 removed the last use of this apart from:
* parsing/formatting this in the caps cache
* using it as a temporary variable to know when to report an error
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
Note that the second use should be removed by this series:
https://www.redhat.com/archives/libvir-list/2019-January/msg00310.html
which I am unable to apply.
src/qemu/qemu_capabilities.c | 7 -------
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 -
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 -
37 files changed, 43 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f035e68251..9d9c8096ba 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3357,7 +3357,6 @@ virQEMUCapsParseSEVInfo(virQEMUCapsPtr qemuCaps, xmlXPathContextPtr ctxt)
* <qemuctime>234235253</qemuctime>
* <selfctime>234235253</selfctime>
* <selfvers>1002016</selfvers>
- * <usedQMP/>
* <flag name='foo'/>
* <flag name='bar'/>
* ...
@@ -3418,9 +3417,6 @@ virQEMUCapsLoadCache(virArch hostArch,
if (virXPathULong("string(./selfvers)", ctxt, &lu) == 0)
qemuCaps->libvirtVersion = lu;
- qemuCaps->usedQMP = virXPathBoolean("count(./usedQMP) > 0",
- ctxt) > 0;
-
if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to parse qemu capabilities flags"));
@@ -3761,9 +3757,6 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps)
virBufferAsprintf(&buf, "<selfvers>%lu</selfvers>\n",
(unsigned long)qemuCaps->libvirtVersion);
- if (qemuCaps->usedQMP)
- virBufferAddLit(&buf, "<usedQMP/>\n");
-
for (i = 0; i < QEMU_CAPS_LAST; i++) {
if (virQEMUCapsGet(qemuCaps, i)) {
virBufferAsprintf(&buf, "<flag name='%s'/>\n",
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index b54b438f63..d626910258 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index 4754467ce7..c281cd5f7f 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
index 84d9777f68..bb6c598fc2 100644
--- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index c632a1332b..340a725287 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
index 6c537567cd..e8bf3cef9f 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
index ca481f84ce..b24e26dfc5 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
index dced5b51f9..6707633b14 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
index 2b40d0e28f..1e3a4d753c 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
index 82daefafa0..a781af8a04 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
index 25c22e34f6..1ebf54baae 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index 0d22eff9b9..4531964c75 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index c20ecbfa51..835d36425f 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index 0beb46aeb8..4988ab3fe7 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 39cd9aebf5..301ab899bb 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index 9fbb010feb..14de9d7b3b 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 5bae2bd700..24f47515d4 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
index a06ca127b3..59688ea09f 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='ccid-emulated'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
index a932756151..0ceadb42c0 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index dd1d3accf9..828ee630af 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
index c48711eba4..77e067e9ba 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 0106c16eaa..9e9aeb1449 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index 232060ddff..87cc501e25 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index 6bcb1034f8..5eb786945b 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
index 2344a5f9aa..0bc61f9c2b 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
index fd1518b929..f628417a0d 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 360ce218f4..fe3385680a 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index 71198a608a..4de8f17f51 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
index 1ff0e12f01..669c0dd786 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='scsi-disk.channel'/>
<flag name='scsi-block'/>
<flag name='transaction'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
index 1f07d6ad65..7884d6c07f 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='scsi-disk.channel'/>
<flag name='scsi-block'/>
<flag name='transaction'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
index b784360a6a..57d9fc6770 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='virtio-tx-alg'/>
<flag name='virtio-blk-pci.ioeventfd'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
index 4b28962bb9..ad942520e9 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
index 11be58b496..1ad1dbcdbc 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='hda-duplex'/>
<flag name='virtio-tx-alg'/>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
index f13ef0ece2..39b910e3b1 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
index 3d958db461..14fd0228ea 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='spice'/>
<flag name='hda-duplex'/>
<flag name='ccid-emulated'/>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
index 40083843f2..437e711293 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='spice'/>
<flag name='hda-duplex'/>
<flag name='ccid-emulated'/>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
index 109b1ff753..88e9e029fb 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
@@ -2,7 +2,6 @@
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
- <usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
<flag name='spice'/>
--
2.19.2
6 years
[libvirt] [PATCH 0/9] virsh domfsinfo fixes
by Ján Tomko
Fix a crash and other issues:
https://bugzilla.redhat.com/show_bug.cgi?id=1676354
Ján Tomko (9):
vshtabletest: indent strings with expected output
vsh-table: allow empty columns
virsh: introduce ninfos variable in cmdDomFSInfo
virsh: rename ret to rc in cmdDomFSInfo
virsh: do not access uninitialized memory in cmdDomFSInfo
virsh: introduce 'ret' in cmdDomFSInfo
virsh: do not report error on zero filesystems in cmdDomFSInfo
virsh: use virBufferTrim in cmdDomFSInfo
virsh: allow empty targets in cmdDomFSInfo
tests/vshtabletest.c | 78 +++++++++++++++++++++++---------------------
tools/virsh-domain.c | 35 +++++++++++---------
tools/vsh-table.c | 3 --
3 files changed, 60 insertions(+), 56 deletions(-)
--
2.19.2
6 years
[libvirt] [PATCH 0/5] tools: Adapt to newer wireshark
by Michal Privoznik
While implementing some other feature I wanted to use wireshark to debug
a migration issue. Only then I found that our wireshark plugin is no
longer being loaded. Here are the fixes.
Michal Prívozník (5):
tools: Cleanup packet-libvirt.h
tools: Keep wireshark plugin registration code in git
wireshark: Provide registration code for newer wireshark
m4: Put wireshark plugin into epan/ directory
tools: Drop support for pre-2.4.0 wireshark
.gitignore | 1 -
cfg.mk | 2 +-
libvirt.spec.in | 10 +-
m4/virt-wireshark.m4 | 10 +-
tools/Makefile.am | 15 +-
tools/wireshark/src/packet-libvirt.c | 106 +++++++-----
tools/wireshark/src/packet-libvirt.h | 93 +----------
tools/wireshark/src/plugin.c | 86 ++++++++++
tools/wireshark/util/make-dissector-reg | 205 ------------------------
9 files changed, 170 insertions(+), 358 deletions(-)
create mode 100644 tools/wireshark/src/plugin.c
delete mode 100755 tools/wireshark/util/make-dissector-reg
--
2.19.2
6 years
[libvirt] [PATCH v2 00/32] Make use of autofree within storage code
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2019-February/msg00187.html
Much of this was R-by'd for V1 with caveats for splitting things out, etc.
Still since there isn't an end of release rush ;-) - I figure reposting
everything before doing any sort of push would be more prudent and
conservative course of action!
I've added R-by's for many of the patches, but with all the requested
change - there were a few that we hadn't "closed on" from v1 that didn't
get an R-by... The following is a "map" of the patches:
Patches 1-3 = Old Patch1 - All 3 R-by'd
Patch 4 = Old Patch2 - Has R-by
Patches 5-7 = Old Patch3 - All 3 R-by'd
Patches 8-9 = Old Patch4 - 8 needs an R-by, although 9 has it
Patch 10 = Old Patch5 - Has R-by
Patch 11 = Old Patch6 - Has R-by
Patch 12 = Old Patch7 - Needs R-by since I kept VIR_STEAL_PTR logic in
virStorageBackendLogicalFindPoolSourcesFunc
Patch 13 = Old Patch8 - Has R-by
Patches 14-15 = Old Patch9 - Didn't include R-by since I split out the noted
issue in virStorageBackendSCSINewLun
Patch 16 = Old Patch10 - Has R-by
Patches 17-18 = Old Patch11 - Both have R-by
Patches 19-21 = Old Patch12 - All 3 R-by'd
Patch 22 = Old Patch13 - Has R-by
Patch 23 = Old Patch14 - Has R-by
Patch 24 = NEW - "Fallout" from Old Patch4 review
Patch 25 = Old Patch15 - Took implicity R-by for VIR_STEAL_PTR extraction
Patches 26-32 = Old Patch15 - None have R-by. I split out the @def/@ret logic,
then created the VIR_AUTOPTR patch from there.
If the virstoragefile modifications are too much
no big deal. Perhaps they can be reworked or just
dropped. Everyone has their favorite way of doing
things I guess.
John Ferlan (32):
conf,util,qemu: Use VIR_STEAL_PTR for authdef processing
util: Rework virStorageAuthDefCopy
util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageAuthDef
conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolSource
storage: Use VIR_STEAL_PTR for gluster volume processing
conf: Rework virStorageVolDefParseXML
conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageVolDef
conf: Rework virStoragePoolDefParseXML
conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolDef
storage: Use VIR_AUTOPTR(virString)
storage: Use VIR_AUTOPTR(virCommand)
storage: Use VIR_AUTOFREE for storage backends
storage: Use VIR_AUTOFREE for storage driver
util: Fix virStorageBackendSCSINewLun error handling
storage: Use VIR_AUTOFREE for storage util
conf: Use VIR_AUTOFREE for storage_conf
util: Use VIR_STEAL_PTR in virstoragefile
util: Use VIR_AUTOFREE for virstoragefile
test: Cleanup testDomainRenameCallback
test: Remove unused @xml from testDomainSnapshotCreateXML
test: Use VIR_AUTOFREE for test driver
tests: Use VIR_AUTOFREE for various storage tests
storage: Use VIR_AUTOCLOSE
tests: Fix memory leak in testCompareXMLToArgvFiles
storage: Use VIR_STEAL_PTR in storageBackendProbeTarget
util: Rename variable in virStorageFileMetadataNew
util: Rename variable in virStorageSourceCopy
util: Rename variable in virStorageSourceNewFromBackingRelative
util: Rename variable in virStorageSourceNewFromBackingAbsolute
util: Rename variable in virStorageSourceNewFromBacking
tests: Rename variable in testStorageFileGetMetadata
util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource
src/conf/domain_conf.c | 35 +-
src/conf/storage_conf.c | 334 +++++------
src/conf/storage_conf.h | 4 +
src/conf/virstorageobj.c | 27 +-
src/esx/esx_storage_backend_vmfs.c | 6 +-
src/phyp/phyp_driver.c | 6 +-
src/qemu/qemu_domain.c | 3 +-
src/qemu/qemu_driver.c | 9 +-
src/qemu/qemu_migration.c | 3 +-
src/qemu/qemu_parse_command.c | 6 +-
src/storage/storage_backend.c | 9 +-
src/storage/storage_backend_disk.c | 147 ++---
src/storage/storage_backend_fs.c | 59 +-
src/storage/storage_backend_gluster.c | 45 +-
src/storage/storage_backend_iscsi.c | 76 +--
src/storage/storage_backend_iscsi_direct.c | 61 +-
src/storage/storage_backend_logical.c | 139 ++---
src/storage/storage_backend_mpath.c | 42 +-
src/storage/storage_backend_rbd.c | 44 +-
src/storage/storage_backend_scsi.c | 81 +--
src/storage/storage_backend_sheepdog.c | 107 ++--
src/storage/storage_backend_vstorage.c | 39 +-
src/storage/storage_backend_zfs.c | 77 +--
src/storage/storage_driver.c | 85 +--
src/storage/storage_file_fs.c | 15 +-
src/storage/storage_file_gluster.c | 16 +-
src/storage/storage_util.c | 553 +++++++-----------
src/test/test_driver.c | 208 +++----
src/util/virstoragefile.c | 620 +++++++++------------
src/util/virstoragefile.h | 3 +
src/vbox/vbox_storage.c | 3 +-
tests/qemublocktest.c | 6 +-
tests/storagebackendsheepdogtest.c | 59 +-
tests/storagepoolxml2argvtest.c | 29 +-
tests/storagepoolxml2xmltest.c | 36 +-
tests/storagevolxml2argvtest.c | 56 +-
tests/storagevolxml2xmltest.c | 44 +-
tests/virstoragetest.c | 111 ++--
tests/virstorageutiltest.c | 7 +-
39 files changed, 1181 insertions(+), 2029 deletions(-)
--
2.20.1
6 years
[libvirt] [tck PATCH] Set cache=none for KVM guests
by Daniel P. Berrangé
QEMU will refuse to live migrate with the default caching mode, so we
must explicitly set cache=none for the migration tests to pass.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
lib/Sys/Virt/TCK/DomainBuilder.pm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/Sys/Virt/TCK/DomainBuilder.pm b/lib/Sys/Virt/TCK/DomainBuilder.pm
index 7a25d42..399534c 100644
--- a/lib/Sys/Virt/TCK/DomainBuilder.pm
+++ b/lib/Sys/Virt/TCK/DomainBuilder.pm
@@ -396,11 +396,16 @@ sub as_xml {
type => $disk->{type},
$disk->{device} ? (device => $disk->{device}) : ());
+ my @driver = ();
+ if ($self->{type} eq "qemu" ||
+ $self->{type} eq "kvm") {
+ push @driver, "cache", "none";
+ }
if ($disk->{format}) {
- $w->emptyTag("driver",
- name => $disk->{format}->{name},
- type => $disk->{format}->{type});
+ push @driver, "name", $disk->{format}->{name},
+ "type", $disk->{format}->{type};
}
+ $w->emptyTag("driver", @driver);
if ($disk->{type} eq "block") {
$w->emptyTag("source",
--
2.20.1
6 years
[libvirt] [PATCH 0/4] bhyve: model PCI ISA bridge
by Roman Bogorodskiy
This adds modeling of the pci-isa bridge device for bhyve to make
it possible to assign specific PCI address for instead of the default
PCI slot 0.
I tried to keep the existing behaviour, i.e. the isa-bridge controller
is automatically added to domain if it uses serial or video devices, or
boot ROM. It also tries to assign pci slot 1 for it, that should not
be a problem because previously that address was always reserved for
the isa-bridge, so it definitely wasn't used by other devices.
Now, however, it's not always reserved. For example, if there are no
devices in the domain configuration that require isa-bridge, and
users didn't explicitly add it (or added that on a different slot),
then PCI slot 1 is available for allocation. This probably can be a
problem for users when they figure out that they still need to add the
isa-bridge device on slot 1, but it's already used, but I'm not sure
if it's worth to always reserve slot 1 for that purpose.
Roman Bogorodskiy (4):
conf: add 'isa-bridge' PCI controller model
bhyve: model PCI ISA bridge
docs: bhyve: document isa-bridge addressing
news: document bhyve isa-bridge changes
docs/drvbhyve.html.in | 22 +++++++++
docs/news.xml | 10 ++++
docs/schemas/domaincommon.rng | 1 +
src/bhyve/bhyve_command.c | 32 +++++--------
src/bhyve/bhyve_device.c | 47 ++++++++++++-------
src/bhyve/bhyve_domain.c | 6 +++
src/conf/domain_addr.c | 10 ++++
src/conf/domain_addr.h | 4 +-
src/conf/domain_conf.c | 2 +
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 1 +
src/qemu/qemu_domain.c | 9 ++++
src/qemu/qemu_domain_address.c | 2 +
.../bhyvexml2argv-acpiapic.args | 2 +-
...xml2argv-addr-more-than-32-sata-disks.args | 6 +--
...hyvexml2argv-addr-multiple-sata-disks.args | 4 +-
...vexml2argv-addr-multiple-virtio-disks.args | 6 +--
...rgv-addr-no32devs-multiple-sata-disks.args | 6 +--
...l2argv-addr-no32devs-single-sata-disk.args | 4 +-
.../bhyvexml2argv-addr-single-sata-disk.args | 4 +-
...bhyvexml2argv-addr-single-virtio-disk.args | 2 +-
...vexml2argv-addr-slot-1-and-31-not-lpc.args | 10 ++++
...xml2argv-addr-slot-1-and-31-not-lpc.ldargs | 3 ++
...yvexml2argv-addr-slot-1-and-31-not-lpc.xml | 27 +++++++++++
.../bhyvexml2argv-addr-slot-1-not-lpc.args | 10 ++++
.../bhyvexml2argv-addr-slot-1-not-lpc.ldargs | 3 ++
.../bhyvexml2argv-addr-slot-1-not-lpc.xml | 27 +++++++++++
.../bhyvexml2argvdata/bhyvexml2argv-base.args | 2 +-
.../bhyvexml2argv-bhyveload-bootorder.args | 2 +-
.../bhyvexml2argv-bhyveload-bootorder1.args | 2 +-
.../bhyvexml2argv-bhyveload-bootorder3.args | 2 +-
.../bhyvexml2argv-bhyveload-explicitargs.args | 2 +-
.../bhyvexml2argv-commandline.args | 2 +-
.../bhyvexml2argv-console.args | 2 +-
.../bhyvexml2argv-cputopology.args | 2 +-
.../bhyvexml2argv-custom-loader.args | 2 +-
.../bhyvexml2argv-disk-cdrom-grub.args | 2 +-
.../bhyvexml2argv-disk-cdrom.args | 2 +-
.../bhyvexml2argv-explicit-lpc.args | 10 ++++
.../bhyvexml2argv-explicit-lpc.ldargs | 3 ++
.../bhyvexml2argv-explicit-lpc.xml | 26 ++++++++++
.../bhyvexml2argv-grub-bootorder.args | 2 +-
.../bhyvexml2argv-grub-bootorder2.args | 2 +-
.../bhyvexml2argv-grub-defaults.args | 2 +-
.../bhyvexml2argv-input-xhci-tablet.args | 4 +-
.../bhyvexml2argv-localtime.args | 2 +-
.../bhyvexml2argv-macaddr.args | 2 +-
.../bhyvexml2argv-net-e1000.args | 2 +-
.../bhyvexml2argv-serial-grub-nocons.args | 2 +-
.../bhyvexml2argv-serial-grub.args | 2 +-
.../bhyvexml2argv-serial.args | 2 +-
.../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 4 +-
.../bhyvexml2argv-vnc-autoport.args | 4 +-
.../bhyvexml2argv-vnc-vgaconf-io.args | 4 +-
.../bhyvexml2argv-vnc-vgaconf-off.args | 4 +-
.../bhyvexml2argv-vnc-vgaconf-on.args | 4 +-
.../bhyvexml2argvdata/bhyvexml2argv-vnc.args | 4 +-
.../bhyvexml2argv-wired.args | 2 +-
tests/bhyvexml2argvtest.c | 3 ++
.../bhyvexml2xmlout-acpiapic.xml | 2 +-
...ml2xmlout-addr-more-than-32-sata-disks.xml | 6 +--
...yvexml2xmlout-addr-multiple-sata-disks.xml | 4 +-
...exml2xmlout-addr-multiple-virtio-disks.xml | 6 +--
...lout-addr-no32devs-multiple-sata-disks.xml | 8 ++--
...2xmlout-addr-no32devs-single-sata-disk.xml | 4 +-
.../bhyvexml2xmlout-addr-single-sata-disk.xml | 4 +-
...hyvexml2xmlout-addr-single-virtio-disk.xml | 2 +-
...exml2xmlout-addr-slot-1-and-31-not-lpc.xml | 36 ++++++++++++++
.../bhyvexml2xmlout-addr-slot-1-not-lpc.xml | 36 ++++++++++++++
.../bhyvexml2xmlout-base.xml | 2 +-
.../bhyvexml2xmlout-bhyveload-bootorder.xml | 2 +-
.../bhyvexml2xmlout-bhyveload-bootorder1.xml | 2 +-
.../bhyvexml2xmlout-bhyveload-bootorder2.xml | 2 +-
.../bhyvexml2xmlout-bhyveload-bootorder3.xml | 2 +-
.../bhyvexml2xmlout-bhyveload-bootorder4.xml | 2 +-
...bhyvexml2xmlout-bhyveload-explicitargs.xml | 2 +-
.../bhyvexml2xmlout-commandline.xml | 2 +-
.../bhyvexml2xmlout-console.xml | 3 ++
.../bhyvexml2xmlout-custom-loader.xml | 2 +-
.../bhyvexml2xmlout-disk-cdrom-grub.xml | 2 +-
.../bhyvexml2xmlout-disk-cdrom.xml | 2 +-
.../bhyvexml2xmlout-explicit-lpc.xml | 36 ++++++++++++++
.../bhyvexml2xmlout-grub-bootorder.xml | 2 +-
.../bhyvexml2xmlout-grub-bootorder2.xml | 2 +-
.../bhyvexml2xmlout-grub-defaults.xml | 2 +-
.../bhyvexml2xmlout-input-xhci-tablet.xml | 4 +-
.../bhyvexml2xmlout-localtime.xml | 2 +-
.../bhyvexml2xmlout-macaddr.xml | 2 +-
.../bhyvexml2xmlout-metadata.xml | 4 +-
.../bhyvexml2xmlout-serial-grub-nocons.xml | 3 ++
.../bhyvexml2xmlout-serial-grub.xml | 3 ++
.../bhyvexml2xmlout-serial.xml | 3 ++
.../bhyvexml2xmlout-vnc-autoport.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-io.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-off.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-on.xml | 3 ++
.../bhyvexml2xmlout-vnc.xml | 3 ++
.../bhyvexml2xmlout-wired.xml | 2 +-
tests/bhyvexml2xmltest.c | 3 ++
99 files changed, 461 insertions(+), 128 deletions(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-and-31-not-lpc.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-and-31-not-lpc.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-and-31-not-lpc.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-not-lpc.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-not-lpc.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-slot-1-not-lpc.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-explicit-lpc.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-explicit-lpc.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-explicit-lpc.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-slot-1-and-31-not-lpc.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-slot-1-not-lpc.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-explicit-lpc.xml
--
2.20.1
6 years
[libvirt] [PATCH] virsh: fix return value in storage vol name completor
by Daniel P. Berrangé
The function must return a pointer, not a boolean. Fortunately 'false'
is equivalent to 'NULL' so this bug no had ill effect previously.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
tools/virsh-completer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index e62226fc13..7c68e2e832 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -287,7 +287,7 @@ virshStorageVolNameCompleter(vshControl *ctl,
return NULL;
if (!(pool = virshCommandOptPool(ctl, cmd, "pool", NULL)))
- return false;
+ return NULL;
if ((nvols = virStoragePoolListAllVolumes(pool, &vols, flags)) < 0)
goto error;
--
2.20.1
6 years
[libvirt] [python PATCH v4 0/2] Python bindings for virDomainCheckpoint
by Eric Blake
Python counterpart to:
https://www.redhat.com/archives/libvir-list/2019-February/msg00252.html
I'll push patch 1 now as a trivial fix; patch 2 can't go in until
the corresponding libvirt patches are accepted (which may in turn
necessitate minor tweaks if I make any API changes there based on
the review). But with this patch, it should be possible to test
python bindings to all the proposed C changes.
Eric Blake (2):
generator.py: typo fix
Add virDomainCheckpoint APIs
HACKING | 2 +
MANIFEST.in | 1 +
generator.py | 36 ++++++++--
libvirt-override-api.xml | 12 ++++
libvirt-override-virDomain.py | 13 ++++
libvirt-override-virDomainCheckpoint.py | 19 +++++
libvirt-override.c | 96 +++++++++++++++++++++++++
sanitytest.py | 9 ++-
typewrappers.c | 13 ++++
typewrappers.h | 10 +++
10 files changed, 203 insertions(+), 8 deletions(-)
create mode 100644 libvirt-override-virDomainCheckpoint.py
--
2.20.1
6 years
[libvirt] [PATCH v1 1/1] virhostcpu.c: consider empty NUMA nodes in topology validation
by Daniel Henrique Barboza
Some devices creates empty (= cpu-less) NUMA nodes to host
its memory. This results in topologies where the following
sanity rule does not apply as is:
nodes * sockets * cores * threads = total_cpus
As a result, a call to 'virsh nodeinfo' will return the default
value (1) to nodes, sockets and threads, while cores defaults
to the total_cpus value. For example, in a Power9 host that has
160 total cpus, 4 cpu-less NUMA nodes, 2 populated NUMA nodes,
1 socket per populated node, 20 cores per socket and 4 threads
per socket:
$ virsh nodeinfo
CPU model: ppc64le
CPU(s): 160
CPU frequency: 3783 MHz
CPU socket(s): 1
Core(s) per socket: 160
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 535981376 KiB
This patch adjusts virHostCPUGetInfoPopulateLinux to count the
cpu-less NUMA nodes and discard them in the sanity rule, changing
it to:
(nodes - empty_nodes) * sockets * cores * threads = total_cpus
And with this new rule, virsh nodeinfo will return the
appropriate info for those topologies, without changing the
behavior for any other scenario it was previously working.
This is the resulting output of nodeinfo after this patch in the
same Power9 host mentioned above:
$ virsh nodeinfo
CPU model: ppc64le
CPU(s): 160
CPU frequency: 3783 MHz
CPU socket(s): 1
Core(s) per socket: 20
Thread(s) per core: 4
NUMA cell(s): 6
Memory size: 535981376 KiB
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/util/virhostcpu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 6514c3d765..4100cf0e8c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -598,6 +598,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
virBitmapPtr online_cpus_map = NULL;
DIR *nodedir = NULL;
struct dirent *nodedirent = NULL;
+ int emptynodes = 0;
int nodecpus, nodecores, nodesockets, nodethreads, offline = 0;
int threads_per_subcore = 0;
unsigned int node;
@@ -686,6 +687,8 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
VIR_FREE(sysfs_cpudir);
*cpus += nodecpus;
+ if (nodecpus == 0)
+ emptynodes++;
if (nodesockets > *sockets)
*sockets = nodesockets;
@@ -747,7 +750,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
* the nodeinfo structure isn't designed to carry the full topology so
* we're going to lie about the detected topology to notify the user
* to check the host capabilities for the actual topology. */
- if ((*nodes *
+ if (((*nodes - emptynodes) *
*sockets *
*cores *
*threads) != (*cpus + offline)) {
--
2.20.1
6 years