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