render / rpms / libvirt

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