The function exports the functionality of x86DataToSignatureFull and
x86MakeSignature to the test suite.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
---
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