c313de
From d4df159ee1e489c9afc238f39e6bb52d4f71bce7 Mon Sep 17 00:00:00 2001
c313de
Message-Id: <d4df159ee1e489c9afc238f39e6bb52d4f71bce7@dist-git>
c313de
From: Jiri Denemark <jdenemar@redhat.com>
c313de
Date: Fri, 21 Jun 2019 09:25:29 +0200
c313de
Subject: [PATCH] cpu_x86: Rename virCPUx86DataAddCPUID
c313de
MIME-Version: 1.0
c313de
Content-Type: text/plain; charset=UTF-8
c313de
Content-Transfer-Encoding: 8bit
c313de
c313de
It's called virCPUx86DataAdd now.
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
(cherry picked from commit 8f1a8ce397d7514bee9f370a1531d668e01ec923)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Message-Id: <1be869684ede8249c16fcab128fc6775edda08be.1561068591.git.jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
---
c313de
 src/cpu/cpu_x86.c              | 46 +++++++++++++++++-----------------
c313de
 src/cpu/cpu_x86.h              |  4 +--
c313de
 src/libvirt_private.syms       |  2 +-
c313de
 src/libxl/libxl_capabilities.c |  2 +-
c313de
 src/qemu/qemu_monitor_json.c   |  2 +-
c313de
 5 files changed, 28 insertions(+), 28 deletions(-)
c313de
c313de
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
c313de
index 7e077577d3..6d48c9264c 100644
c313de
--- a/src/cpu/cpu_x86.c
c313de
+++ b/src/cpu/cpu_x86.c
c313de
@@ -1505,7 +1505,7 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt)
c313de
                            _("failed to parse cpuid[%zu]"), i);
c313de
             goto error;
c313de
         }
c313de
-        if (virCPUx86DataAddCPUID(cpuData, &item) < 0)
c313de
+        if (virCPUx86DataAdd(cpuData, &item) < 0)
c313de
             goto error;
c313de
     }
c313de
 
c313de
@@ -2153,7 +2153,7 @@ x86Encode(virArch arch,
c313de
         if (!(data_vendor = virCPUDataNew(arch)))
c313de
             goto error;
c313de
 
c313de
-        if (v && virCPUx86DataAddCPUID(data_vendor, &v->data) < 0)
c313de
+        if (v && virCPUx86DataAdd(data_vendor, &v->data) < 0)
c313de
             goto error;
c313de
     }
c313de
 
