[PATCH 17/36] cpu_x86: Make x86cpuidSetBits more general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function is renamed as virCPUx86DataItemSetBits and it works on
virCPUx86DataItem now.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 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 74d157d780..f713f02929 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -216,16 +216,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;
 }
 
 
@@ -393,7 +393,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.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux