c313de
From 088d9da6e6c4f3edc0293f78ba7270941d2e7fd0 Mon Sep 17 00:00:00 2001
c313de
Message-Id: <088d9da6e6c4f3edc0293f78ba7270941d2e7fd0@dist-git>
c313de
From: Jiri Denemark <jdenemar@redhat.com>
c313de
Date: Fri, 21 Jun 2019 09:25:23 +0200
c313de
Subject: [PATCH] cpu_x86: Rename virCPUx86Vendor.cpuid
c313de
MIME-Version: 1.0
c313de
Content-Type: text/plain; charset=UTF-8
c313de
Content-Transfer-Encoding: 8bit
c313de
c313de
Although vendor string is always reported by CPUID, the container struct
c313de
is used for consistency and thus "cpuid" name is not a good fit anymore.
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
(cherry picked from commit c02d70d52efc4b7af09e68847ef72ad47a6bdcf1)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Message-Id: <0b6fccb50f2ce2b5d926a75c90a8107a300c8d57.1561068591.git.jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
---
c313de
 src/cpu/cpu_x86.c | 18 +++++++++---------
c313de
 1 file changed, 9 insertions(+), 9 deletions(-)
c313de
c313de
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
c313de
index 2e953eaa12..6e1fb37d20 100644
c313de
--- a/src/cpu/cpu_x86.c
c313de
+++ b/src/cpu/cpu_x86.c
c313de
@@ -49,7 +49,7 @@ typedef struct _virCPUx86Vendor virCPUx86Vendor;
c313de
 typedef virCPUx86Vendor *virCPUx86VendorPtr;
c313de
 struct _virCPUx86Vendor {
c313de
     char *name;
c313de
-    virCPUx86DataItem cpuid;
c313de
+    virCPUx86DataItem data;
c313de
 };
c313de
 
c313de
 typedef struct _virCPUx86Feature virCPUx86Feature;
c313de
@@ -514,9 +514,9 @@ x86DataToVendor(const virCPUx86Data *data,
c313de
 
c313de
     for (i = 0; i < map->nvendors; i++) {
c313de
         virCPUx86VendorPtr vendor = map->vendors[i];
c313de
-        if ((cpuid = x86DataCpuid(data, &vendor->cpuid)) &&
c313de
-            x86cpuidMatchMasked(&cpuid->cpuid, &vendor->cpuid.cpuid)) {
c313de
-            x86cpuidClearBits(&cpuid->cpuid, &vendor->cpuid.cpuid);
c313de
+        if ((cpuid = x86DataCpuid(data, &vendor->data)) &&
c313de
+            x86cpuidMatchMasked(&cpuid->cpuid, &vendor->data.cpuid)) {
c313de
+            x86cpuidClearBits(&cpuid->cpuid, &vendor->data.cpuid);
c313de
             return vendor;
c313de
         }
c313de
     }
c313de
@@ -759,7 +759,7 @@ x86VendorParse(xmlXPathContextPtr ctxt,
c313de
         goto cleanup;
c313de
     }
c313de
 
c313de
-    if (virCPUx86VendorToCPUID(string, &vendor->cpuid) < 0)
c313de
+    if (virCPUx86VendorToCPUID(string, &vendor->data) < 0)
c313de
         goto cleanup;
c313de
 
c313de
     if (VIR_APPEND_ELEMENT(map->vendors, map->nvendors, vendor) < 0)
c313de
@@ -1665,7 +1665,7 @@ x86Compute(virCPUDefPtr host,
c313de
 
c313de
         if (cpu->vendor && host_model->vendor &&
c313de
             virCPUx86DataAddCPUIDInt(&guest_model->data,
c313de
-                                     &host_model->vendor->cpuid) < 0)
c313de
+                                     &host_model->vendor->data) < 0)
c313de
             goto error;
c313de
 
c313de
         if (host_model->signatures &&
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->cpuid) < 0)
c313de
+        if (v && virCPUx86DataAddCPUID(data_vendor, &v->data) < 0)
c313de
             goto error;
c313de
     }
c313de
 
c313de
@@ -2650,7 +2650,7 @@ virCPUx86Baseline(virCPUDefPtr *cpus,
c313de
     }
c313de
 
c313de
     if (vendor &&
c313de
-        virCPUx86DataAddCPUIDInt(&base_model->data, &vendor->cpuid) < 0)
c313de
+        virCPUx86DataAddCPUIDInt(&base_model->data, &vendor->data) < 0)
c313de
         goto error;
c313de
 
c313de
     if (x86Decode(cpu, &base_model->data, models, modelName, migratable) < 0)
c313de
@@ -2949,7 +2949,7 @@ virCPUx86Translate(virCPUDefPtr cpu,
c313de
         goto cleanup;
c313de
 
c313de
     if (model->vendor &&
c313de
-        virCPUx86DataAddCPUIDInt(&model->data, &model->vendor->cpuid) < 0)
c313de
+        virCPUx86DataAddCPUIDInt(&model->data, &model->vendor->data) < 0)
c313de
         goto cleanup;
c313de
 
c313de
     if (model->signatures &&
c313de
-- 
c313de
2.22.0
c313de