c313de
@@ -2229,13 +2229,13 @@ cpuidSetLeaf4(virCPUDataPtr data,
c313de
     virCPUx86DataItem item = *subLeaf0;
c313de
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     while (cpuid->eax & 0x1f) {
c313de
         cpuid->ecx_in++;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2254,13 +2254,13 @@ cpuidSetLeaf7(virCPUDataPtr data,
c313de
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c313de
     uint32_t sub;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     for (sub = 1; sub <= subLeaf0->cpuid.eax; sub++) {
c313de
         cpuid->ecx_in = sub;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2282,7 +2282,7 @@ cpuidSetLeafB(virCPUDataPtr data,
c313de
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c313de
 
c313de
     while (cpuid->ecx & 0xff00) {
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
         cpuid->ecx_in++;
c313de
         cpuidCall(cpuid);
c313de
@@ -2309,12 +2309,12 @@ cpuidSetLeafD(virCPUDataPtr data,
c313de
     virCPUx86CPUID sub1;
c313de
     uint32_t sub;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     cpuid->ecx_in = 1;
c313de
     cpuidCall(cpuid);
c313de
-    if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+    if (virCPUx86DataAdd(data, &item) < 0)
c313de
         return -1;
c313de
 
c313de
     sub0 = subLeaf0->cpuid;
c313de
@@ -2331,7 +2331,7 @@ cpuidSetLeafD(virCPUDataPtr data,
c313de
 
c313de
         cpuid->ecx_in = sub;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2356,7 +2356,7 @@ cpuidSetLeafResID(virCPUDataPtr data,
c313de
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c313de
     uint32_t sub;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     for (sub = 1; sub < 32; sub++) {
c313de
@@ -2364,7 +2364,7 @@ cpuidSetLeafResID(virCPUDataPtr data,
c313de
             continue;
c313de
         cpuid->ecx_in = sub;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2388,19 +2388,19 @@ cpuidSetLeaf12(virCPUDataPtr data,
c313de
         !(leaf7->cpuid.ebx & (1 << 2)))
c313de
         return 0;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     cpuid->eax_in = 0x12;
c313de
     cpuid->ecx_in = 1;
c313de
     cpuidCall(cpuid);
c313de
-    if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+    if (virCPUx86DataAdd(data, &item) < 0)
c313de
         return -1;
c313de
 
c313de
     cpuid->ecx_in = 2;
c313de
     cpuidCall(cpuid);
c313de
     while (cpuid->eax & 0xf) {
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
         cpuid->ecx_in++;
c313de
         cpuidCall(cpuid);
c313de
@@ -2421,13 +2421,13 @@ cpuidSetLeaf14(virCPUDataPtr data,
c313de
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c313de
     uint32_t sub;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     for (sub = 1; sub <= subLeaf0->cpuid.eax; sub++) {
c313de
         cpuid->ecx_in = sub;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2450,13 +2450,13 @@ cpuidSetLeaf17(virCPUDataPtr data,
c313de
     if (subLeaf0->cpuid.eax < 3)
c313de
         return 0;
c313de
 
c313de
-    if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
c313de
+    if (virCPUx86DataAdd(data, subLeaf0) < 0)
c313de
         return -1;
c313de
 
c313de
     for (sub = 1; sub <= subLeaf0->cpuid.eax; sub++) {
c313de
         cpuid->ecx_in = sub;
c313de
         cpuidCall(cpuid);
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0)
c313de
+        if (virCPUx86DataAdd(data, &item) < 0)
c313de
             return -1;
c313de
     }
c313de
     return 0;
c313de
@@ -2502,7 +2502,7 @@ cpuidSet(uint32_t base, virCPUDataPtr data)
c313de
         else if (leaf == 0x17)
c313de
             rc = cpuidSetLeaf17(data, &item);
c313de
         else
c313de
-            rc = virCPUx86DataAddCPUID(data, &item);
c313de
+            rc = virCPUx86DataAdd(data, &item);
c313de
 
c313de
         if (rc < 0)
c313de
             return -1;
c313de
@@ -3077,8 +3077,8 @@ virCPUx86ValidateFeatures(virCPUDefPtr cpu)
c313de
 
c313de
 
c313de
 int
c313de
-virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
c313de
-                      const virCPUx86DataItem *item)
c313de
+virCPUx86DataAdd(virCPUDataPtr cpuData,
c313de
+                 const virCPUx86DataItem *item)
c313de
 {
c313de
     return virCPUx86DataAddItem(&cpuData->data.x86, item);
c313de
 }
c313de
@@ -3117,7 +3117,7 @@ virCPUx86DataSetVendor(virCPUDataPtr cpuData,
c313de
     if (virCPUx86VendorToCPUID(vendor, &item) < 0)
c313de
         return -1;
c313de
 
c313de
-    return virCPUx86DataAddCPUID(cpuData, &item);
c313de
+    return virCPUx86DataAdd(cpuData, &item);
c313de
 }
c313de
 
c313de
 
c313de
diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h
c313de
index 94655746c6..8b51cef9c1 100644
c313de
--- a/src/cpu/cpu_x86.h
c313de
+++ b/src/cpu/cpu_x86.h
c313de
@@ -29,8 +29,8 @@
c313de
 
c313de
 extern struct cpuArchDriver cpuDriverX86;
c313de
 
c313de
-int virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
c313de
-                          const virCPUx86DataItem *cpuid);
c313de
+int virCPUx86DataAdd(virCPUDataPtr cpuData,
c313de
+                     const virCPUx86DataItem *cpuid);
c313de
 
c313de
 int virCPUx86DataSetSignature(virCPUDataPtr cpuData,
c313de
                               unsigned int family,
c313de
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
c313de
index a275fa9aa1..347667b17c 100644
c313de
--- a/src/libvirt_private.syms
c313de
+++ b/src/libvirt_private.syms
c313de
@@ -1203,7 +1203,7 @@ virCPUValidateFeatures;
c313de
 
c313de
 
c313de
 # cpu/cpu_x86.h
c313de
-virCPUx86DataAddCPUID;
c313de
+virCPUx86DataAdd;
c313de
 virCPUx86DataAddFeature;
c313de
 virCPUx86DataGetSignature;
c313de
 virCPUx86DataSetSignature;
c313de
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
c313de
index 231d72669f..2b351fbdde 100644
c313de
--- a/src/libxl/libxl_capabilities.c
c313de
+++ b/src/libxl/libxl_capabilities.c
c313de
@@ -73,7 +73,7 @@ libxlCapsAddCPUID(virCPUDataPtr data, virCPUx86CPUID *cpuid, ssize_t ncaps)
c313de
     for (i = 0; i < ncaps; i++) {
c313de
         item.cpuid = cpuid[i];
c313de
 
c313de
-        if (virCPUx86DataAddCPUID(data, &item) < 0) {
c313de
+        if (virCPUx86DataAdd(data, &item) < 0) {
c313de
             VIR_DEBUG("Failed to add CPUID(%x,%x)",
c313de
                       cpuid[i].eax_in, cpuid[i].ecx_in);
c313de
             return -1;
c313de
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
c313de
index 0b4dfd70c0..abfaa6e68a 100644
c313de
--- a/src/qemu/qemu_monitor_json.c
c313de
+++ b/src/qemu/qemu_monitor_json.c
c313de
@@ -7052,7 +7052,7 @@ qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data)
c313de
     for (i = 0; i < virJSONValueArraySize(data); i++) {
c313de
         if (qemuMonitorJSONParseCPUx86FeatureWord(virJSONValueArrayGet(data, i),
c313de
                                                   &item.cpuid) < 0 ||
c313de
-            virCPUx86DataAddCPUID(cpudata, &item) < 0)
c313de
+            virCPUx86DataAdd(cpudata, &item) < 0)
c313de
             goto error;
c313de
     }
c313de
 
c313de
-- 
c313de
2.22.0
c313de