|
Pablo Greco |
40546a |
From 74ecc2a0c728cf59279c61e1e9837423c72182e9 Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
40546a |
Message-Id: <74ecc2a0c728cf59279c61e1e9837423c72182e9@dist-git>
|
|
Pablo Greco |
40546a |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Date: Fri, 21 Jun 2019 09:25:24 +0200
|
|
Pablo Greco |
40546a |
Subject: [PATCH] cpu_x86: Rename virCPUx86DataItem variables
|
|
Pablo Greco |
40546a |
MIME-Version: 1.0
|
|
Pablo Greco |
40546a |
Content-Type: text/plain; charset=UTF-8
|
|
Pablo Greco |
40546a |
Content-Transfer-Encoding: 8bit
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
(cherry picked from commit 6c22b329d5bc592a390bd4d802c55a2a44af750e)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Message-Id: <570635ac7fb5f7a6514072ee4b871eb4d08f65bc.1561068591.git.jdenemar@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
---
|
|
Pablo Greco |
40546a |
src/cpu/cpu_x86.c | 128 +++++++++++++++++++++++-----------------------
|
|
Pablo Greco |
40546a |
1 file changed, 64 insertions(+), 64 deletions(-)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
index 6e1fb37d20..74f4083aac 100644
|
|
Pablo Greco |
40546a |
--- a/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
+++ b/src/cpu/cpu_x86.c
|
|
Pablo Greco |
40546a |
@@ -327,13 +327,13 @@ x86DataCpuidNext(virCPUx86DataIteratorPtr iterator)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
static virCPUx86DataItemPtr
|
|
Pablo Greco |
40546a |
x86DataCpuid(const virCPUx86Data *data,
|
|
Pablo Greco |
40546a |
- const virCPUx86DataItem *cpuid)
|
|
Pablo Greco |
40546a |
+ const virCPUx86DataItem *item)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
size_t i;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
for (i = 0; i < data->len; i++) {
|
|
Pablo Greco |
40546a |
- if (data->items[i].cpuid.eax_in == cpuid->cpuid.eax_in &&
|
|
Pablo Greco |
40546a |
- data->items[i].cpuid.ecx_in == cpuid->cpuid.ecx_in)
|
|
Pablo Greco |
40546a |
+ if (data->items[i].cpuid.eax_in == item->cpuid.eax_in &&
|
|
Pablo Greco |
40546a |
+ data->items[i].cpuid.ecx_in == item->cpuid.ecx_in)
|
|
Pablo Greco |
40546a |
return data->items + i;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -379,15 +379,15 @@ x86DataCopy(virCPUx86Data *dst, const virCPUx86Data *src)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
static int
|
|
Pablo Greco |
40546a |
virCPUx86DataAddCPUIDInt(virCPUx86Data *data,
|
|
Pablo Greco |
40546a |
- const virCPUx86DataItem *cpuid)
|
|
Pablo Greco |
40546a |
+ const virCPUx86DataItem *item)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataItemPtr existing;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if ((existing = x86DataCpuid(data, cpuid))) {
|
|
Pablo Greco |
40546a |
- x86cpuidSetBits(&existing->cpuid, &cpuid->cpuid);
|
|
Pablo Greco |
40546a |
+ if ((existing = x86DataCpuid(data, item))) {
|
|
Pablo Greco |
40546a |
+ x86cpuidSetBits(&existing->cpuid, &item->cpuid);
|
|
Pablo Greco |
40546a |
} else {
|
|
Pablo Greco |
40546a |
if (VIR_APPEND_ELEMENT_COPY(data->items, data->len,
|
|
Pablo Greco |
40546a |
- *((virCPUx86DataItemPtr)cpuid)) < 0)
|
|
Pablo Greco |
40546a |
+ *((virCPUx86DataItemPtr)item)) < 0)
|
|
Pablo Greco |
40546a |
return -1;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
qsort(data->items, data->len,
|
|
Pablo Greco |
40546a |
@@ -403,16 +403,16 @@ x86DataAdd(virCPUx86Data *data1,
|
|
Pablo Greco |
40546a |
const virCPUx86Data *data2)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data2);
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid1;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid2;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item1;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item2;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuid2 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
- cpuid1 = x86DataCpuid(data1, cpuid2);
|
|
Pablo Greco |
40546a |
+ while ((item2 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
+ item1 = x86DataCpuid(data1, item2);
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if (cpuid1) {
|
|
Pablo Greco |
40546a |
- x86cpuidSetBits(&cpuid1->cpuid, &cpuid2->cpuid);
|
|
Pablo Greco |
40546a |
+ if (item1) {
|
|
Pablo Greco |
40546a |
+ x86cpuidSetBits(&item1->cpuid, &item2->cpuid);
|
|
Pablo Greco |
40546a |
} else {
|
|
Pablo Greco |
40546a |
- if (virCPUx86DataAddCPUIDInt(data1, cpuid2) < 0)
|
|
Pablo Greco |
40546a |
+ if (virCPUx86DataAddCPUIDInt(data1, item2) < 0)
|
|
Pablo Greco |
40546a |
return -1;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
@@ -426,12 +426,12 @@ x86DataSubtract(virCPUx86Data *data1,
|
|
Pablo Greco |
40546a |
const virCPUx86Data *data2)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data1);
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid1;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid2;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item1;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item2;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
- if ((cpuid2 = x86DataCpuid(data2, cpuid1)))
|
|
Pablo Greco |
40546a |
- x86cpuidClearBits(&cpuid1->cpuid, &cpuid2->cpuid);
|
|
Pablo Greco |
40546a |
+ while ((item1 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
+ if ((item2 = x86DataCpuid(data2, item1)))
|
|
Pablo Greco |
40546a |
+ x86cpuidClearBits(&item1->cpuid, &item2->cpuid);
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -441,15 +441,15 @@ x86DataIntersect(virCPUx86Data *data1,
|
|
Pablo Greco |
40546a |
const virCPUx86Data *data2)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data1);
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid1;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid2;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item1;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item2;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuid1 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
- cpuid2 = x86DataCpuid(data2, cpuid1);
|
|
Pablo Greco |
40546a |
- if (cpuid2)
|
|
Pablo Greco |
40546a |
- x86cpuidAndBits(&cpuid1->cpuid, &cpuid2->cpuid);
|
|
Pablo Greco |
40546a |
+ while ((item1 = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
+ item2 = x86DataCpuid(data2, item1);
|
|
Pablo Greco |
40546a |
+ if (item2)
|
|
Pablo Greco |
40546a |
+ x86cpuidAndBits(&item1->cpuid, &item2->cpuid);
|
|
Pablo Greco |
40546a |
else
|
|
Pablo Greco |
40546a |
- x86cpuidClearBits(&cpuid1->cpuid, &cpuid1->cpuid);
|
|
Pablo Greco |
40546a |
+ x86cpuidClearBits(&item1->cpuid, &item1->cpuid);
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -469,12 +469,12 @@ x86DataIsSubset(const virCPUx86Data *data,
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter = virCPUx86DataIteratorInit((virCPUx86Data *)subset);
|
|
Pablo Greco |
40546a |
- const virCPUx86DataItem *cpuid;
|
|
Pablo Greco |
40546a |
- const virCPUx86DataItem *cpuidSubset;
|
|
Pablo Greco |
40546a |
+ const virCPUx86DataItem *item;
|
|
Pablo Greco |
40546a |
+ const virCPUx86DataItem *itemSubset;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuidSubset = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
- if (!(cpuid = x86DataCpuid(data, cpuidSubset)) ||
|
|
Pablo Greco |
40546a |
- !x86cpuidMatchMasked(&cpuid->cpuid, &cpuidSubset->cpuid))
|
|
Pablo Greco |
40546a |
+ while ((itemSubset = x86DataCpuidNext(&iter))) {
|
|
Pablo Greco |
40546a |
+ if (!(item = x86DataCpuid(data, itemSubset)) ||
|
|
Pablo Greco |
40546a |
+ !x86cpuidMatchMasked(&item->cpuid, &itemSubset->cpuid))
|
|
Pablo Greco |
40546a |
return false;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -509,14 +509,14 @@ static virCPUx86VendorPtr
|
|
Pablo Greco |
40546a |
x86DataToVendor(const virCPUx86Data *data,
|
|
Pablo Greco |
40546a |
virCPUx86MapPtr map)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item;
|
|
Pablo Greco |
40546a |
size_t i;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
for (i = 0; i < map->nvendors; i++) {
|
|
Pablo Greco |
40546a |
virCPUx86VendorPtr vendor = map->vendors[i];
|
|
Pablo Greco |
40546a |
- if ((cpuid = x86DataCpuid(data, &vendor->data)) &&
|
|
Pablo Greco |
40546a |
- x86cpuidMatchMasked(&cpuid->cpuid, &vendor->data.cpuid)) {
|
|
Pablo Greco |
40546a |
- x86cpuidClearBits(&cpuid->cpuid, &vendor->data.cpuid);
|
|
Pablo Greco |
40546a |
+ if ((item = x86DataCpuid(data, &vendor->data)) &&
|
|
Pablo Greco |
40546a |
+ x86cpuidMatchMasked(&item->cpuid, &vendor->data.cpuid)) {
|
|
Pablo Greco |
40546a |
+ x86cpuidClearBits(&item->cpuid, &vendor->data.cpuid);
|
|
Pablo Greco |
40546a |
return vendor;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
@@ -626,12 +626,12 @@ static uint32_t
|
|
Pablo Greco |
40546a |
x86DataToSignature(const virCPUx86Data *data)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataItem leaf1 = CPUID(.eax_in = 0x1);
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if (!(cpuid = x86DataCpuid(data, &leaf1)))
|
|
Pablo Greco |
40546a |
+ if (!(item = x86DataCpuid(data, &leaf1)))
|
|
Pablo Greco |
40546a |
return 0;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- return cpuid->cpuid.eax & SIGNATURE_MASK;
|
|
Pablo Greco |
40546a |
+ return item->cpuid.eax & SIGNATURE_MASK;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -639,9 +639,9 @@ static int
|
|
Pablo Greco |
40546a |
x86DataAddSignature(virCPUx86Data *data,
|
|
Pablo Greco |
40546a |
uint32_t signature)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
- virCPUx86DataItem cpuid = CPUID(.eax_in = 0x1, .eax = signature);
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItem leaf1 = CPUID(.eax_in = 0x1, .eax = signature);
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- return virCPUx86DataAddCPUIDInt(data, &cpuid);
|
|
Pablo Greco |
40546a |
+ return virCPUx86DataAddCPUIDInt(data, &leaf1);
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -905,7 +905,7 @@ x86FeatureParse(xmlXPathContextPtr ctxt,
|
|
Pablo Greco |
40546a |
virCPUx86MapPtr map = data;
|
|
Pablo Greco |
40546a |
xmlNodePtr *nodes = NULL;
|
|
Pablo Greco |
40546a |
virCPUx86FeaturePtr feature;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItem cpuid;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItem item;
|
|
Pablo Greco |
40546a |
size_t i;
|
|
Pablo Greco |
40546a |
int n;
|
|
Pablo Greco |
40546a |
char *str = NULL;
|
|
Pablo Greco |
40546a |
@@ -942,13 +942,13 @@ x86FeatureParse(xmlXPathContextPtr ctxt,
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
for (i = 0; i < n; i++) {
|
|
Pablo Greco |
40546a |
ctxt->node = nodes[i];
|
|
Pablo Greco |
40546a |
- if (x86ParseCPUID(ctxt, &cpuid) < 0) {
|
|
Pablo Greco |
40546a |
+ if (x86ParseCPUID(ctxt, &item) < 0) {
|
|
Pablo Greco |
40546a |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
Pablo Greco |
40546a |
_("Invalid cpuid[%zu] in %s feature"),
|
|
Pablo Greco |
40546a |
i, feature->name);
|
|
Pablo Greco |
40546a |
goto cleanup;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
- if (virCPUx86DataAddCPUIDInt(&feature->data, &cpuid))
|
|
Pablo Greco |
40546a |
+ if (virCPUx86DataAddCPUIDInt(&feature->data, &item))
|
|
Pablo Greco |
40546a |
goto cleanup;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -1148,16 +1148,16 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|
Pablo Greco |
40546a |
virCPUx86CompareResult result = EQUAL;
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter1 = virCPUx86DataIteratorInit(&model1->data);
|
|
Pablo Greco |
40546a |
virCPUx86DataIterator iter2 = virCPUx86DataIteratorInit(&model2->data);
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid1;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid2;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item1;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr item2;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuid1 = x86DataCpuidNext(&iter1))) {
|
|
Pablo Greco |
40546a |
+ while ((item1 = x86DataCpuidNext(&iter1))) {
|
|
Pablo Greco |
40546a |
virCPUx86CompareResult match = SUPERSET;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if ((cpuid2 = x86DataCpuid(&model2->data, cpuid1))) {
|
|
Pablo Greco |
40546a |
- if (x86cpuidMatch(&cpuid1->cpuid, &cpuid2->cpuid))
|
|
Pablo Greco |
40546a |
+ if ((item2 = x86DataCpuid(&model2->data, item1))) {
|
|
Pablo Greco |
40546a |
+ if (x86cpuidMatch(&item1->cpuid, &item2->cpuid))
|
|
Pablo Greco |
40546a |
continue;
|
|
Pablo Greco |
40546a |
- else if (!x86cpuidMatchMasked(&cpuid1->cpuid, &cpuid2->cpuid))
|
|
Pablo Greco |
40546a |
+ else if (!x86cpuidMatchMasked(&item1->cpuid, &item2->cpuid))
|
|
Pablo Greco |
40546a |
match = SUBSET;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -1167,13 +1167,13 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|
Pablo Greco |
40546a |
return UNRELATED;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- while ((cpuid2 = x86DataCpuidNext(&iter2))) {
|
|
Pablo Greco |
40546a |
+ while ((item2 = x86DataCpuidNext(&iter2))) {
|
|
Pablo Greco |
40546a |
virCPUx86CompareResult match = SUBSET;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if ((cpuid1 = x86DataCpuid(&model1->data, cpuid2))) {
|
|
Pablo Greco |
40546a |
- if (x86cpuidMatch(&cpuid2->cpuid, &cpuid1->cpuid))
|
|
Pablo Greco |
40546a |
+ if ((item1 = x86DataCpuid(&model1->data, item2))) {
|
|
Pablo Greco |
40546a |
+ if (x86cpuidMatch(&item2->cpuid, &item1->cpuid))
|
|
Pablo Greco |
40546a |
continue;
|
|
Pablo Greco |
40546a |
- else if (!x86cpuidMatchMasked(&cpuid2->cpuid, &cpuid1->cpuid))
|
|
Pablo Greco |
40546a |
+ else if (!x86cpuidMatchMasked(&item2->cpuid, &item1->cpuid))
|
|
Pablo Greco |
40546a |
match = SUPERSET;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -1484,7 +1484,7 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
xmlNodePtr *nodes = NULL;
|
|
Pablo Greco |
40546a |
virCPUDataPtr cpuData = NULL;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItem cpuid;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItem item;
|
|
Pablo Greco |
40546a |
size_t i;
|
|
Pablo Greco |
40546a |
int n;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -1500,12 +1500,12 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
for (i = 0; i < n; i++) {
|
|
Pablo Greco |
40546a |
ctxt->node = nodes[i];
|
|
Pablo Greco |
40546a |
- if (x86ParseCPUID(ctxt, &cpuid) < 0) {
|
|
Pablo Greco |
40546a |
+ if (x86ParseCPUID(ctxt, &item) < 0) {
|
|
Pablo Greco |
40546a |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
Pablo Greco |
40546a |
_("failed to parse cpuid[%zu]"), i);
|
|
Pablo Greco |
40546a |
goto error;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
- if (virCPUx86DataAddCPUID(cpuData, &cpuid) < 0)
|
|
Pablo Greco |
40546a |
+ if (virCPUx86DataAddCPUID(cpuData, &item) < 0)
|
|
Pablo Greco |
40546a |
goto error;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -2382,10 +2382,10 @@ cpuidSetLeaf12(virCPUDataPtr data,
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
virCPUx86DataItem item = CPUID(.eax_in = 0x7);
|
|
Pablo Greco |
40546a |
virCPUx86CPUIDPtr cpuid = &item.cpuid;
|
|
Pablo Greco |
40546a |
- virCPUx86DataItemPtr cpuid7;
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItemPtr leaf7;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if (!(cpuid7 = x86DataCpuid(&data->data.x86, &item)) ||
|
|
Pablo Greco |
40546a |
- !(cpuid7->cpuid.ebx & (1 << 2)))
|
|
Pablo Greco |
40546a |
+ if (!(leaf7 = x86DataCpuid(&data->data.x86, &item)) ||
|
|
Pablo Greco |
40546a |
+ !(leaf7->cpuid.ebx & (1 << 2)))
|
|
Pablo Greco |
40546a |
return 0;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
if (virCPUx86DataAddCPUID(data, subLeaf0) < 0)
|
|
Pablo Greco |
40546a |
@@ -3078,9 +3078,9 @@ virCPUx86ValidateFeatures(virCPUDefPtr cpu)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
int
|
|
Pablo Greco |
40546a |
virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
|
|
Pablo Greco |
40546a |
- const virCPUx86DataItem *cpuid)
|
|
Pablo Greco |
40546a |
+ const virCPUx86DataItem *item)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
- return virCPUx86DataAddCPUIDInt(&cpuData->data.x86, cpuid);
|
|
Pablo Greco |
40546a |
+ return virCPUx86DataAddCPUIDInt(&cpuData->data.x86, item);
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
@@ -3112,12 +3112,12 @@ int
|
|
Pablo Greco |
40546a |
virCPUx86DataSetVendor(virCPUDataPtr cpuData,
|
|
Pablo Greco |
40546a |
const char *vendor)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
- virCPUx86DataItem cpuid = CPUID(0);
|
|
Pablo Greco |
40546a |
+ virCPUx86DataItem item = CPUID(0);
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- if (virCPUx86VendorToCPUID(vendor, &cpuid) < 0)
|
|
Pablo Greco |
40546a |
+ if (virCPUx86VendorToCPUID(vendor, &item) < 0)
|
|
Pablo Greco |
40546a |
return -1;
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
- return virCPUx86DataAddCPUID(cpuData, &cpuid);
|
|
Pablo Greco |
40546a |
+ return virCPUx86DataAddCPUID(cpuData, &item);
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
--
|
|
Pablo Greco |
40546a |
2.22.0
|
|
Pablo Greco |
40546a |
|