xen: public interface (and foreign check) changes for arm
cover xen: public interface (and foreign check) changes for arm
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.
PATCH 1/4 tools: s/arm/arm32/ in foreign header checks.
Also define __arm__ARM32 as required.
--- tools/include/xen-foreign/Makefile | 4 ++-- tools/include/xen-foreign/mkheader.py | 6 +++++- tools/include/xen-foreign/reference.size | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-)
tools/include/xen-foreign/Makefile +2 -2
@@ -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
tools/include/xen-foreign/mkheader.py +5 -1
@@ -17,11 +17,15 @@ header = {}; footer = {}; #arm -inttypes["arm"] = { +inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", }; +header["x86_32"] = """ +#define __arm__ARM32 1 +"""; + # x86_32 inttypes["x86_32"] = {
tools/include/xen-foreign/reference.size +1 -1
@@ -1,5 +1,5 @@ -structs | arm x86_32 x86_64 +structs | arm32 x86_32 x86_64 start_info | - 1112 1168 trap_info | - 8 16
Signature · 1 line
1.7.2.5
Re: [PATCH 1/4] tools: s/arm/arm32/ in foreign header checks.
tools/include/xen-foreign/mkheader.py header = {}; · line 25
Quoted 13 lines · Ian Campbell
tools/include/xen-foreign/mkheader.py +2
-1@@ -17,11 +17,15 @@ header = {}; footer = {}; #arm -inttypes["arm"] = { +inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", }; +header["x86_32"] = """
["arm32"] ?
Tim.
Quoted 3 lines
tools/include/xen-foreign/mkheader.py +3
-0+#define __arm__ARM32 1 +"""; +
Re: [PATCH 1/4] tools: s/arm/arm32/ in foreign header checks.
Quoted 6 lines · Tim Deegan
Quoted 5 lines · Ian Campbell
tools/include/xen-foreign/mkheader.py +0
-0@@ -17,11 +17,15 @@ header = {}; footer = {};
Quoted 10 lines
tools/include/xen-foreign/mkheader.py header = {}; · line 25
Quoted 8 lines
tools/include/xen-foreign/mkheader.py +2
-1#arm -inttypes["arm"] = { +inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", }; +header["x86_32"] = """["arm32"] ?
Oh bum, yes. That's what I get for rebasing at the last minute ;-)
Quoted 6 lines
Tim.
Quoted 3 lines
tools/include/xen-foreign/mkheader.py +3
-0+#define __arm__ARM32 1 +"""; +
Re: [PATCH 1/4] tools: s/arm/arm32/ in foreign header checks.
In reply to Ian CampbellQuoted 6 lines · Ian Campbell
tools/include/xen-foreign/mkheader.py +0
-0@@ -17,11 +17,15 @@ header = {}; footer = {};
tools/include/xen-foreign/mkheader.py header = {}; · line 26
Quoted 10 lines
tools/include/xen-foreign/mkheader.py +3
-1#arm -inttypes["arm"] = { +inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", }; +header["x86_32"] = """ +#define __arm__ARM32 1
As well as s/x86_32/arm32/ this should actually be "__arm___ARM32" too.
PATCH 2/4 xen: event channel arrays are xen_ulong_t and not unsigned long
In reply to Ian CampbellOn 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.
--- tools/include/xen-foreign/mkheader.py | 4 +++- xen/include/public/xen.h | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-)
tools/include/xen-foreign/mkheader.py +3 -1
@@ -21,17 +21,18 @@ inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", + "xen_ulong_t" : "uint64_t", }; header["x86_32"] = """ #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__)
xen/include/public/xen.h +4 -4
@@ -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
Signature · 1 line
1.7.2.5
PATCH 3/4 xen: make start_info x86 specific.
In reply to Ian CampbellMost of this struct is PV MMU specific and it is not used on ARM at all.
--- 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(-)
tools/libxc/xenctrl.h +2 -3
@@ -395,15 +395,14 @@ typedef unionshared_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,
xen/include/public/arch-x86/xen.h +73 -0
79 lines not on this page · raw message
xen/include/public/xen.h +0 -73
79 lines not on this page · raw message
xen/include/xlat.lst +1 -1
@@ -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-@[email protected] +! 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
Signature · 1 line
1.7.2.5
Re: [PATCH 3/4] xen: make start_info x86 specific.
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Most of this struct is PV MMU specific and it is not used on ARM at all.
I'm not convinced this is the right move.
Quoted 15 lines
xen/include/public/xen.h +0
-9@@ -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. */
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 727
Quoted 10 lines
xen/include/public/xen.h +0
-10-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;
What is PV MMU related up to here?
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 736
Quoted 9 lines
xen/include/public/xen.h +0
-9-/* 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 last three fields above don't appear to be either.
Quoted 8 lines
xen/include/public/xen.h +0
-8-/* 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
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 754
Quoted 10 lines
xen/include/public/xen.h +0
-10-#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 */
Nor are these flags.
Quoted 16 lines
xen/include/public/xen.h +0
-16- -/* -* 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
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 780
Quoted 10 lines
xen/include/public/xen.h +0
-10-{ -/* 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; -};
And this one isn't either, albeit I'm not sure about its actual use.
Jan
Re: [PATCH 3/4] xen: make start_info x86 specific.
Quoted 24 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Most of this struct is PV MMU specific and it is not used on ARM at all.
I'm not convinced this is the right move.
Quoted 19 lines
xen/include/public/xen.h +0
-13@@ -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. */
Quoted 8 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 727
Quoted 6 lines
xen/include/public/xen.h +0
-6- } domU; -struct { -uint32_t info_off;/* Offset of console_info struct. */ -uint32_t info_size;/* Size of console_info struct from start.*/ - } dom0; - } console;What is PV MMU related up to here?
Hrm, perhaps categorising this as PV MMU was a mistake on my part.
These are all unused on ARM in terms of the hypervisor ABI since it uses HVM like mechanisms for those which are appropriate and doesn't use a bunch of the others at all.
Quoted 5 lines
Quoted 5 lines
xen/include/public/xen.h +0
-5-struct xen_multiboot_mod_list -{ -/* Address of first byte of the module */ -uint32_t mod_start; -/* Address of last byte of the module (inclusive) */
Quoted 8 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 780
Quoted 6 lines
xen/include/public/xen.h +0
-6-uint32_t mod_end; -/* Address of zero-terminated command line */ -uint32_t cmdline; -/* Unused, must be zero */ -uint32_t pad; -};And this one isn't either, albeit I'm not sure about its actual use.
It's unused AFAICT.
Ian.
Re: [PATCH 3/4] xen: make start_info x86 specific.
Quoted 43 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 11 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Most of this struct is PV MMU specific and it is not used on ARM at all.
I'm not convinced this is the right move.
Quoted 6 lines
xen/include/public/xen.h +0
-0@@ -706,79 +706,6 @@ typedef struct shared_info shared_info_t;* extended by an extra 4MB to ensure this. */ Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3-#define MAX_GUEST_CMDLINE 1024 -struct start_info { -/* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
Quoted 2 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 713
Quoted 2 lines
xen/include/public/xen.h +0
-2-char magic[32 ];/* "xen-<version>-<platform>". */ -unsigned long nr_pages;/* Total pages allocated to this domain. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 714
Quoted 1 line
xen/include/public/xen.h +0
-1-unsigned long shared_info;/* MACHINE address of shared info struct. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 715
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t flags;/* SIF_xxx flags. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 716
Quoted 1 line
xen/include/public/xen.h +0
-1-xen_pfn_t store_mfn;/* MACHINE page number of shared page. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 717
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t store_evtchn;/* Event channel for store communication. */
Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3- union { - struct { - xen_pfn_t mfn; /* MACHINE page number of console page.*/
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 721
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t evtchn;/* Event channel for console page. */
Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3- } domU; -struct { -uint32_t info_off;/* Offset of console_info struct. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 725
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t info_size;/* Size of console_info struct from start.*/
Quoted 3 lines
Quoted 2 lines
xen/include/public/xen.h +0
-2- } dom0; - } console;
Quoted 7 lines
Quoted 1 line
What is PV MMU related up to here?
Hrm, perhaps categorising this as PV MMU was a mistake on my part.
These are all unused on ARM in terms of the hypervisor ABI since it uses HVM like mechanisms for those which are appropriate and doesn't use a bunch of the others at all.
But nothing here makes this structure x86 specific, so I'd really like to keep it that way. If ARM doesn't use the structure at all, then I don't see the point in removing it from the common headers. If part of it (the flags come to mind) are being used by ARM, let's find a reasonable abstraction so that ARM doesn't need to carry useless baggage (e.g. a XEN_ARCH_HVM_ONLY #define).
Jan
Re: [PATCH 3/4] xen: make start_info x86 specific.
Quoted 51 lines · Jan Beulich
Quoted 43 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Quoted 11 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
Most of this struct is PV MMU specific and it is not used on ARM at all.
I'm not convinced this is the right move.
Quoted 6 lines
xen/include/public/xen.h +0
-0@@ -706,79 +706,6 @@ typedef struct shared_info shared_info_t;* extended by an extra 4MB to ensure this. */ Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3-#define MAX_GUEST_CMDLINE 1024 -struct start_info { -/* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
Quoted 2 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 713
Quoted 2 lines
xen/include/public/xen.h +0
-2-char magic[32 ];/* "xen-<version>-<platform>". */ -unsigned long nr_pages;/* Total pages allocated to this domain. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 714
Quoted 1 line
xen/include/public/xen.h +0
-1-unsigned long shared_info;/* MACHINE address of shared info struct. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 715
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t flags;/* SIF_xxx flags. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 716
Quoted 1 line
xen/include/public/xen.h +0
-1-xen_pfn_t store_mfn;/* MACHINE page number of shared page. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 717
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t store_evtchn;/* Event channel for store communication. */
Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3- union { - struct { - xen_pfn_t mfn; /* MACHINE page number of console page.*/
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 721
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t evtchn;/* Event channel for console page. */
Quoted 3 lines
xen/include/public/xen.h typedef struct shared_info shared_info_t;
Quoted 3 lines
xen/include/public/xen.h +0
-3- } domU; -struct { -uint32_t info_off;/* Offset of console_info struct. */
Quoted 1 line
xen/include/public/xen.h typedef struct shared_info shared_info_t; · line 725
Quoted 1 line
xen/include/public/xen.h +0
-1-uint32_t info_size;/* Size of console_info struct from start.*/
Quoted 3 lines
Quoted 2 lines
xen/include/public/xen.h +0
-2- } dom0; - } console;Quoted 7 lines
Quoted 1 line
What is PV MMU related up to here?
Hrm, perhaps categorising this as PV MMU was a mistake on my part.
These are all unused on ARM in terms of the hypervisor ABI since it uses HVM like mechanisms for those which are appropriate and doesn't use a bunch of the others at all.
Quoted 6 lines
But nothing here makes this structure x86 specific, so I'd really like to keep it that way. If ARM doesn't use the structure at all, then I don't see the point in removing it from the common headers. If part of it (the flags come to mind) are being used by ARM, let's find a reasonable abstraction so that ARM doesn't need to carry useless baggage (e.g. a
XEN_ARCH_HVM_ONLY#define).
Even the flags are unused on ARM (as part of the hypervisor ABI), which uses XENFEAT_dom0 and not SIF_*.
I'd be as happy to ifdef this in the public headers instead of moving them if that is what people prefer. I don't think XEN_ARCH_HVM_ONLY is quite the right name though. XEN_HAVE_PV_GUEST_ENTRY perhaps? This makes some sense by virtue of start_info not being useful on ARM partly because we use the normal native entry points which don't allow for it.
Do we think that it is likely that a new architecture port which doesn't use hardware virtualisation extensions instead of PV is very likely?
Ian.
Re: [PATCH 3/4] xen: make start_info x86 specific.
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Ian Campbell
I'd be as happy to ifdef this in the public headers instead of moving them if that is what people prefer. I don't think
XEN_ARCH_HVM_ONLYis quite the right name though.XEN_HAVE_PV_GUEST_ENTRYperhaps? This makes some sense by virtue ofstart_infonot being useful on ARM partly because we use the normal native entry points which don't allow for it.
I don't care much about the name - what you suggest reads fine to me.
Quoted 2 lines
Do we think that it is likely that a new architecture port which doesn't use hardware virtualisation extensions instead of PV is very likely?
I'd like to keep interfaces independent of actual implementations. And in the case here, PV is what Xen started with, so if nothing else I'd like to keep the interface this generic way for historical reasons (not that I consider it likely to be revived, but ia64 surely also used it).
Jan
PATCH 4/4 xen: arm: include public/xen.h in foreign interface checking
In reply to Ian Campbellmkheader.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.
--- 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(-)
tools/include/xen-foreign/Makefile +1 -1
@@ -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
tools/include/xen-foreign/mkheader.py +2 -2
@@ -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", };
tools/include/xen-foreign/reference.size +5 -5
@@ -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
xen/include/public/arch-arm.h +5 -3
@@ -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)*/
Signature · 1 line
1.7.2.5