render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c480ed
From 99431463aaf37298bc90f82bc6b20b44f4853246 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <99431463aaf37298bc90f82bc6b20b44f4853246@dist-git>
c480ed
From: Jiri Denemark <jdenemar@redhat.com>
c480ed
Date: Fri, 21 Jun 2019 09:25:26 +0200
c480ed
Subject: [PATCH] cpu_x86: Rename x86DataCpuid
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
It is now called virCPUx86DataGet.
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
(cherry picked from commit 609f467f1377da3418dad23fdd9f7136e462ba5b)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Message-Id: <427e52b2993356d0170e2f756526e9d523686a42.1561068591.git.jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/cpu/cpu_x86.c | 26 +++++++++++++-------------
c480ed
 1 file changed, 13 insertions(+), 13 deletions(-)
c480ed
c480ed
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
c480ed
index d9475e5b4a..52709f109e 100644
c480ed
--- a/src/cpu/cpu_x86.c
c480ed
+++ b/src/cpu/cpu_x86.c
c480ed
@@ -326,8 +326,8 @@ virCPUx86DataNext(virCPUx86DataIteratorPtr iterator)
c480ed
 
c480ed
 
c480ed
 static virCPUx86DataItemPtr
c480ed
-x86DataCpuid(const virCPUx86Data *data,
c480ed
-             const virCPUx86DataItem *item)
c480ed
+virCPUx86DataGet(const virCPUx86Data *data,
c480ed
+                 const virCPUx86DataItem *item)
c480ed
 {
c480ed
     size_t i;
c480ed
 
c480ed
@@ -383,7 +383,7 @@ virCPUx86DataAddCPUIDInt(virCPUx86Data *data,
c480ed
 {
c480ed
     virCPUx86DataItemPtr existing;
c480ed
 
c480ed
-    if ((existing = x86DataCpuid(data, item))) {
c480ed
+    if ((existing = virCPUx86DataGet(data, item))) {
c480ed
         x86cpuidSetBits(&existing->cpuid, &item->cpuid);
c480ed
     } else {
c480ed
         if (VIR_APPEND_ELEMENT_COPY(data->items, data->len,
c480ed
@@ -407,7 +407,7 @@ x86DataAdd(virCPUx86Data *data1,
c480ed
     virCPUx86DataItemPtr item2;
c480ed
 
c480ed
     while ((item2 = virCPUx86DataNext(&iter))) {
c480ed
-        item1 = x86DataCpuid(data1, item2);
c480ed
+        item1 = virCPUx86DataGet(data1, item2);
c480ed
 
c480ed
         if (item1) {
c480ed
             x86cpuidSetBits(&item1->cpuid, &item2->cpuid);
c480ed
@@ -430,7 +430,7 @@ x86DataSubtract(virCPUx86Data *data1,
c480ed
     virCPUx86DataItemPtr item2;
c480ed
 
c480ed
     while ((item1 = virCPUx86DataNext(&iter))) {
c480ed
-        if ((item2 = x86DataCpuid(data2, item1)))
c480ed
+        if ((item2 = virCPUx86DataGet(data2, item1)))
c480ed
             x86cpuidClearBits(&item1->cpuid, &item2->cpuid);
c480ed
     }
c480ed
 }
c480ed
@@ -445,7 +445,7 @@ x86DataIntersect(virCPUx86Data *data1,
c480ed
     virCPUx86DataItemPtr item2;
c480ed
 
c480ed
     while ((item1 = virCPUx86DataNext(&iter))) {
c480ed
-        item2 = x86DataCpuid(data2, item1);
c480ed
+        item2 = virCPUx86DataGet(data2, item1);
c480ed
         if (item2)
c480ed
             x86cpuidAndBits(&item1->cpuid, &item2->cpuid);
c480ed
         else
c480ed
@@ -473,7 +473,7 @@ x86DataIsSubset(const virCPUx86Data *data,
c480ed
     const virCPUx86DataItem *itemSubset;
c480ed
 
c480ed
     while ((itemSubset = virCPUx86DataNext(&iter))) {
c480ed
-        if (!(item = x86DataCpuid(data, itemSubset)) ||
c480ed
+        if (!(item = virCPUx86DataGet(data, itemSubset)) ||
c480ed
             !x86cpuidMatchMasked(&item->cpuid, &itemSubset->cpuid))
c480ed
             return false;
c480ed
     }
c480ed
@@ -514,7 +514,7 @@ x86DataToVendor(const virCPUx86Data *data,
c480ed
 
c480ed
     for (i = 0; i < map->nvendors; i++) {
c480ed
         virCPUx86VendorPtr vendor = map->vendors[i];
c480ed
-        if ((item = x86DataCpuid(data, &vendor->data)) &&
c480ed
+        if ((item = virCPUx86DataGet(data, &vendor->data)) &&
c480ed
             x86cpuidMatchMasked(&item->cpuid, &vendor->data.cpuid)) {
c480ed
             x86cpuidClearBits(&item->cpuid, &vendor->data.cpuid);
c480ed
             return vendor;
c480ed
@@ -609,7 +609,7 @@ x86DataToSignatureFull(const virCPUx86Data *data,
c480ed
 
c480ed
     *family = *model = *stepping = 0;
c480ed
 
c480ed
-    if (!(item = x86DataCpuid(data, &leaf1)))
c480ed
+    if (!(item = virCPUx86DataGet(data, &leaf1)))
c480ed
         return;
c480ed
 
c480ed
     cpuid = &item->cpuid;
c480ed
@@ -628,7 +628,7 @@ x86DataToSignature(const virCPUx86Data *data)
c480ed
     virCPUx86DataItem leaf1 = CPUID(.eax_in = 0x1);
c480ed
     virCPUx86DataItemPtr item;
c480ed
 
c480ed
-    if (!(item = x86DataCpuid(data, &leaf1)))
c480ed
+    if (!(item = virCPUx86DataGet(data, &leaf1)))
c480ed
         return 0;
c480ed
 
c480ed
     return item->cpuid.eax & SIGNATURE_MASK;
c480ed
@@ -1154,7 +1154,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
c480ed
     while ((item1 = virCPUx86DataNext(&iter1))) {
c480ed
         virCPUx86CompareResult match = SUPERSET;
c480ed
 
c480ed
-        if ((item2 = x86DataCpuid(&model2->data, item1))) {
c480ed
+        if ((item2 = virCPUx86DataGet(&model2->data, item1))) {
c480ed
             if (x86cpuidMatch(&item1->cpuid, &item2->cpuid))
c480ed
                 continue;
c480ed
             else if (!x86cpuidMatchMasked(&item1->cpuid, &item2->cpuid))
c480ed
@@ -1170,7 +1170,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
c480ed
     while ((item2 = virCPUx86DataNext(&iter2))) {
c480ed
         virCPUx86CompareResult match = SUBSET;
c480ed
 
c480ed
-        if ((item1 = x86DataCpuid(&model1->data, item2))) {
c480ed
+        if ((item1 = virCPUx86DataGet(&model1->data, item2))) {
c480ed
             if (x86cpuidMatch(&item2->cpuid, &item1->cpuid))
c480ed
                 continue;
c480ed
             else if (!x86cpuidMatchMasked(&item2->cpuid, &item1->cpuid))
c480ed
@@ -2384,7 +2384,7 @@ cpuidSetLeaf12(virCPUDataPtr data,
c480ed
     virCPUx86CPUIDPtr cpuid = &item.cpuid;
c480ed
     virCPUx86DataItemPtr leaf7;
c480ed
 
c480ed
-    if (!(leaf7 = x86DataCpuid(&data->data.x86, &item)) ||
c480ed
+    if (!(leaf7 = virCPUx86DataGet(&data->data.x86, &item)) ||
c480ed
         !(leaf7->cpuid.ebx & (1 << 2)))
c480ed
         return 0;
c480ed
 
c480ed
-- 
c480ed
2.22.0
c480ed