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