|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/5] x86: move definition of struct cpuid_leaf to cpuid.h
This is a step towards consolidating relevant data structures and
defines to one location.
It then requires defining cpuid_leaf in user space harness headers to
make them continue to compile.
No functional change.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
tools/tests/x86_emulator/x86-emulate.h | 6 ++++++
xen/arch/x86/x86_emulate/x86_emulate.h | 6 +-----
xen/include/asm-x86/cpuid.h | 4 ++++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/tools/tests/x86_emulator/x86-emulate.h
b/tools/tests/x86_emulator/x86-emulate.h
index c5e85de3a2..8ae31a2f9a 100644
--- a/tools/tests/x86_emulator/x86-emulate.h
+++ b/tools/tests/x86_emulator/x86-emulate.h
@@ -79,6 +79,12 @@ WRAP(puts);
#undef WRAP
+#ifndef cpuid_leaf
+struct cpuid_leaf {
+ uint32_t a, b, c, d;
+};
+#endif
+
#include "x86_emulate/x86_emulate.h"
static inline uint64_t xgetbv(uint32_t xcr)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.h
b/xen/arch/x86/x86_emulate/x86_emulate.h
index c22e7745ad..cc2cf54141 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.h
+++ b/xen/arch/x86/x86_emulate/x86_emulate.h
@@ -172,11 +172,7 @@ enum x86_emulate_fpu_type {
X86EMUL_FPU_none
};
-struct cpuid_leaf
-{
- uint32_t a, b, c, d;
-};
-
+struct cpuid_leaf;
struct x86_emulate_state;
/*
diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h
index 4cce2686cb..ca664d50e2 100644
--- a/xen/include/asm-x86/cpuid.h
+++ b/xen/include/asm-x86/cpuid.h
@@ -66,6 +66,10 @@ extern struct cpuidmasks cpuidmask_defaults;
#define CPUID_GUEST_NR_EXTD_AMD (0x1cu + 1)
#define CPUID_GUEST_NR_EXTD MAX(CPUID_GUEST_NR_EXTD_INTEL, \
CPUID_GUEST_NR_EXTD_AMD)
+struct cpuid_leaf
+{
+ uint32_t a, b, c, d;
+};
struct cpuid_policy
{
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |