From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: sergey.dyasli@citrix.com, Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <jbeulich@suse.com>,
roger.pau@citrix.com
Subject: [PATCH 4/5] libxc: introduce xc_cpuid_x86.h
Date: Thu, 24 May 2018 17:05:21 +0100 [thread overview]
Message-ID: <20180524160522.757-5-wei.liu2@citrix.com> (raw)
In-Reply-To: <20180524160522.757-1-wei.liu2@citrix.com>
Collect cpuid related things into a header file. Provide the necessary
macros to make it work.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
tools/libxc/xc_cpuid_x86.c | 6 +-----
tools/libxc/xc_cpuid_x86.h | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 5 deletions(-)
create mode 100644 tools/libxc/xc_cpuid_x86.h
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 9fa2f7c360..89ded718bc 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -27,11 +27,7 @@
#include <xen/hvm/params.h>
#include <xen-tools/libs.h>
-enum {
-#define XEN_CPUFEATURE(name, value) X86_FEATURE_##name = value,
-#include <xen/arch-x86/cpufeatureset.h>
-};
-#include "_xc_cpuid_autogen.h"
+#include "xc_cpuid_x86.h"
#define bitmaskof(idx) (1u << ((idx) & 31))
#define featureword_of(idx) ((idx) >> 5)
diff --git a/tools/libxc/xc_cpuid_x86.h b/tools/libxc/xc_cpuid_x86.h
new file mode 100644
index 0000000000..1ac12f0e30
--- /dev/null
+++ b/tools/libxc/xc_cpuid_x86.h
@@ -0,0 +1,16 @@
+#ifndef XC_X86_CPUID_H
+#define XC_X86_CPUID_H
+
+enum {
+#define XEN_CPUFEATURE(name, value) X86_FEATURE_##name = value,
+#include <xen/arch-x86/cpufeatureset.h>
+};
+#include "_xc_cpuid_autogen.h"
+
+#define MAX(x,y) ((x) > (y) ? (x) : (y))
+
+#define FSCAPINTS FEATURESET_NR_ENTRIES
+
+#include <arch-shared/cpuid.h>
+
+#endif
--
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 ` [PATCH 1/5] x86: move definition of struct cpuid_leaf to cpuid.h Wei Liu
2018-05-25 9:31 ` 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 ` Wei Liu [this message]
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-5-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.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).