|
|
c480ed |
From be1b7ab3f5a634de17359376d559d5c312f5623f Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <be1b7ab3f5a634de17359376d559d5c312f5623f@dist-git>
|
|
|
c480ed |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Date: Fri, 21 Jun 2019 09:25:35 +0200
|
|
|
c480ed |
Subject: [PATCH] cpu_x86: Make x86cpuidAndBits more general
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
The function now works on virCPUx86DataItem and it's renamed as
|
|
|
c480ed |
virCPUx86DataItemAndBits.
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
(cherry picked from commit da1efddfa6606520fb5f16622bc522b231484b54)
|
|
|
c480ed |
|
|
|
c480ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c480ed |
Message-Id: <c265f1fcb4ab52f884dd9481a426978efa60b8c8.1561068591.git.jdenemar@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/cpu/cpu_x86.c | 14 +++++++-------
|
|
|
c480ed |
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
|
c480ed |
index 5fbf0294bb..54da9a985c 100644
|
|
|
c480ed |
--- a/src/cpu/cpu_x86.c
|
|
|
c480ed |
+++ b/src/cpu/cpu_x86.c
|
|
|
c480ed |
@@ -242,16 +242,16 @@ virCPUx86DataItemClearBits(virCPUx86DataItemPtr item,
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
static void
|
|
|
c480ed |
-x86cpuidAndBits(virCPUx86CPUID *cpuid,
|
|
|
c480ed |
- const virCPUx86CPUID *mask)
|
|
|
c480ed |
+virCPUx86DataItemAndBits(virCPUx86DataItemPtr item,
|
|
|
c480ed |
+ const virCPUx86DataItem *mask)
|
|
|
c480ed |
{
|
|
|
c480ed |
if (!mask)
|
|
|
c480ed |
return;
|
|
|
c480ed |
|
|
|
c480ed |
- cpuid->eax &= mask->eax;
|
|
|
c480ed |
- cpuid->ebx &= mask->ebx;
|
|
|
c480ed |
- cpuid->ecx &= mask->ecx;
|
|
|
c480ed |
- cpuid->edx &= mask->edx;
|
|
|
c480ed |
+ item->cpuid.eax &= mask->cpuid.eax;
|
|
|
c480ed |
+ item->cpuid.ebx &= mask->cpuid.ebx;
|
|
|
c480ed |
+ item->cpuid.ecx &= mask->cpuid.ecx;
|
|
|
c480ed |
+ item->cpuid.edx &= mask->cpuid.edx;
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
@@ -447,7 +447,7 @@ x86DataIntersect(virCPUx86Data *data1,
|
|
|
c480ed |
while ((item1 = virCPUx86DataNext(&iter))) {
|
|
|
c480ed |
item2 = virCPUx86DataGet(data2, item1);
|
|
|
c480ed |
if (item2)
|
|
|
c480ed |
- x86cpuidAndBits(&item1->cpuid, &item2->cpuid);
|
|
|
c480ed |
+ virCPUx86DataItemAndBits(item1, item2);
|
|
|
c480ed |
else
|
|
|
c480ed |
virCPUx86DataItemClearBits(item1, item1);
|
|
|
c480ed |
}
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|