[PATCH v2 19/30] cpu_x86: Add virCPUx86DataGetSignature for tests

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

 



The function exports the functionality of x86DataToSignatureFull and
x86MakeSignature to the test suite.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>
---

Notes:
    Version 2:
    - no change

 src/cpu/cpu_x86.c        | 12 ++++++++++++
 src/cpu/cpu_x86.h        |  5 +++++
 src/libvirt_private.syms |  1 +
 3 files changed, 18 insertions(+)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 5a1071de4d..8a07d15001 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -3071,6 +3071,18 @@ virCPUx86DataSetSignature(virCPUDataPtr cpuData,
 }
 
 
+uint32_t
+virCPUx86DataGetSignature(virCPUDataPtr cpuData,
+                          unsigned int *family,
+                          unsigned int *model,
+                          unsigned int *stepping)
+{
+    x86DataToSignatureFull(&cpuData->data.x86, family, model, stepping);
+
+    return x86MakeSignature(*family, *model, *stepping);
+}
+
+
 int
 virCPUx86DataSetVendor(virCPUDataPtr cpuData,
                        const char *vendor)
diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h
index dedf8dedfe..78714c0d67 100644
--- a/src/cpu/cpu_x86.h
+++ b/src/cpu/cpu_x86.h
@@ -34,6 +34,11 @@ int virCPUx86DataSetSignature(virCPUDataPtr cpuData,
                               unsigned int model,
                               unsigned int stepping);
 
+uint32_t virCPUx86DataGetSignature(virCPUDataPtr cpuData,
+                                   unsigned int *family,
+                                   unsigned int *model,
+                                   unsigned int *stepping);
+
 int virCPUx86DataSetVendor(virCPUDataPtr cpuData,
                            const char *vendor);
 
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 04b9b67478..69643732e0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1210,6 +1210,7 @@ virCPUValidateFeatures;
 # cpu/cpu_x86.h
 virCPUx86DataAddCPUID;
 virCPUx86DataAddFeature;
+virCPUx86DataGetSignature;
 virCPUx86DataSetSignature;
 virCPUx86DataSetVendor;
 
-- 
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