From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: sergey.dyasli@citrix.com,
Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <jbeulich@suse.com>,
roger.pau@citrix.com
Subject: [PATCH 1/5] x86: move definition of struct cpuid_leaf to cpuid.h
Date: Thu, 24 May 2018 17:05:18 +0100 [thread overview]
Message-ID: <20180524160522.757-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20180524160522.757-1-wei.liu2@citrix.com>
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@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-05-24 16:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 16:05 [PATCH 0/5] Share CPUID stuff between hypervisor and toolstack Wei Liu
2018-05-24 16:05 ` Wei Liu [this message]
2018-05-25 9:31 ` [PATCH 1/5] x86: move definition of struct cpuid_leaf to cpuid.h Roger Pau Monné
2018-05-25 9:35 ` Wei Liu
2018-05-25 11:50 ` Jan Beulich
2018-05-25 12:03 ` Wei Liu
2018-05-25 13:05 ` Jan Beulich
2018-05-25 13:11 ` Andrew Cooper
2018-05-24 16:05 ` [PATCH 2/5] x86: split out cpuid objects and helpers Wei Liu
2018-05-25 9:41 ` Roger Pau Monné
2018-05-25 9:49 ` Wei Liu
2018-05-25 10:01 ` Andrew Cooper
2018-05-25 10:23 ` Roger Pau Monné
2018-05-29 12:32 ` Jan Beulich
2018-05-24 16:05 ` [PATCH 3/5] tools: link arch-shared directory Wei Liu
2018-05-24 16:05 ` [PATCH 4/5] libxc: introduce xc_cpuid_x86.h Wei Liu
2018-05-24 16:05 ` [PATCH 5/5] XXX DO NOT APPLY: compilation test Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180524160522.757-2-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=sergey.dyasli@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).