forked from rpms/libvirt
65 lines
2.1 KiB
Diff
65 lines
2.1 KiB
Diff
|
From d32fbe55ad3ee1bbbfe2adc9ab47034c7a5cb884 Mon Sep 17 00:00:00 2001
|
||
|
Message-Id: <d32fbe55ad3ee1bbbfe2adc9ab47034c7a5cb884@dist-git>
|
||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||
|
Date: Fri, 21 Jun 2019 09:25:33 +0200
|
||
|
Subject: [PATCH] cpu_x86: Make x86cpuidSetBits more general
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
The function is renamed as virCPUx86DataItemSetBits and it works on
|
||
|
virCPUx86DataItem now.
|
||
|
|
||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||
|
(cherry picked from commit 9c6f00fc3351800dc8b63472e71b398c180161d8)
|
||
|
|
||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
|
||
|
|
||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||
|
Message-Id: <f2e1e24cb2be24ee66911f75384436c5c4513d3e.1561068591.git.jdenemar@redhat.com>
|
||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||
|
---
|
||
|
src/cpu/cpu_x86.c | 14 +++++++-------
|
||
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||
|
|
||
|
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||
|
index 5a09033d2a..e2951ed1b0 100644
|
||
|
--- a/src/cpu/cpu_x86.c
|
||
|
+++ b/src/cpu/cpu_x86.c
|
||
|
@@ -214,16 +214,16 @@ x86cpuidMatchMasked(const virCPUx86CPUID *cpuid,
|
||
|
|
||
|
|
||
|
static void
|
||
|
-x86cpuidSetBits(virCPUx86CPUID *cpuid,
|
||
|
- const virCPUx86CPUID *mask)
|
||
|
+virCPUx86DataItemSetBits(virCPUx86DataItemPtr item,
|
||
|
+ const virCPUx86DataItem *mask)
|
||
|
{
|
||
|
if (!mask)
|
||
|
return;
|
||
|
|
||
|
- cpuid->eax |= mask->eax;
|
||
|
- cpuid->ebx |= mask->ebx;
|
||
|
- cpuid->ecx |= mask->ecx;
|
||
|
- cpuid->edx |= mask->edx;
|
||
|
+ item->cpuid.eax |= mask->cpuid.eax;
|
||
|
+ item->cpuid.ebx |= mask->cpuid.ebx;
|
||
|
+ item->cpuid.ecx |= mask->cpuid.ecx;
|
||
|
+ item->cpuid.edx |= mask->cpuid.edx;
|
||
|
}
|
||
|
|
||
|
|
||
|
@@ -391,7 +391,7 @@ virCPUx86DataAddItem(virCPUx86Data *data,
|
||
|
virCPUx86DataItemPtr existing;
|
||
|
|
||
|
if ((existing = virCPUx86DataGet(data, item))) {
|
||
|
- x86cpuidSetBits(&existing->cpuid, &item->cpuid);
|
||
|
+ virCPUx86DataItemSetBits(existing, item);
|
||
|
} else {
|
||
|
if (VIR_APPEND_ELEMENT_COPY(data->items, data->len,
|
||
|
*((virCPUx86DataItemPtr)item)) < 0)
|
||
|
--
|
||
|
2.22.0
|
||
|
|