[PATCH v2 18/33] cpu_x86: Introduce virCPUx86DataSetSignature

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---

Notes:
    Version 2:
    - no change

 src/cpu/cpu_x86.c            | 11 +++++++++++
 src/cpu/cpu_x86.h            |  4 ++++
 src/libvirt_private.syms     |  1 +
 src/qemu/qemu_capabilities.c |  1 +
 4 files changed, 17 insertions(+)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 029a7d475..e3f860bc6 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2720,6 +2720,17 @@ virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
 }
 
 
+int
+virCPUx86DataSetSignature(virCPUDataPtr cpuData,
+                          unsigned int family,
+                          unsigned int model)
+{
+    uint32_t signature = x86MakeSignature(family, model);
+
+    return x86DataAddSignature(&cpuData->data.x86, signature);
+}
+
+
 struct cpuArchDriver cpuDriverX86 = {
     .name = "x86",
     .arch = archs,
diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h
index 79e78a007..ffbd064b4 100644
--- a/src/cpu/cpu_x86.h
+++ b/src/cpu/cpu_x86.h
@@ -32,4 +32,8 @@ extern struct cpuArchDriver cpuDriverX86;
 int virCPUx86DataAddCPUID(virCPUDataPtr cpuData,
                           const virCPUx86CPUID *cpuid);
 
+int virCPUx86DataSetSignature(virCPUDataPtr cpuData,
+                              unsigned int family,
+                              unsigned int model);
+
 #endif /* __VIR_CPU_X86_H__ */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 56db100b5..6b2dddc95 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1006,6 +1006,7 @@ virCPUUpdate;
 
 # cpu/cpu_x86.h
 virCPUx86DataAddCPUID;
+virCPUx86DataSetSignature;
 
 
 # datatypes.h
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 6ca6ea702..f115f1e23 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -33,6 +33,7 @@
 #include "virprocess.h"
 #include "nodeinfo.h"
 #include "cpu/cpu.h"
+#include "cpu/cpu_x86.h"
 #include "domain_conf.h"
 #include "vircommand.h"
 #include "virbitmap.h"
-- 
2.11.1

--
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