82 lines
2.7 KiB
Diff
82 lines
2.7 KiB
Diff
From 459e059de518794d909c77b6c24fd6962558d362 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <459e059de518794d909c77b6c24fd6962558d362@dist-git>
|
|
From: Jiri Denemark <jdenemar@redhat.com>
|
|
Date: Fri, 21 Jun 2019 09:25:06 +0200
|
|
Subject: [PATCH] cpu_x86: Add virCPUx86DataGetSignature for tests
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The function exports the functionality of x86DataToSignatureFull and
|
|
x86MakeSignature to the test suite.
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
(cherry picked from commit 661307b4b2e8597d889efddfac0ff5d324c9fa42)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1686895
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Message-Id: <7964c9cc9ea47fdce4c2b07fda8efa2cb9f9f384.1561068591.git.jdenemar@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@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 ba14a6097d..24569a90f3 100644
|
|
--- a/src/cpu/cpu_x86.c
|
|
+++ b/src/cpu/cpu_x86.c
|
|
@@ -3066,6 +3066,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 5d14d83e1b..9d3c2b2cdd 100644
|
|
--- a/src/cpu/cpu_x86.h
|
|
+++ b/src/cpu/cpu_x86.h
|
|
@@ -37,6 +37,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 7c48908a54..a275fa9aa1 100644
|
|
--- a/src/libvirt_private.syms
|
|
+++ b/src/libvirt_private.syms
|
|
@@ -1205,6 +1205,7 @@ virCPUValidateFeatures;
|
|
# cpu/cpu_x86.h
|
|
virCPUx86DataAddCPUID;
|
|
virCPUx86DataAddFeature;
|
|
+virCPUx86DataGetSignature;
|
|
virCPUx86DataSetSignature;
|
|
virCPUx86DataSetVendor;
|
|
|
|
--
|
|
2.22.0
|
|
|