[PATCH v3 07/28] qemu: Prepare for more types in qemuMonitorCPUModelInfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---

Notes:
    Version 3:
    - new patch

 src/qemu/qemu_capabilities.c                     |  14 +-
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml  |  30 +--
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++------------
 3 files changed, 183 insertions(+), 183 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c5643f7a0..e037d5f95 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3197,19 +3197,19 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
                 goto cleanup;
             }
 
-            if (!(str = virXMLPropString(nodes[i], "supported"))) {
+            if (!(str = virXMLPropString(nodes[i], "value"))) {
                 virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                               _("missing 'supported' attribute for a host CPU"
+                               _("missing 'value' attribute for a host CPU"
                                  " model property in QEMU capabilities cache"));
                 goto cleanup;
             }
-            if (STREQ(str, "yes")) {
+            if (STREQ(str, "true")) {
                 hostCPU->props[i].supported = true;
-            } else if (STREQ(str, "no")) {
+            } else if (STREQ(str, "false")) {
                 hostCPU->props[i].supported = false;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("invalid supported value: '%s'"), str);
+                               _("invalid boolean  value: '%s'"), str);
                 goto cleanup;
             }
             VIR_FREE(str);
@@ -3554,9 +3554,9 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
     virBufferAdjustIndent(buf, 2);
 
     for (i = 0; i < model->nprops; i++) {
-        virBufferAsprintf(buf, "<property name='%s' supported='%s'/>\n",
+        virBufferAsprintf(buf, "<property name='%s' type='boolean' value='%s'/>\n",
                           model->props[i].name,
-                          model->props[i].supported ? "yes" : "no");
+                          model->props[i].supported ? "true" : "false");
     }
 
     virBufferAdjustIndent(buf, -2);
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index 02e89c841..84c570020 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -134,21 +134,21 @@
   <package></package>
   <arch>s390x</arch>
   <hostCPU model='zEC12.2-base'>
-    <property name='aefsi' supported='yes'/>
-    <property name='msa5' supported='yes'/>
-    <property name='msa4' supported='yes'/>
-    <property name='msa3' supported='yes'/>
-    <property name='msa2' supported='yes'/>
-    <property name='msa1' supported='yes'/>
-    <property name='sthyi' supported='yes'/>
-    <property name='edat' supported='yes'/>
-    <property name='ri' supported='yes'/>
-    <property name='edat2' supported='yes'/>
-    <property name='ipter' supported='yes'/>
-    <property name='esop' supported='yes'/>
-    <property name='cte' supported='yes'/>
-    <property name='te' supported='yes'/>
-    <property name='cmm' supported='yes'/>
+    <property name='aefsi' type='boolean' value='true'/>
+    <property name='msa5' type='boolean' value='true'/>
+    <property name='msa4' type='boolean' value='true'/>
+    <property name='msa3' type='boolean' value='true'/>
+    <property name='msa2' type='boolean' value='true'/>
+    <property name='msa1' type='boolean' value='true'/>
+    <property name='sthyi' type='boolean' value='true'/>
+    <property name='edat' type='boolean' value='true'/>
+    <property name='ri' type='boolean' value='true'/>
+    <property name='edat2' type='boolean' value='true'/>
+    <property name='ipter' type='boolean' value='true'/>
+    <property name='esop' type='boolean' value='true'/>
+    <property name='cte' type='boolean' value='true'/>
+    <property name='te' type='boolean' value='true'/>
+    <property name='cmm' type='boolean' value='true'/>
   </hostCPU>
   <cpu type='kvm' name='z10EC-base'/>
   <cpu type='kvm' name='z9EC-base'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 0f19d5242..73d1e59c8 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -208,167 +208,167 @@
   <package> (v2.8.0-1428-g1b1a68c602)</package>
   <arch>x86_64</arch>
   <hostCPU model='base'>
