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