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

[libvirt] [PATCH v3 06/28] qemu: Rename hostCPU/feature element in capabilities cache



The element will be generalized in the following commits.

Signed-off-by: Jiri Denemark <jdenemar redhat com>
---

Notes:
    Version 3:
    - s/featureNodes/nodes/
    - drop s/supported/boolean/ change
    
    Version 2:
    - no change

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

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


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