The function exports the functionality of x86DataToSignatureFull and
x86MakeSignature to the test suite.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
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 89303400af..56e6d95bb1 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -3059,6 +3059,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 038a744981..2c6143083a 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1206,6 +1206,7 @@ virCPUValidateFeatures;
# cpu/cpu_x86.h
virCPUx86DataAddCPUID;
virCPUx86DataAddFeature;
+virCPUx86DataGetSignature;
virCPUx86DataSetSignature;
virCPUx86DataSetVendor;
--
2.21.0