Ian Campbell
2013-Feb-14 15:59 UTC
[PATCH V2 00/04] xen: public interface (and foreign check) changes for arm
Changes in v2 are to the first patch which I botched a fair bit in the first cut. The main change here is to switch evtchns to xen_ulong_t on arm, this enables us to have the same interface on arm32 and arm64. I will post a Linux side series shortly. This is an ABI change for ARM but not x86. The remainder of the series fixes the tools/include/xen-foreign checks to cover more stuff on ARM. As part of this I have moved start_info out of the generic public headers and into x86-specific public headers -- ARM does not use this struct in its ABI and the majority of start_info is PV MMU stuff. Removing it from ARM means I don''t have to worry about the unsigned longs in there.
Ian Campbell
2013-Feb-14 15:59 UTC
[PATCH 1/4] tools: s/arm/arm32/ in foreign header checks.
Also define __arm__ARM32 as required.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
---
v2: s/x86_32/arm32/ in the right place
s/__arm__ARM32/__arm___ARM32/
Update gitignore
---
.gitignore | 2 +-
tools/include/xen-foreign/Makefile | 4 ++--
tools/include/xen-foreign/mkheader.py | 6 +++++-
tools/include/xen-foreign/reference.size | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 125a582..73c5b77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -363,7 +363,7 @@ tools/include/xen-foreign/checker.c
tools/include/xen-foreign/structs.pyc
tools/include/xen-foreign/x86_32.h
tools/include/xen-foreign/x86_64.h
-tools/include/xen-foreign/arm.h
+tools/include/xen-foreign/arm32.h
.git
tools/misc/xen-hptool
diff --git a/tools/include/xen-foreign/Makefile
b/tools/include/xen-foreign/Makefile
index cfaf790..5bc2d46 100644
--- a/tools/include/xen-foreign/Makefile
+++ b/tools/include/xen-foreign/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
ROOT = $(XEN_ROOT)/xen/include/public
-architectures := arm x86_32 x86_64
+architectures := arm32 x86_32 x86_64
headers := $(patsubst %, %.h, $(architectures))
.PHONY: all clean check-headers
@@ -22,7 +22,7 @@ check-headers: checker
diff -u reference.size tmp.size
rm tmp.size
-arm.h: mkheader.py structs.py $(ROOT)/arch-arm.h
+arm32.h: mkheader.py structs.py $(ROOT)/arch-arm.h
$(PYTHON) $< $* $@ $(filter %.h,$^)
x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h
$(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
diff --git a/tools/include/xen-foreign/mkheader.py
b/tools/include/xen-foreign/mkheader.py
index d189b07..eee28f3 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -17,11 +17,15 @@ header = {};
footer = {};
#arm
-inttypes["arm"] = {
+inttypes["arm32"] = {
"unsigned long" : "uint32_t",
"long" : "uint32_t",
"xen_pfn_t" : "uint64_t",
};
+header["arm32"] = """
+#define __arm___ARM32 1
+""";
+
# x86_32
inttypes["x86_32"] = {
diff --git a/tools/include/xen-foreign/reference.size
b/tools/include/xen-foreign/reference.size
index a2cbfd6..9f1bfac 100644
--- a/tools/include/xen-foreign/reference.size
+++ b/tools/include/xen-foreign/reference.size
@@ -1,5 +1,5 @@
-structs | arm x86_32 x86_64
+structs | arm32 x86_32 x86_64
start_info | - 1112 1168
trap_info | - 8 16
--
1.7.2.5
Ian Campbell
2013-Feb-14 15:59 UTC
[PATCH 2/4] xen: event channel arrays are xen_ulong_t and not unsigned long
On ARM we want these to be the same size on 32- and 64-bit.
This is an ABI change on ARM. X86 does not change.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir (Xen.org) <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
tools/include/xen-foreign/mkheader.py | 4 +++-
xen/include/public/xen.h | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/include/xen-foreign/mkheader.py
b/tools/include/xen-foreign/mkheader.py
index eee28f3..e3e61f3 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -21,17 +21,18 @@ inttypes["arm32"] = {
"unsigned long" : "uint32_t",
"long" : "uint32_t",
"xen_pfn_t" : "uint64_t",
+ "xen_ulong_t" : "uint64_t",
};
header["arm32"] = """
#define __arm___ARM32 1
""";
-
# x86_32
inttypes["x86_32"] = {
"unsigned long" : "uint32_t",
"long" : "uint32_t",
"xen_pfn_t" : "uint32_t",
+ "xen_ulong_t" : "uint32_t",
};
header["x86_32"] = """
#define __i386___X86_32 1
@@ -46,6 +47,7 @@ inttypes["x86_64"] = {
"unsigned long" : "__align8__ uint64_t",
"long" : "__align8__ uint64_t",
"xen_pfn_t" : "__align8__ uint64_t",
+ "xen_ulong_t" : "__align8__ uint64_t",
};
header["x86_64"] = """
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index 5593066..99c8212 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -556,7 +556,7 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_t);
* Event channel endpoints per domain:
* 1024 if a long is 32 bits; 4096 if a long is 64 bits.
*/
-#define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64)
+#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
struct vcpu_time_info {
/*
@@ -613,7 +613,7 @@ struct vcpu_info {
*/
uint8_t evtchn_upcall_pending;
uint8_t evtchn_upcall_mask;
- unsigned long evtchn_pending_sel;
+ xen_ulong_t evtchn_pending_sel;
struct arch_vcpu_info arch;
struct vcpu_time_info time;
}; /* 64 bytes (x86) */
@@ -663,8 +663,8 @@ struct shared_info {
* per-vcpu selector word to be set. Each bit in the selector covers a
* ''C long'' in the PENDING bitfield array.
*/
- unsigned long evtchn_pending[sizeof(unsigned long) * 8];
- unsigned long evtchn_mask[sizeof(unsigned long) * 8];
+ xen_ulong_t evtchn_pending[sizeof(xen_ulong_t) * 8];
+ xen_ulong_t evtchn_mask[sizeof(xen_ulong_t) * 8];
/*
* Wallclock time: updated only by control software. Guests should base
--
1.7.2.5
Most of this struct is PV MMU specific and it is not used on ARM at all.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir (Xen.org) <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
tools/libxc/xenctrl.h | 5 +--
xen/include/public/arch-x86/xen.h | 73 +++++++++++++++++++++++++++++++++++++
xen/include/public/xen.h | 73 -------------------------------------
xen/include/xlat.lst | 2 +-
4 files changed, 76 insertions(+), 77 deletions(-)
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 32122fd..9e4a741 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -395,15 +395,14 @@ typedef union
shared_info_t s;
} shared_info_any_t;
+#if defined(__i386__) || defined(__x86_64__)
typedef union
{
-#if defined(__i386__) || defined(__x86_64__)
start_info_x86_64_t x64;
start_info_x86_32_t x32;
-#endif
start_info_t s;
} start_info_any_t;
-
+#endif
int xc_domain_create(xc_interface *xch,
uint32_t ssidref,
diff --git a/xen/include/public/arch-x86/xen.h
b/xen/include/public/arch-x86/xen.h
index 13c21dc..00f0306 100644
--- a/xen/include/public/arch-x86/xen.h
+++ b/xen/include/public/arch-x86/xen.h
@@ -147,6 +147,79 @@ DEFINE_XEN_GUEST_HANDLE(trap_info_t);
typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
+#define MAX_GUEST_CMDLINE 1024
+struct start_info {
+ /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
+ char magic[32]; /*
"xen-<version>-<platform>". */
+ unsigned long nr_pages; /* Total pages allocated to this domain. */
+ unsigned long shared_info; /* MACHINE address of shared info struct. */
+ uint32_t flags; /* SIF_xxx flags. */
+ xen_pfn_t store_mfn; /* MACHINE page number of shared page. */
+ uint32_t store_evtchn; /* Event channel for store communication. */
+ union {
+ struct {
+ xen_pfn_t mfn; /* MACHINE page number of console page. */
+ uint32_t evtchn; /* Event channel for console page. */
+ } domU;
+ struct {
+ uint32_t info_off; /* Offset of console_info struct. */
+ uint32_t info_size; /* Size of console_info struct from start.*/
+ } dom0;
+ } console;
+ /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */
+ unsigned long pt_base; /* VIRTUAL address of page directory. */
+ unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames. */
+ unsigned long mfn_list; /* VIRTUAL address of page-frame list. */
+ unsigned long mod_start; /* VIRTUAL address of pre-loaded module */
+ /* (PFN of pre-loaded module if */
+ /* SIF_MOD_START_PFN set in flags). */
+ unsigned long mod_len; /* Size (bytes) of pre-loaded module. */
+ int8_t cmd_line[MAX_GUEST_CMDLINE];
+ /* The pfn range here covers both page table and p->m table frames. */
+ unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
+ unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
+};
+typedef struct start_info start_info_t;
+
+/* New console union for dom0 introduced in 0x00030203. */
+#if __XEN_INTERFACE_VERSION__ < 0x00030203
+#define console_mfn console.domU.mfn
+#define console_evtchn console.domU.evtchn
+#endif
+
+/* These flags are passed in the ''flags'' field of
start_info_t. */
+#define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */
+#define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain?
*/
+#define SIF_MULTIBOOT_MOD (1<<2) /* Is mod_start a multiboot module? */
+#define SIF_MOD_START_PFN (1<<3) /* Is mod_start a PFN? */
+#define SIF_PM_MASK (0xFF<<8) /* reserve 1 byte for xen-pm options
*/
+
+/*
+ * A multiboot module is a package containing modules very similar to a
+ * multiboot module array. The only differences are:
+ * - the array of module descriptors is by convention simply at the beginning
+ * of the multiboot module,
+ * - addresses in the module descriptors are based on the beginning of the
+ * multiboot module,
+ * - the number of modules is determined by a termination descriptor that has
+ * mod_start == 0.
+ *
+ * This permits to both build it statically and reference it in a configuration
+ * file, and let the PV guest easily rebase the addresses to virtual addresses
+ * and at the same time count the number of modules.
+ */
+struct xen_multiboot_mod_list
+{
+ /* Address of first byte of the module */
+ uint32_t mod_start;
+ /* Address of last byte of the module (inclusive) */
+ uint32_t mod_end;
+ /* Address of zero-terminated command line */
+ uint32_t cmdline;
+ /* Unused, must be zero */
+ uint32_t pad;
+};
+
/*
* The following is all CPU context. Note that the fpu_ctxt block is filled
* in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index 99c8212..846f446 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -706,79 +706,6 @@ typedef struct shared_info shared_info_t;
* extended by an extra 4MB to ensure this.
*/
-#define MAX_GUEST_CMDLINE 1024
-struct start_info {
- /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
- char magic[32]; /*
"xen-<version>-<platform>". */
- unsigned long nr_pages; /* Total pages allocated to this domain. */
- unsigned long shared_info; /* MACHINE address of shared info struct. */
- uint32_t flags; /* SIF_xxx flags. */
- xen_pfn_t store_mfn; /* MACHINE page number of shared page. */
- uint32_t store_evtchn; /* Event channel for store communication. */
- union {
- struct {
- xen_pfn_t mfn; /* MACHINE page number of console page. */
- uint32_t evtchn; /* Event channel for console page. */
- } domU;
- struct {
- uint32_t info_off; /* Offset of console_info struct. */
- uint32_t info_size; /* Size of console_info struct from start.*/
- } dom0;
- } console;
- /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */
- unsigned long pt_base; /* VIRTUAL address of page directory. */
- unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames. */
- unsigned long mfn_list; /* VIRTUAL address of page-frame list. */
- unsigned long mod_start; /* VIRTUAL address of pre-loaded module */
- /* (PFN of pre-loaded module if */
- /* SIF_MOD_START_PFN set in flags). */
- unsigned long mod_len; /* Size (bytes) of pre-loaded module. */
- int8_t cmd_line[MAX_GUEST_CMDLINE];
- /* The pfn range here covers both page table and p->m table frames. */
- unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
- unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
-};
-typedef struct start_info start_info_t;
-
-/* New console union for dom0 introduced in 0x00030203. */
-#if __XEN_INTERFACE_VERSION__ < 0x00030203
-#define console_mfn console.domU.mfn
-#define console_evtchn console.domU.evtchn
-#endif
-
-/* These flags are passed in the ''flags'' field of
start_info_t. */
-#define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */
-#define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain?
*/
-#define SIF_MULTIBOOT_MOD (1<<2) /* Is mod_start a multiboot module? */
-#define SIF_MOD_START_PFN (1<<3) /* Is mod_start a PFN? */
-#define SIF_PM_MASK (0xFF<<8) /* reserve 1 byte for xen-pm options
*/
-
-/*
- * A multiboot module is a package containing modules very similar to a
- * multiboot module array. The only differences are:
- * - the array of module descriptors is by convention simply at the beginning
- * of the multiboot module,
- * - addresses in the module descriptors are based on the beginning of the
- * multiboot module,
- * - the number of modules is determined by a termination descriptor that has
- * mod_start == 0.
- *
- * This permits to both build it statically and reference it in a configuration
- * file, and let the PV guest easily rebase the addresses to virtual addresses
- * and at the same time count the number of modules.
- */
-struct xen_multiboot_mod_list
-{
- /* Address of first byte of the module */
- uint32_t mod_start;
- /* Address of last byte of the module (inclusive) */
- uint32_t mod_end;
- /* Address of zero-terminated command line */
- uint32_t cmdline;
- /* Unused, must be zero */
- uint32_t pad;
-};
-
typedef struct dom0_vga_console_info {
uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */
#define XEN_VGATYPE_TEXT_MODE_3 0x03
diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index 3d4f1e3..5b0ff35 100644
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -5,10 +5,10 @@
? xenctl_cpumap xen.h
? mmu_update xen.h
! mmuext_op xen.h
-! start_info xen.h
? vcpu_info xen.h
? vcpu_time_info xen.h
! cpu_user_regs arch-x86/xen-@arch@.h
+! start_info arch-x86/xen.h
! trap_info arch-x86/xen.h
? cpu_offline_action arch-x86/xen-mca.h
? mc arch-x86/xen-mca.h
--
1.7.2.5
Ian Campbell
2013-Feb-14 15:59 UTC
[PATCH 4/4] xen: arm: include public/xen.h in foreign interface checking
mkheader.py doesn''t cope with
structr foo { };
so add a newline.
Define unsigned long and long to a non-existent type on ARM so as to catch
their use.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir (Xen.org) <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
tools/include/xen-foreign/Makefile | 2 +-
tools/include/xen-foreign/mkheader.py | 4 ++--
tools/include/xen-foreign/reference.size | 10 +++++-----
xen/include/public/arch-arm.h | 8 +++++---
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/tools/include/xen-foreign/Makefile
b/tools/include/xen-foreign/Makefile
index 5bc2d46..53cc6b4 100644
--- a/tools/include/xen-foreign/Makefile
+++ b/tools/include/xen-foreign/Makefile
@@ -22,7 +22,7 @@ check-headers: checker
diff -u reference.size tmp.size
rm tmp.size
-arm32.h: mkheader.py structs.py $(ROOT)/arch-arm.h
+arm32.h: mkheader.py structs.py $(ROOT)/arch-arm.h $(ROOT)/xen.h
$(PYTHON) $< $* $@ $(filter %.h,$^)
x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h
$(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
diff --git a/tools/include/xen-foreign/mkheader.py
b/tools/include/xen-foreign/mkheader.py
index e3e61f3..b7c34b1 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -18,8 +18,8 @@ footer = {};
#arm
inttypes["arm32"] = {
- "unsigned long" : "uint32_t",
- "long" : "uint32_t",
+ "unsigned long" : "__danger_unsigned_long_on_arm32",
+ "long" : "__danger_long_on_arm32",
"xen_pfn_t" : "uint64_t",
"xen_ulong_t" : "uint64_t",
};
diff --git a/tools/include/xen-foreign/reference.size
b/tools/include/xen-foreign/reference.size
index 9f1bfac..0e5529d 100644
--- a/tools/include/xen-foreign/reference.size
+++ b/tools/include/xen-foreign/reference.size
@@ -5,9 +5,9 @@ start_info | - 1112 1168
trap_info | - 8 16
cpu_user_regs | 160 68 200
vcpu_guest_context | 180 2800 5168
-arch_vcpu_info | - 24 16
-vcpu_time_info | - 32 32
-vcpu_info | - 64 64
-arch_shared_info | - 268 280
-shared_info | - 2584 3368
+arch_vcpu_info | 0 24 16
+vcpu_time_info | 32 32 32
+vcpu_info | 48 64 64
+arch_shared_info | 0 268 280
+shared_info | 1088 2584 3368
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index d8788f2..8dd9062 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -159,14 +159,16 @@ struct vcpu_guest_context {
typedef struct vcpu_guest_context vcpu_guest_context_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
-struct arch_vcpu_info { };
+struct arch_vcpu_info {
+};
typedef struct arch_vcpu_info arch_vcpu_info_t;
-struct arch_shared_info { };
+struct arch_shared_info {
+};
typedef struct arch_shared_info arch_shared_info_t;
typedef uint64_t xen_callback_t;
-#endif /* ifndef __ASSEMBLY __ */
+#endif
/* PSR bits (CPSR, SPSR)*/
--
1.7.2.5
Stefano Stabellini
2013-Feb-15 11:58 UTC
Re: [PATCH 2/4] xen: event channel arrays are xen_ulong_t and not unsigned long
On Thu, 14 Feb 2013, Ian Campbell wrote:> On ARM we want these to be the same size on 32- and 64-bit. > > This is an ABI change on ARM. X86 does not change. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Jan Beulich <JBeulich@suse.com> > Cc: Keir (Xen.org) <keir@xen.org> > Cc: Tim Deegan <tim@xen.org> > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>> tools/include/xen-foreign/mkheader.py | 4 +++- > xen/include/public/xen.h | 8 ++++---- > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py > index eee28f3..e3e61f3 100644 > --- a/tools/include/xen-foreign/mkheader.py > +++ b/tools/include/xen-foreign/mkheader.py > @@ -21,17 +21,18 @@ inttypes["arm32"] = { > "unsigned long" : "uint32_t", > "long" : "uint32_t", > "xen_pfn_t" : "uint64_t", > + "xen_ulong_t" : "uint64_t", > }; > header["arm32"] = """ > #define __arm___ARM32 1 > """; > > - > # x86_32 > inttypes["x86_32"] = { > "unsigned long" : "uint32_t", > "long" : "uint32_t", > "xen_pfn_t" : "uint32_t", > + "xen_ulong_t" : "uint32_t", > }; > header["x86_32"] = """ > #define __i386___X86_32 1 > @@ -46,6 +47,7 @@ inttypes["x86_64"] = { > "unsigned long" : "__align8__ uint64_t", > "long" : "__align8__ uint64_t", > "xen_pfn_t" : "__align8__ uint64_t", > + "xen_ulong_t" : "__align8__ uint64_t", > }; > header["x86_64"] = """ > #if defined(__GNUC__) && !defined(__STRICT_ANSI__) > diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h > index 5593066..99c8212 100644 > --- a/xen/include/public/xen.h > +++ b/xen/include/public/xen.h > @@ -556,7 +556,7 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_t); > * Event channel endpoints per domain: > * 1024 if a long is 32 bits; 4096 if a long is 64 bits. > */ > -#define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64) > +#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64) > > struct vcpu_time_info { > /* > @@ -613,7 +613,7 @@ struct vcpu_info { > */ > uint8_t evtchn_upcall_pending; > uint8_t evtchn_upcall_mask; > - unsigned long evtchn_pending_sel; > + xen_ulong_t evtchn_pending_sel; > struct arch_vcpu_info arch; > struct vcpu_time_info time; > }; /* 64 bytes (x86) */ > @@ -663,8 +663,8 @@ struct shared_info { > * per-vcpu selector word to be set. Each bit in the selector covers a > * ''C long'' in the PENDING bitfield array. > */ > - unsigned long evtchn_pending[sizeof(unsigned long) * 8]; > - unsigned long evtchn_mask[sizeof(unsigned long) * 8]; > + xen_ulong_t evtchn_pending[sizeof(xen_ulong_t) * 8]; > + xen_ulong_t evtchn_mask[sizeof(xen_ulong_t) * 8]; > > /* > * Wallclock time: updated only by control software. Guests should base > -- > 1.7.2.5 >
Stefano Stabellini
2013-Feb-21 16:56 UTC
Re: [PATCH 1/4] tools: s/arm/arm32/ in foreign header checks.
On Thu, 14 Feb 2013, Ian Campbell wrote:> Also define __arm__ARM32 as required. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Jan Beulich <JBeulich@suse.com> > --- > v2: s/x86_32/arm32/ in the right place > s/__arm__ARM32/__arm___ARM32/ > Update gitignoreIt looks OK to me Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>> .gitignore | 2 +- > tools/include/xen-foreign/Makefile | 4 ++-- > tools/include/xen-foreign/mkheader.py | 6 +++++- > tools/include/xen-foreign/reference.size | 2 +- > 4 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 125a582..73c5b77 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -363,7 +363,7 @@ tools/include/xen-foreign/checker.c > tools/include/xen-foreign/structs.pyc > tools/include/xen-foreign/x86_32.h > tools/include/xen-foreign/x86_64.h > -tools/include/xen-foreign/arm.h > +tools/include/xen-foreign/arm32.h > > .git > tools/misc/xen-hptool > diff --git a/tools/include/xen-foreign/Makefile b/tools/include/xen-foreign/Makefile > index cfaf790..5bc2d46 100644 > --- a/tools/include/xen-foreign/Makefile > +++ b/tools/include/xen-foreign/Makefile > @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk > > ROOT = $(XEN_ROOT)/xen/include/public > > -architectures := arm x86_32 x86_64 > +architectures := arm32 x86_32 x86_64 > headers := $(patsubst %, %.h, $(architectures)) > > .PHONY: all clean check-headers > @@ -22,7 +22,7 @@ check-headers: checker > diff -u reference.size tmp.size > rm tmp.size > > -arm.h: mkheader.py structs.py $(ROOT)/arch-arm.h > +arm32.h: mkheader.py structs.py $(ROOT)/arch-arm.h > $(PYTHON) $< $* $@ $(filter %.h,$^) > > x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h > diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py > index d189b07..eee28f3 100644 > --- a/tools/include/xen-foreign/mkheader.py > +++ b/tools/include/xen-foreign/mkheader.py > @@ -17,11 +17,15 @@ header = {}; > footer = {}; > > #arm > -inttypes["arm"] = { > +inttypes["arm32"] = { > "unsigned long" : "uint32_t", > "long" : "uint32_t", > "xen_pfn_t" : "uint64_t", > }; > +header["arm32"] = """ > +#define __arm___ARM32 1 > +"""; > + > > # x86_32 > inttypes["x86_32"] = { > diff --git a/tools/include/xen-foreign/reference.size b/tools/include/xen-foreign/reference.size > index a2cbfd6..9f1bfac 100644 > --- a/tools/include/xen-foreign/reference.size > +++ b/tools/include/xen-foreign/reference.size > @@ -1,5 +1,5 @@ > > -structs | arm x86_32 x86_64 > +structs | arm32 x86_32 x86_64 > > start_info | - 1112 1168 > trap_info | - 8 16 > -- > 1.7.2.5 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >