|
|
c480ed |
From ad4abf728510a5fed123d46a223f19f0b8178045 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <ad4abf728510a5fed123d46a223f19f0b8178045@dist-git>
|
|
|
c480ed |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Date: Fri, 21 Jun 2019 09:25:25 +0200
|
|
|
c480ed |
Subject: [PATCH] cpu_x86: Rename x86DataCpuidNext function
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
The function is now called virCPUx86DataNext to reflect its purpose: it
|
|
|
c480ed |
is an iterator over CPU data (both CPUID and MSR in the near future).
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
(cherry picked from commit 5655b83139e47b6c52d48a7d10640bf3508865eb)
|
|
|
c480ed |
|
|
|
c480ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Message-Id: <bcc496d392ff77d824f53460cacb0a7de0993785.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 74f4083aac..d9475e5b4a 100644
|
|
|
c480ed |
--- a/src/cpu/cpu_x86.c
|
|
|
c480ed |
+++ b/src/cpu/cpu_x86.c
|
|
|
c480ed |
@@ -307,7 +307,7 @@ virCPUx86CPUIDSorter(const void *a, const void *b)
|
|
|
c480ed |
|
|
|
c480ed |
/* skips all zero CPUID leaves */
|
|
|
c480ed |
static virCPUx86DataItemPtr
|
|
|
c480ed |
-x86DataCpuidNext(virCPUx86DataIteratorPtr iterator)
|
|
|
c480ed |
+virCPUx86DataNext(virCPUx86DataIteratorPtr iterator)
|
|
|
c480ed |
{
|
|
|
c480ed |
const virCPUx86Data *data = iterator->data;
|
|
|
c480ed |
|
|
|
c480ed |
@@ -406,7 +406,7 @@ x86DataAdd(virCPUx86Data *data1,
|
|
|
c480ed |
virCPUx86DataItemPtr item1;
|
|
|
c480ed |
virCPUx86DataItemPtr item2;
|
|
|
c480ed |
|
|
|
c480ed |
- while ((item2 = x86DataCpuidNext(&iter))) {
|
|
|
c480ed |
+ while ((item2 = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
item1 = x86DataCpuid(data1, item2);
|
|
|
c480ed |
|
|
|
c480ed |
if (item1) {
|
|
|
c480ed |
@@ -429,7 +429,7 @@ x86DataSubtract(virCPUx86Data *data1,
|
|
|
c480ed |
virCPUx86DataItemPtr item1;
|
|
|
c480ed |
virCPUx86DataItemPtr item2;
|
|
|
c480ed |
|
|
|
c480ed |
- while ((item1 = x86DataCpuidNext(&iter))) {
|
|
|
c480ed |
+ while ((item1 = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
if ((item2 = x86DataCpuid(data2, item1)))
|
|
|
c480ed |
x86cpuidClearBits(&item1->cpuid, &item2->cpuid);
|
|
|
c480ed |
}
|
|
|
c480ed |
@@ -444,7 +444,7 @@ x86DataIntersect(virCPUx86Data *data1,
|
|
|
c480ed |
virCPUx86DataItemPtr item1;
|
|
|
c480ed |
virCPUx86DataItemPtr item2;
|
|
|
c480ed |
|
|
|
c480ed |
- while ((item1 = x86DataCpuidNext(&iter))) {
|
|
|
c480ed |
+ while ((item1 = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
item2 = x86DataCpuid(data2, item1);
|
|
|
c480ed |
if (item2)
|
|
|
c480ed |
x86cpuidAndBits(&item1->cpuid, &item2->cpuid);
|
|
|
c480ed |
@@ -459,7 +459,7 @@ x86DataIsEmpty(virCPUx86Data *data)
|
|
|
c480ed |
{
|
|
|
c480ed |
virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data);
|
|
|
c480ed |
|
|
|
c480ed |
- return !x86DataCpuidNext(&iter);
|
|
|
c480ed |
+ return !virCPUx86DataNext(&iter);
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
@@ -472,7 +472,7 @@ x86DataIsSubset(const virCPUx86Data *data,
|
|
|
c480ed |
const virCPUx86DataItem *item;
|
|
|
c480ed |
const virCPUx86DataItem *itemSubset;
|
|
|
c480ed |
|
|
|
c480ed |
- while ((itemSubset = x86DataCpuidNext(&iter))) {
|
|
|
c480ed |
+ while ((itemSubset = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
if (!(item = x86DataCpuid(data, itemSubset)) ||
|
|
|
c480ed |
!x86cpuidMatchMasked(&item->cpuid, &itemSubset->cpuid))
|
|
|
c480ed |
return false;
|
|
|
c480ed |
@@ -1151,7 +1151,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|
|
c480ed |
virCPUx86DataItemPtr item1;
|
|
|
c480ed |
virCPUx86DataItemPtr item2;
|
|
|
c480ed |
|
|
|
c480ed |
- while ((item1 = x86DataCpuidNext(&iter1))) {
|
|
|
c480ed |
+ while ((item1 = virCPUx86DataNext(&iter1))) {
|
|
|
c480ed |
virCPUx86CompareResult match = SUPERSET;
|
|
|
c480ed |
|
|
|
c480ed |
if ((item2 = x86DataCpuid(&model2->data, item1))) {
|
|
|
c480ed |
@@ -1167,7 +1167,7 @@ x86ModelCompare(virCPUx86ModelPtr model1,
|
|
|
c480ed |
return UNRELATED;
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
- while ((item2 = x86DataCpuidNext(&iter2))) {
|
|
|
c480ed |
+ while ((item2 = virCPUx86DataNext(&iter2))) {
|
|
|
c480ed |
virCPUx86CompareResult match = SUBSET;
|
|
|
c480ed |
|
|
|
c480ed |
if ((item1 = x86DataCpuid(&model1->data, item2))) {
|
|
|
c480ed |
@@ -1461,7 +1461,7 @@ virCPUx86DataFormat(const virCPUData *data)
|
|
|
c480ed |
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
|
|
c480ed |
|
|
|
c480ed |
virBufferAddLit(&buf, "<cpudata arch='x86'>\n");
|
|
|
c480ed |
- while ((item = x86DataCpuidNext(&iter))) {
|
|
|
c480ed |
+ while ((item = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
virCPUx86CPUIDPtr cpuid = &item->cpuid;
|
|
|
c480ed |
virBufferAsprintf(&buf,
|
|
|
c480ed |
"
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|