From d5300cc7fb7dbe97af5b910f31d5c35a500c3013 Mon Sep 17 00:00:00 2001
Message-Id: <d5300cc7fb7dbe97af5b910f31d5c35a500c3013.1383922566.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Fri, 8 Nov 2013 12:33:28 +0100
Subject: [PATCH] cpu: Export few x86-specific APIs
https://bugzilla.redhat.com/show_bug.cgi?id=1008989
This makes virCPUx86DataAddCPUID, virCPUx86DataFree, and
virCPUx86MakeData available for direct usage outside of cpu driver in
tests and the new qemu monitor that will request the actual CPU
definition from a running qemu instance.
(cherry picked from commit 6f6e1f902a5a08ae6925273d7b9f129b6094eb0c)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/cpu/cpu_x86.c | 6 +++---
src/cpu/cpu_x86.h | 9 +++++++++
src/libvirt_private.syms | 6 ++++++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 9653160..e5de667 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -203,7 +203,7 @@ x86DataCpuid(const virCPUx86Data *data,
}
-static void
+void
virCPUx86DataFree(virCPUx86Data *data)
{
if (data == NULL)
@@ -215,7 +215,7 @@ virCPUx86DataFree(virCPUx86Data *data)
}
-static virCPUDataPtr
+virCPUDataPtr
virCPUx86MakeData(virArch arch, virCPUx86Data **data)
{
virCPUDataPtr cpuData;
@@ -295,7 +295,7 @@ x86DataExpand(virCPUx86Data *data,
}
-static int
+int
virCPUx86DataAddCPUID(virCPUx86Data *data,
const virCPUx86CPUID *cpuid)
{
diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h
index 77965b7..af0fa23 100644
--- a/src/cpu/cpu_x86.h
+++ b/src/cpu/cpu_x86.h
@@ -25,7 +25,16 @@
# define __VIR_CPU_X86_H__
# include "cpu.h"
+# include "cpu_x86_data.h"
extern struct cpuArchDriver cpuDriverX86;
+int virCPUx86DataAddCPUID(virCPUx86Data *data,
+ const virCPUx86CPUID *cpuid);
+
+void virCPUx86DataFree(virCPUx86Data *data);
+
+virCPUDataPtr virCPUx86MakeData(virArch arch,
+ virCPUx86Data **data);
+
#endif /* __VIR_CPU_X86_H__ */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 722178b..0421c5b 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -727,6 +727,12 @@ cpuNodeData;
cpuUpdate;
+# cpu/cpu_x86.h
+virCPUx86DataAddCPUID;
+virCPUx86DataFree;
+virCPUx86MakeData;
+
+
# datatypes.h
virConnectClass;
virDomainClass;
--
1.8.4.2