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