-    <property name='cmov' supported='yes'/>
-    <property name='ia64' supported='no'/>
-    <property name='aes' supported='yes'/>
-    <property name='mmx' supported='yes'/>
-    <property name='rdpid' supported='no'/>
-    <property name='arat' supported='yes'/>
-    <property name='pause-filter' supported='no'/>
-    <property name='xsavec' supported='yes'/>
-    <property name='osxsave' supported='no'/>
-    <property name='kvm-asyncpf' supported='yes'/>
-    <property name='perfctr-core' supported='no'/>
-    <property name='mpx' supported='yes'/>
-    <property name='pbe' supported='no'/>
-    <property name='avx512cd' supported='no'/>
-    <property name='decodeassists' supported='no'/>
-    <property name='sse4.1' supported='yes'/>
-    <property name='avx512f' supported='no'/>
-    <property name='msr' supported='yes'/>
-    <property name='mce' supported='yes'/>
-    <property name='mca' supported='yes'/>
-    <property name='xcrypt' supported='no'/>
-    <property name='xgetbv1' supported='yes'/>
-    <property name='cid' supported='no'/>
-    <property name='ds' supported='no'/>
-    <property name='fxsr' supported='yes'/>
-    <property name='xsaveopt' supported='yes'/>
-    <property name='xtpr' supported='no'/>
-    <property name='avx512vl' supported='no'/>
-    <property name='avx512-vpopcntdq' supported='no'/>
-    <property name='phe' supported='no'/>
-    <property name='extapic' supported='no'/>
-    <property name='3dnowprefetch' supported='yes'/>
-    <property name='cr8legacy' supported='no'/>
-    <property name='xcrypt-en' supported='no'/>
-    <property name='pn' supported='no'/>
-    <property name='dca' supported='no'/>
-    <property name='pku' supported='no'/>
-    <property name='smx' supported='no'/>
-    <property name='cmp-legacy' supported='no'/>
-    <property name='avx512-4fmaps' supported='no'/>
-    <property name='vmcb-clean' supported='no'/>
-    <property name='hle' supported='yes'/>
-    <property name='3dnowext' supported='no'/>
-    <property name='npt' supported='no'/>
-    <property name='clwb' supported='no'/>
-    <property name='lbrv' supported='no'/>
-    <property name='adx' supported='yes'/>
-    <property name='ss' supported='yes'/>
-    <property name='pni' supported='yes'/>
-    <property name='svm-lock' supported='no'/>
-    <property name='smep' supported='yes'/>
-    <property name='smap' supported='yes'/>
-    <property name='pfthreshold' supported='no'/>
-    <property name='x2apic' supported='yes'/>
-    <property name='avx512vbmi' supported='no'/>
-    <property name='flushbyasid' supported='no'/>
-    <property name='f16c' supported='yes'/>
-    <property name='ace2-en' supported='no'/>
-    <property name='pae' supported='yes'/>
-    <property name='pat' supported='yes'/>
-    <property name='sse' supported='yes'/>
-    <property name='phe-en' supported='no'/>
-    <property name='kvm-nopiodelay' supported='yes'/>
-    <property name='tm' supported='no'/>
-    <property name='kvmclock-stable-bit' supported='yes'/>
-    <property name='hypervisor' supported='yes'/>
-    <property name='pcommit' supported='no'/>
-    <property name='syscall' supported='yes'/>
-    <property name='avx512dq' supported='no'/>
-    <property name='svm' supported='no'/>
-    <property name='invtsc' supported='no'/>
-    <property name='sse2' supported='yes'/>
-    <property name='est' supported='no'/>
-    <property name='avx512ifma' supported='no'/>
-    <property name='tm2' supported='no'/>
-    <property name='kvm-pv-eoi' supported='yes'/>
-    <property name='cx8' supported='yes'/>
-    <property name='kvm-mmu' supported='no'/>
-    <property name='sse4.2' supported='yes'/>
-    <property name='pge' supported='yes'/>
-    <property name='pdcm' supported='no'/>
-    <property name='movbe' supported='yes'/>
-    <property name='nrip-save' supported='no'/>
-    <property name='ssse3' supported='yes'/>
-    <property name='sse4a' supported='no'/>
-    <property name='invpcid' supported='yes'/>
-    <property name='pdpe1gb' supported='yes'/>
-    <property name='tsc-deadline' supported='yes'/>
-    <property name='fma' supported='yes'/>
-    <property name='cx16' supported='yes'/>
-    <property name='de' supported='yes'/>
-    <property name='xsave' supported='yes'/>
-    <property name='clflush' supported='yes'/>
-    <property name='skinit' supported='no'/>
-    <property name='tsc' supported='yes'/>
-    <property name='tce' supported='no'/>
-    <property name='fpu' supported='yes'/>
-    <property name='ds-cpl' supported='no'/>
-    <property name='ibs' supported='no'/>
-    <property name='fma4' supported='no'/>
-    <property name='la57' supported='no'/>
-    <property name='osvw' supported='no'/>
-    <property name='apic' supported='yes'/>
-    <property name='pmm' supported='no'/>
-    <property name='tsc-adjust' supported='yes'/>
-    <property name='kvm-steal-time' supported='yes'/>
-    <property name='kvmclock' supported='yes'/>
-    <property name='lwp' supported='no'/>
-    <property name='xop' supported='no'/>
-    <property name='avx' supported='yes'/>
-    <property name='ospke' supported='no'/>
-    <property name='acpi' supported='no'/>
-    <property name='avx512bw' supported='no'/>
-    <property name='ace2' supported='no'/>
-    <property name='fsgsbase' supported='yes'/>
-    <property name='ht' supported='no'/>
-    <property name='nx' supported='yes'/>
-    <property name='pclmulqdq' supported='yes'/>
-    <property name='mmxext' supported='no'/>
-    <property name='popcnt' supported='yes'/>
-    <property name='xsaves' supported='yes'/>
-    <property name='lm' supported='yes'/>
-    <property name='umip' supported='no'/>
-    <property name='pse' supported='yes'/>
-    <property name='avx2' supported='yes'/>
-    <property name='sep' supported='yes'/>
-    <property name='nodeid-msr' supported='no'/>
-    <property name='misalignsse' supported='no'/>
-    <property name='bmi1' supported='yes'/>
-    <property name='bmi2' supported='yes'/>
-    <property name='kvm-pv-unhalt' supported='yes'/>
-    <property name='tsc-scale' supported='no'/>
-    <property name='topoext' supported='no'/>
-    <property name='clflushopt' supported='yes'/>
-    <property name='monitor' supported='no'/>
-    <property name='avx512er' supported='no'/>
-    <property name='pmm-en' supported='no'/>
-    <property name='pcid' supported='yes'/>
-    <property name='3dnow' supported='no'/>
-    <property name='erms' supported='yes'/>
-    <property name='lahf-lm' supported='yes'/>
-    <property name='fxsr-opt' supported='no'/>
-    <property name='xstore' supported='no'/>
-    <property name='rtm' supported='yes'/>
-    <property name='lmce' supported='yes'/>
-    <property name='perfctr-nb' supported='no'/>
-    <property name='rdrand' supported='yes'/>
-    <property name='rdseed' supported='yes'/>
-    <property name='avx512-4vnniw' supported='no'/>
-    <property name='vme' supported='yes'/>
-    <property name='vmx' supported='yes'/>
-    <property name='dtes64' supported='no'/>
-    <property name='mtrr' supported='yes'/>
-    <property name='rdtscp' supported='yes'/>
-    <property name='pse36' supported='yes'/>
-    <property name='tbm' supported='no'/>
-    <property name='wdt' supported='no'/>
-    <property name='sha-ni' supported='no'/>
-    <property name='abm' supported='yes'/>
-    <property name='avx512pf' supported='no'/>
-    <property name='xstore-en' supported='no'/>
+    <property name='cmov' type='boolean' value='true'/>
+    <property name='ia64' type='boolean' value='false'/>
+    <property name='aes' type='boolean' value='true'/>
+    <property name='mmx' type='boolean' value='true'/>
+    <property name='rdpid' type='boolean' value='false'/>
+    <property name='arat' type='boolean' value='true'/>
+    <property name='pause-filter' type='boolean' value='false'/>
+    <property name='xsavec' type='boolean' value='true'/>
+    <property name='osxsave' type='boolean' value='false'/>
+    <property name='kvm-asyncpf' type='boolean' value='true'/>
+    <property name='perfctr-core' type='boolean' value='false'/>
+    <property name='mpx' type='boolean' value='true'/>
+    <property name='pbe' type='boolean' value='false'/>
+    <property name='avx512cd' type='boolean' value='false'/>
+    <property name='decodeassists' type='boolean' value='false'/>
+    <property name='sse4.1' type='boolean' value='true'/>
+    <property name='avx512f' type='boolean' value='false'/>
+    <property name='msr' type='boolean' value='true'/>
+    <property name='mce' type='boolean' value='true'/>
+    <property name='mca' type='boolean' value='true'/>
+    <property name='xcrypt' type='boolean' value='false'/>
+    <property name='xgetbv1' type='boolean' value='true'/>
+    <property name='cid' type='boolean' value='false'/>
+    <property name='ds' type='boolean' value='false'/>
+    <property name='fxsr' type='boolean' value='true'/>
+    <property name='xsaveopt' type='boolean' value='true'/>
+    <property name='xtpr' type='boolean' value='false'/>
+    <property name='avx512vl' type='boolean' value='false'/>
+    <property name='avx512-vpopcntdq' type='boolean' value='false'/>
+    <property name='phe' type='boolean' value='false'/>
+    <property name='extapic' type='boolean' value='false'/>
+    <property name='3dnowprefetch' type='boolean' value='true'/>
+    <property name='cr8legacy' type='boolean' value='false'/>
+    <property name='xcrypt-en' type='boolean' value='false'/>
+    <property name='pn' type='boolean' value='false'/>
+    <property name='dca' type='boolean' value='false'/>
+    <property name='pku' type='boolean' value='false'/>
+    <property name='smx' type='boolean' value='false'/>
+    <property name='cmp-legacy' type='boolean' value='false'/>
+    <property name='avx512-4fmaps' type='boolean' value='false'/>
+    <property name='vmcb-clean' type='boolean' value='false'/>
+    <property name='hle' type='boolean' value='true'/>
+    <property name='3dnowext' type='boolean' value='false'/>
+    <property name='npt' type='boolean' value='false'/>
+    <property name='clwb' type='boolean' value='false'/>
+    <property name='lbrv' type='boolean' value='false'/>
+    <property name='adx' type='boolean' value='true'/>
+    <property name='ss' type='boolean' value='true'/>
+    <property name='pni' type='boolean' value='true'/>
+    <property name='svm-lock' type='boolean' value='false'/>
+    <property name='smep' type='boolean' value='true'/>
+    <property name='smap' type='boolean' value='true'/>
+    <property name='pfthreshold' type='boolean' value='false'/>
+    <property name='x2apic' type='boolean' value='true'/>
+    <property name='avx512vbmi' type='boolean' value='false'/>
+    <property name='flushbyasid' type='boolean' value='false'/>
+    <property name='f16c' type='boolean' value='true'/>
+    <property name='ace2-en' type='boolean' value='false'/>
+    <property name='pae' type='boolean' value='true'/>
+    <property name='pat' type='boolean' value='true'/>
+    <property name='sse' type='boolean' value='true'/>
+    <property name='phe-en' type='boolean' value='false'/>
+    <property name='kvm-nopiodelay' type='boolean' value='true'/>
+    <property name='tm' type='boolean' value='false'/>
+    <property name='kvmclock-stable-bit' type='boolean' value='true'/>
+    <property name='hypervisor' type='boolean' value='true'/>
+    <property name='pcommit' type='boolean' value='false'/>
+    <property name='syscall' type='boolean' value='true'/>
+    <property name='avx512dq' type='boolean' value='false'/>
+    <property name='svm' type='boolean' value='false'/>
+    <property name='invtsc' type='boolean' value='false'/>
+    <property name='sse2' type='boolean' value='true'/>
+    <property name='est' type='boolean' value='false'/>
+    <property name='avx512ifma' type='boolean' value='false'/>
+    <property name='tm2' type='boolean' value='false'/>
+    <property name='kvm-pv-eoi' type='boolean' value='true'/>
+    <property name='cx8' type='boolean' value='true'/>
+    <property name='kvm-mmu' type='boolean' value='false'/>
+    <property name='sse4.2' type='boolean' value='true'/>
+    <property name='pge' type='boolean' value='true'/>
+    <property name='pdcm' type='boolean' value='false'/>
+    <property name='movbe' type='boolean' value='true'/>
+    <property name='nrip-save' type='boolean' value='false'/>
+    <property name='ssse3' type='boolean' value='true'/>
+    <property name='sse4a' type='boolean' value='false'/>
+    <property name='invpcid' type='boolean' value='true'/>
+    <property name='pdpe1gb' type='boolean' value='true'/>
+    <property name='tsc-deadline' type='boolean' value='true'/>
+    <property name='fma' type='boolean' value='true'/>
+    <property name='cx16' type='boolean' value='true'/>
+    <property name='de' type='boolean' value='true'/>
+    <property name='xsave' type='boolean' value='true'/>
+    <property name='clflush' type='boolean' value='true'/>
+    <property name='skinit' type='boolean' value='false'/>
+    <property name='tsc' type='boolean' value='true'/>
+    <property name='tce' type='boolean' value='false'/>
+    <property name='fpu' type='boolean' value='true'/>
+    <property name='ds-cpl' type='boolean' value='false'/>
+    <property name='ibs' type='boolean' value='false'/>
+    <property name='fma4' type='boolean' value='false'/>
+    <property name='la57' type='boolean' value='false'/>
+    <property name='osvw' type='boolean' value='false'/>
+    <property name='apic' type='boolean' value='true'/>
+    <property name='pmm' type='boolean' value='false'/>
+    <property name='tsc-adjust' type='boolean' value='true'/>
+    <property name='kvm-steal-time' type='boolean' value='true'/>
+    <property name='kvmclock' type='boolean' value='true'/>
+    <property name='lwp' type='boolean' value='false'/>
+    <property name='xop' type='boolean' value='false'/>
+    <property name='avx' type='boolean' value='true'/>
+    <property name='ospke' type='boolean' value='false'/>
+    <property name='acpi' type='boolean' value='false'/>
+    <property name='avx512bw' type='boolean' value='false'/>
+    <property name='ace2' type='boolean' value='false'/>
+    <property name='fsgsbase' type='boolean' value='true'/>
+    <property name='ht' type='boolean' value='false'/>
+    <property name='nx' type='boolean' value='true'/>
+    <property name='pclmulqdq' type='boolean' value='true'/>
+    <property name='mmxext' type='boolean' value='false'/>
+    <property name='popcnt' type='boolean' value='true'/>
+    <property name='xsaves' type='boolean' value='true'/>
+    <property name='lm' type='boolean' value='true'/>
+    <property name='umip' type='boolean' value='false'/>
+    <property name='pse' type='boolean' value='true'/>
+    <property name='avx2' type='boolean' value='true'/>
+    <property name='sep' type='boolean' value='true'/>
+    <property name='nodeid-msr' type='boolean' value='false'/>
+    <property name='misalignsse' type='boolean' value='false'/>
+    <property name='bmi1' type='boolean' value='true'/>
+    <property name='bmi2' type='boolean' value='true'/>
+    <property name='kvm-pv-unhalt' type='boolean' value='true'/>
+    <property name='tsc-scale' type='boolean' value='false'/>
+    <property name='topoext' type='boolean' value='false'/>
+    <property name='clflushopt' type='boolean' value='true'/>
+    <property name='monitor' type='boolean' value='false'/>
+    <property name='avx512er' type='boolean' value='false'/>
+    <property name='pmm-en' type='boolean' value='false'/>
+    <property name='pcid' type='boolean' value='true'/>
+    <property name='3dnow' type='boolean' value='false'/>
+    <property name='erms' type='boolean' value='true'/>
+    <property name='lahf-lm' type='boolean' value='true'/>
+    <property name='fxsr-opt' type='boolean' value='false'/>
+    <property name='xstore' type='boolean' value='false'/>
+    <property name='rtm' type='boolean' value='true'/>
+    <property name='lmce' type='boolean' value='true'/>
+    <property name='perfctr-nb' type='boolean' value='false'/>
+    <property name='rdrand' type='boolean' value='true'/>
+    <property name='rdseed' type='boolean' value='true'/>
+    <property name='avx512-4vnniw' type='boolean' value='false'/>
+    <property name='vme' type='boolean' value='true'/>
+    <property name='vmx' type='boolean' value='true'/>
+    <property name='dtes64' type='boolean' value='false'/>
+    <property name='mtrr' type='boolean' value='true'/>
+    <property name='rdtscp' type='boolean' value='true'/>
+    <property name='pse36' type='boolean' value='true'/>
+    <property name='tbm' type='boolean' value='false'/>
+    <property name='wdt' type='boolean' value='false'/>
+    <property name='sha-ni' type='boolean' value='false'/>
+    <property name='abm' type='boolean' value='true'/>
+    <property name='avx512pf' type='boolean' value='false'/>
+    <property name='xstore-en' type='boolean' value='false'/>
   </hostCPU>
   <cpu type='kvm' name='max' usable='yes'/>
   <cpu type='kvm' name='host' usable='yes'/>
-- 
2.11.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux