Chris Wright
2006-May-19 07:00 UTC
[Xen-devel] [patch 1/5] arch-x86_32/64.h: separate typedef from structure definition
This makes sharing the file with Linux easier, as the typedefs won''t be accepted. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- xen/include/public/arch-x86_32.h | 32 +++++++++++++++++++------------- xen/include/public/arch-x86_64.h | 27 ++++++++++++++++----------- 2 files changed, 35 insertions(+), 24 deletions(-) --- xen-unstable.orig/xen/include/public/arch-x86_32.h +++ xen-unstable/xen/include/public/arch-x86_32.h @@ -95,15 +95,16 @@ DEFINE_XEN_GUEST_HANDLE(void); #define TI_GET_IF(_ti) ((_ti)->flags & 4) #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) -typedef struct trap_info { +struct trap_info { uint8_t vector; /* exception vector */ uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */ uint16_t cs; /* code selector */ unsigned long address; /* code offset */ -} trap_info_t; +}; +typedef struct trap_info trap_info_t; DEFINE_XEN_GUEST_HANDLE(trap_info_t); -typedef struct cpu_user_regs { +struct cpu_user_regs { uint32_t ebx; uint32_t ecx; uint32_t edx; @@ -124,7 +125,8 @@ typedef struct cpu_user_regs { uint16_t ds, _pad3; uint16_t fs, _pad4; uint16_t gs, _pad5; -} cpu_user_regs_t; +}; +typedef struct cpu_user_regs cpu_user_regs_t; DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t); typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */ @@ -133,14 +135,14 @@ typedef uint64_t tsc_timestamp_t; /* RDT * 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. */ -typedef struct vcpu_guest_context { +struct vcpu_guest_context { /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */ struct { char x[512]; } fpu_ctxt; /* User-level FPU registers */ #define VGCF_I387_VALID (1<<0) #define VGCF_HVM_GUEST (1<<1) #define VGCF_IN_KERNEL (1<<2) unsigned long flags; /* VGCF_* flags */ - cpu_user_regs_t user_regs; /* User-level CPU registers */ + struct cpu_user_regs user_regs; /* User-level CPU registers */ struct trap_info trap_ctxt[256]; /* Virtual IDT */ unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */ unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ @@ -152,25 +154,29 @@ typedef struct vcpu_guest_context { unsigned long failsafe_callback_cs; /* CS:EIP of failsafe callback */ unsigned long failsafe_callback_eip; unsigned long vm_assist; /* VMASST_TYPE_* bitmap */ -} vcpu_guest_context_t; +}; +typedef struct vcpu_guest_context vcpu_guest_context_t; DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); -typedef struct arch_shared_info { +struct arch_shared_info { unsigned long max_pfn; /* max pfn that appears in table */ /* Frame containing list of mfns containing list of mfns containing p2m. */ unsigned long pfn_to_mfn_frame_list_list; unsigned long nmi_reason; -} arch_shared_info_t; +}; +typedef struct arch_shared_info arch_shared_info_t; -typedef struct { +struct arch_vcpu_info { unsigned long cr2; unsigned long pad[5]; /* sizeof(vcpu_info_t) == 64 */ -} arch_vcpu_info_t; +}; +typedef struct arch_vcpu_info arch_vcpu_info_t; -typedef struct { +struct xen_callback { unsigned long cs; unsigned long eip; -} xen_callback_t; +}; +typedef struct xen_callback xen_callback_t; #endif /* !__ASSEMBLY__ */ --- xen-unstable.orig/xen/include/public/arch-x86_64.h +++ xen-unstable/xen/include/public/arch-x86_64.h @@ -150,12 +150,13 @@ struct iret_context { #define TI_GET_IF(_ti) ((_ti)->flags & 4) #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) -typedef struct trap_info { +struct trap_info { uint8_t vector; /* exception vector */ uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */ uint16_t cs; /* code selector */ unsigned long address; /* code offset */ -} trap_info_t; +}; +typedef struct trap_info trap_info_t; DEFINE_XEN_GUEST_HANDLE(trap_info_t); #ifdef __GNUC__ @@ -166,7 +167,7 @@ DEFINE_XEN_GUEST_HANDLE(trap_info_t); #define __DECL_REG(name) uint64_t r ## name #endif -typedef struct cpu_user_regs { +struct cpu_user_regs { uint64_t r15; uint64_t r14; uint64_t r13; @@ -195,7 +196,8 @@ typedef struct cpu_user_regs { uint16_t ds, _pad4[3]; uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base. */ uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */ -} cpu_user_regs_t; +}; +typedef struct cpu_user_regs cpu_user_regs_t; DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t); #undef __DECL_REG @@ -206,14 +208,14 @@ typedef uint64_t tsc_timestamp_t; /* RDT * 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. */ -typedef struct vcpu_guest_context { +struct vcpu_guest_context { /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */ struct { char x[512]; } fpu_ctxt; /* User-level FPU registers */ #define VGCF_I387_VALID (1<<0) #define VGCF_HVM_GUEST (1<<1) #define VGCF_IN_KERNEL (1<<2) unsigned long flags; /* VGCF_* flags */ - cpu_user_regs_t user_regs; /* User-level CPU registers */ + struct cpu_user_regs user_regs; /* User-level CPU registers */ struct trap_info trap_ctxt[256]; /* Virtual IDT */ unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */ unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ @@ -228,20 +230,23 @@ typedef struct vcpu_guest_context { uint64_t fs_base; uint64_t gs_base_kernel; uint64_t gs_base_user; -} vcpu_guest_context_t; +}; +typedef struct vcpu_guest_context vcpu_guest_context_t; DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); -typedef struct arch_shared_info { +struct arch_shared_info { unsigned long max_pfn; /* max pfn that appears in table */ /* Frame containing list of mfns containing list of mfns containing p2m. */ unsigned long pfn_to_mfn_frame_list_list; unsigned long nmi_reason; -} arch_shared_info_t; +}; +typedef struct arch_shared_info arch_shared_info_t; -typedef struct { +struct arch_vcpu_info { unsigned long cr2; unsigned long pad; /* sizeof(vcpu_info_t) == 64 */ -} arch_vcpu_info_t; +}; +typedef struct arch_vcpu_info arch_vcpu_info_t; typedef unsigned long xen_callback_t; -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 07:00 UTC
[Xen-devel] [patch 2/5] public/xen.h: separate typedef from stucture definition
This makes sharing the file with Linux easier, as the typedefs won''t be accepted. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- xen/include/public/xen.h | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) --- xen-unstable.orig/xen/include/public/xen.h +++ xen-unstable/xen/include/public/xen.h @@ -193,7 +193,7 @@ #define MMUEXT_NEW_USER_BASEPTR 15 #ifndef __ASSEMBLY__ -typedef struct mmuext_op { +struct mmuext_op { unsigned int cmd; union { /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR */ @@ -207,7 +207,8 @@ typedef struct mmuext_op { /* TLB_FLUSH_MULTI, INVLPG_MULTI */ void *vcpumask; } arg2; -} mmuext_op_t; +}; +typedef struct mmuext_op mmuext_op_t; DEFINE_XEN_GUEST_HANDLE(mmuext_op_t); #endif @@ -271,20 +272,22 @@ typedef uint16_t domid_t; * Send an array of these to HYPERVISOR_mmu_update(). * NB. The fields are natural pointer/address size for this architecture. */ -typedef struct mmu_update { +struct mmu_update { uint64_t ptr; /* Machine address of PTE. */ uint64_t val; /* New contents of PTE. */ -} mmu_update_t; +}; +typedef struct mmu_update mmu_update_t; DEFINE_XEN_GUEST_HANDLE(mmu_update_t); /* * Send an array of these to HYPERVISOR_multicall(). * NB. The fields are natural register size for this architecture. */ -typedef struct multicall_entry { +struct multicall_entry { unsigned long op, result; unsigned long args[6]; -} multicall_entry_t; +}; +typedef struct multicall_entry multicall_entry_t; DEFINE_XEN_GUEST_HANDLE(multicall_entry_t); /* @@ -293,7 +296,7 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_ */ #define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64) -typedef struct vcpu_time_info { +struct vcpu_time_info { /* * Updates to the following values are preceded and followed by an * increment of ''version''. The guest can therefore detect updates by @@ -317,9 +320,10 @@ typedef struct vcpu_time_info { uint32_t tsc_to_system_mul; int8_t tsc_shift; int8_t pad1[3]; -} vcpu_time_info_t; /* 32 bytes */ +}; /* 32 bytes */ +typedef struct vcpu_time_info vcpu_time_info_t; -typedef struct vcpu_info { +struct vcpu_info { /* * ''evtchn_upcall_pending'' is written non-zero by Xen to indicate * a pending notification for a particular VCPU. It is then cleared @@ -348,16 +352,17 @@ typedef struct vcpu_info { uint8_t evtchn_upcall_pending; uint8_t evtchn_upcall_mask; unsigned long evtchn_pending_sel; - arch_vcpu_info_t arch; - vcpu_time_info_t time; -} vcpu_info_t; /* 64 bytes (x86) */ + struct arch_vcpu_info arch; + struct vcpu_time_info time; +}; /* 64 bytes (x86) */ +typedef struct vcpu_info vcpu_info_t; /* * Xen/kernel shared data -- pointer provided in start_info. * NB. We expect that this struct is smaller than a page. */ -typedef struct shared_info { - vcpu_info_t vcpu_info[MAX_VIRT_CPUS]; +struct shared_info { + struct vcpu_info vcpu_info[MAX_VIRT_CPUS]; /* * A domain can create "event channels" on which it can send and receive @@ -401,9 +406,10 @@ typedef struct shared_info { uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */ uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */ - arch_shared_info_t arch; + struct arch_shared_info arch; -} shared_info_t; +}; +typedef struct shared_info shared_info_t; /* * Start-of-day memory layout for the initial domain (DOM0): @@ -431,7 +437,7 @@ typedef struct shared_info { */ #define MAX_GUEST_CMDLINE 1024 -typedef struct start_info { +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. */ @@ -448,7 +454,8 @@ typedef struct start_info { unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */ unsigned long mod_len; /* Size (bytes) of pre-loaded module. */ int8_t cmd_line[MAX_GUEST_CMDLINE]; -} start_info_t; +}; +typedef struct start_info start_info_t; /* These flags are passed in the ''flags'' field of start_info_t. */ #define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */ -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 07:00 UTC
[Xen-devel] [patch 3/5] netif: separate typedef from struct definition
This makes sharing the file with Linux easier, as the typedefs in things like netfront/netback code won''t be accepted. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- xen/include/public/io/netif.h | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) --- xen-unstable.orig/xen/include/public/io/netif.h +++ xen-unstable/xen/include/public/io/netif.h @@ -13,10 +13,10 @@ #include "../grant_table.h" /* - * Note that there is *never* any need to notify the backend when enqueuing - * receive requests (netif_rx_request_t). Notifications after enqueuing any - * other type of message should be conditional on the appropriate req_event - * or rsp_event field in the shared ring. + * Note that there is *never* any need to notify the backend when + * enqueuing receive requests (struct netif_rx_request). Notifications + * after enqueuing any other type of message should be conditional on + * the appropriate req_event or rsp_event field in the shared ring. */ /* Protocol checksum field is blank in the packet (hardware offload)? */ @@ -27,23 +27,26 @@ #define _NETTXF_data_validated (1) #define NETTXF_data_validated (1U<<_NETTXF_data_validated) -typedef struct netif_tx_request { +struct netif_tx_request { grant_ref_t gref; /* Reference to buffer page */ uint16_t offset; /* Offset within buffer page */ uint16_t flags; /* NETTXF_* */ uint16_t id; /* Echoed in response message. */ uint16_t size; /* Packet size in bytes. */ -} netif_tx_request_t; +}; +typedef struct netif_tx_request netif_tx_request_t; -typedef struct netif_tx_response { +struct netif_tx_response { uint16_t id; int16_t status; /* NETIF_RSP_* */ -} netif_tx_response_t; +}; +typedef struct netif_tx_response netif_tx_response_t; -typedef struct { +struct netif_rx_request { uint16_t id; /* Echoed in response message. */ grant_ref_t gref; /* Reference to incoming granted frame */ -} netif_rx_request_t; +}; +typedef struct netif_rx_request netif_rx_request_t; /* Packet data has been validated against protocol checksum. */ #define _NETRXF_data_validated (0) @@ -53,19 +56,20 @@ typedef struct { #define _NETRXF_csum_blank (1) #define NETRXF_csum_blank (1U<<_NETRXF_csum_blank) -typedef struct { +struct netif_rx_response { uint16_t id; uint16_t offset; /* Offset in page of start of received packet */ uint16_t flags; /* NETRXF_* */ int16_t status; /* -ve: BLKIF_RSP_* ; +ve: Rx''ed pkt size. */ -} netif_rx_response_t; +}; +typedef struct netif_rx_response netif_rx_response_t; /* * Generate netif ring structures and types. */ -DEFINE_RING_TYPES(netif_tx, netif_tx_request_t, netif_tx_response_t); -DEFINE_RING_TYPES(netif_rx, netif_rx_request_t, netif_rx_response_t); +DEFINE_RING_TYPES(netif_tx, struct netif_tx_request, struct netif_tx_response); +DEFINE_RING_TYPES(netif_rx, struct netif_rx_request, struct netif_rx_response); #define NETIF_RSP_DROPPED -2 #define NETIF_RSP_ERROR -1 -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 07:00 UTC
[Xen-devel] [patch 4/5] netfront: remove use of typedefs for structures
remove use of typedefs for structures. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) --- xen-unstable.orig/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ xen-unstable/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -65,8 +65,8 @@ #define GRANT_INVALID_REF 0 -#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) -#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) +#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE) +#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE) static inline void init_skb_shinfo(struct sk_buff *skb) { @@ -81,8 +81,8 @@ struct netfront_info { struct net_device_stats stats; - netif_tx_front_ring_t tx; - netif_rx_front_ring_t rx; + struct netif_tx_front_ring tx; + struct netif_rx_front_ring rx; spinlock_t tx_lock; spinlock_t rx_lock; @@ -124,8 +124,8 @@ struct netfront_info { u8 mac[ETH_ALEN]; unsigned long rx_pfn_array[NET_RX_RING_SIZE]; - multicall_entry_t rx_mcl[NET_RX_RING_SIZE+1]; - mmu_update_t rx_mmu[NET_RX_RING_SIZE]; + struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1]; + struct mmu_update rx_mmu[NET_RX_RING_SIZE]; }; /* @@ -318,8 +318,8 @@ again: static int setup_device(struct xenbus_device *dev, struct netfront_info *info) { - netif_tx_sring_t *txs; - netif_rx_sring_t *rxs; + struct netif_tx_sring *txs; + struct netif_rx_sring *rxs; int err; struct net_device *netdev = info->netdev; @@ -329,13 +329,13 @@ static int setup_device(struct xenbus_de info->tx.sring = NULL; info->irq = 0; - txs = (netif_tx_sring_t *)__get_free_page(GFP_KERNEL); + txs = (struct netif_tx_sring *)__get_free_page(GFP_KERNEL); if (!txs) { err = -ENOMEM; xenbus_dev_fatal(dev, err, "allocating tx ring page"); goto fail; } - rxs = (netif_rx_sring_t *)__get_free_page(GFP_KERNEL); + rxs = (struct netif_rx_sring *)__get_free_page(GFP_KERNEL); if (!rxs) { err = -ENOMEM; xenbus_dev_fatal(dev, err, "allocating rx ring page"); @@ -639,7 +639,7 @@ static int network_start_xmit(struct sk_ { unsigned short id; struct netfront_info *np = netdev_priv(dev); - netif_tx_request_t *tx; + struct netif_tx_request *tx; RING_IDX i; grant_ref_t ref; unsigned long mfn; @@ -737,10 +737,10 @@ static int netif_poll(struct net_device { struct netfront_info *np = netdev_priv(dev); struct sk_buff *skb, *nskb; - netif_rx_response_t *rx; + struct netif_rx_response *rx; RING_IDX i, rp; - mmu_update_t *mmu = np->rx_mmu; - multicall_entry_t *mcl = np->rx_mcl; + struct mmu_update *mmu = np->rx_mmu; + struct multicall_entry *mcl = np->rx_mcl; int work_done, budget, more_to_do = 1; struct sk_buff_head rxq; unsigned long flags; @@ -963,7 +963,7 @@ static void network_connect(struct net_d { struct netfront_info *np; int i, requeue_idx; - netif_tx_request_t *tx; + struct netif_tx_request *tx; struct sk_buff *skb; np = netdev_priv(dev); -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 07:00 UTC
[Xen-devel] [patch 5/5] netfront: last bit of proc cleanup
Remove extra include from netfront after proc cleanup. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 1 - 1 file changed, 1 deletion(-) --- xen-unstable.orig/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ xen-unstable/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -43,7 +43,6 @@ #include <linux/skbuff.h> #include <linux/init.h> #include <linux/bitops.h> -#include <linux/proc_fs.h> #include <linux/ethtool.h> #include <linux/in.h> #include <net/sock.h> -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Here''s a short series to do typedef cleanup of netfront. This touches the xen public interface headers (but leaves the typedef) to facilitate easier sharing with Linux. There''s more of this type of cleanup in the patchqueue, but wanted to see how these were received before spending more time on it. It doesn''t deal with the guest handle yet. And as a tiny bonus, it''s got the last bit of proc removal from netfront ;-) thanks, -chris -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-May-19 14:50 UTC
Re: [Xen-devel] [patch 1/5] arch-x86_32/64.h: separate typedef from structure definition
On 19 May 2006, at 08:00, Chris Wright wrote:> This makes sharing the file with Linux easier, as the typedefs won''t > be accepted. > > Signed-off-by: Chris Wright <chrisw@sous-sol.org>I''ll take these, but I''d like a patch that makes this style change for every one of our public headers so that their overall style is self consistent. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 15:30 UTC
Re: [Xen-devel] [patch 1/5] arch-x86_32/64.h: separate typedef from structure definition
* Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote:> On 19 May 2006, at 08:00, Chris Wright wrote: > >This makes sharing the file with Linux easier, as the typedefs won''t > >be accepted. > > > >Signed-off-by: Chris Wright <chrisw@sous-sol.org> > > I''ll take these, but I''d like a patch that makes this style change for > every one of our public headers so that their overall style is self > consistent.Certainly, just wanted to make sure you''d take the change before I did them all. Will do the rest later today. thanks, -chris _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-May-19 20:49 UTC
[Xen-devel] [PATCH] separate typedef from structure definition in Xen public headers
This finishes separating the typedefs from structure definitions in the Xen public header (didn''t test ia64, but it''s patched). Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- xen/include/public/acm_ops.h | 5 xen/include/public/arch-ia64.h | 81 ++++++++------ xen/include/public/callback.h | 10 + xen/include/public/dom0_ops.h | 203 +++++++++++++++++++++--------------- xen/include/public/event_channel.h | 99 +++++++++-------- xen/include/public/grant_table.h | 30 +++-- xen/include/public/hvm/ioreq.h | 26 ++-- xen/include/public/hvm/vmx_assist.h | 5 xen/include/public/io/blkif.h | 12 +- xen/include/public/io/tpmif.h | 19 +-- xen/include/public/memory.h | 20 ++- xen/include/public/nmi.h | 5 xen/include/public/physdev.h | 45 ++++--- xen/include/public/sched.h | 15 +- xen/include/public/vcpu.h | 10 + xen/include/public/version.h | 15 +- xen/include/public/xenoprof.h | 15 +- 17 files changed, 360 insertions(+), 255 deletions(-) diff -r 9b11eeab4558 xen/include/public/acm_ops.h --- a/xen/include/public/acm_ops.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/acm_ops.h Fri May 19 16:39:17 2006 -0400 @@ -72,7 +72,7 @@ struct acm_getdecision { int acm_decision; /* out */ }; -typedef struct acm_op { +struct acm_op { uint32_t cmd; uint32_t interface_version; /* ACM_INTERFACE_VERSION */ union { @@ -82,7 +82,8 @@ typedef struct acm_op { struct acm_getssid getssid; struct acm_getdecision getdecision; } u; -} acm_op_t; +}; +typedef struct acm_op acm_op_t; DEFINE_XEN_GUEST_HANDLE(acm_op_t); #endif /* __XEN_PUBLIC_ACM_OPS_H__ */ diff -r 9b11eeab4558 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/arch-ia64.h Fri May 19 16:39:17 2006 -0400 @@ -38,15 +38,17 @@ DEFINE_XEN_GUEST_HANDLE(void); #ifndef __ASSEMBLY__ #define MAX_NR_SECTION 32 /* at most 32 memory holes */ -typedef struct { +struct mm_section { unsigned long start; /* start of memory hole */ unsigned long end; /* end of memory hole */ -} mm_section_t; - -typedef struct { +}; +typedef struct mm_section mm_section_t; + +struct pmt_entry { unsigned long mfn : 56; unsigned long type: 8; -} pmt_entry_t; +}; +typedef struct pmt_entry pmt_entry_t; #define GPFN_MEM (0UL << 56) /* Guest pfn is normal mem */ #define GPFN_FRAME_BUFFER (1UL << 56) /* VGA framebuffer */ @@ -93,10 +95,11 @@ typedef struct { * NB. This may become a 64-bit count with no shift. If this happens then the * structure size will still be 8 bytes, so no other alignments will change. */ -typedef struct { +struct tsc_timestamp { unsigned int tsc_bits; /* 0: 32 bits read from the CPU''s TSC. */ unsigned int tsc_bitshift; /* 4: ''tsc_bits'' uses N:N+31 of TSC. */ -} tsc_timestamp_t; /* 8 bytes */ +}; /* 8 bytes */ +typedef struct tsc_timestamp tsc_timestamp_t; struct pt_fpreg { union { @@ -105,7 +108,7 @@ struct pt_fpreg { } u; }; -typedef struct cpu_user_regs{ +struct cpu_user_regs { /* The following registers are saved by SAVE_MIN: */ unsigned long b6; /* scratch */ unsigned long b7; /* scratch */ @@ -179,9 +182,10 @@ typedef struct cpu_user_regs{ unsigned long eml_unat; /* used for emulating instruction */ unsigned long rfi_pfs; /* used for elulating rfi */ -}cpu_user_regs_t; - -typedef union { +}; +typedef struct cpu_user_regs cpu_user_regs_t; + +union vac { unsigned long value; struct { int a_int:1; @@ -193,9 +197,10 @@ typedef union { int a_bsw:1; long reserved:57; }; -} vac_t; - -typedef union { +}; +typedef union vac vac_t; + +union vdc { unsigned long value; struct { int d_vmsw:1; @@ -206,11 +211,12 @@ typedef union { int d_itm:1; long reserved:58; }; -} vdc_t; - -typedef struct { - vac_t vac; - vdc_t vdc; +}; +typedef union vdc vdc_t; + +struct mapped_regs { + union vac vac; + union vdc vdc; unsigned long virt_env_vaddr; unsigned long reserved1[29]; unsigned long vhpi; @@ -290,27 +296,31 @@ typedef struct { unsigned long reserved6[3456]; unsigned long vmm_avail[128]; unsigned long reserved7[4096]; -} mapped_regs_t; - -typedef struct { - mapped_regs_t *privregs; +}; +typedef struct mapped_regs mapped_regs_t; + +struct arch_vcpu_info { + struct mapped_regs *privregs; int evtchn_vector; -} arch_vcpu_info_t; +}; +typedef struct arch_vcpu_info arch_vcpu_info_t; typedef mapped_regs_t vpd_t; -typedef struct { +struct arch_shared_info { unsigned int flags; unsigned long start_info_pfn; -} arch_shared_info_t; - -typedef struct { +}; +typedef struct arch_shared_info arch_shared_info_t; + +struct arch_initrd_info { unsigned long start; unsigned long size; -} arch_initrd_info_t; +}; +typedef struct arch_initrd_info arch_initrd_info_t; #define IA64_COMMAND_LINE_SIZE 512 -typedef struct vcpu_guest_context { +struct vcpu_guest_context { #define VGCF_FPU_VALID (1<<0) #define VGCF_VMX_GUEST (1<<1) #define VGCF_IN_KERNEL (1<<2) @@ -320,12 +330,13 @@ typedef struct vcpu_guest_context { unsigned long sys_pgnr; /* System pages out of domain memory */ unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */ - cpu_user_regs_t regs; - arch_vcpu_info_t vcpu; - arch_shared_info_t shared; - arch_initrd_info_t initrd; + struct cpu_user_regs regs; + struct arch_vcpu_info vcpu; + struct arch_shared_info shared; + struct arch_initrd_info initrd; char cmdline[IA64_COMMAND_LINE_SIZE]; -} vcpu_guest_context_t; +}; +typedef struct vcpu_guest_context vcpu_guest_context_t; DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); // dom0 vp op diff -r 9b11eeab4558 xen/include/public/callback.h --- a/xen/include/public/callback.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/callback.h Fri May 19 16:39:17 2006 -0400 @@ -32,10 +32,11 @@ * Register a callback. */ #define CALLBACKOP_register 0 -typedef struct callback_register { +struct callback_register { int type; xen_callback_t address; -} callback_register_t; +}; +typedef struct callback_register callback_register_t; DEFINE_XEN_GUEST_HANDLE(callback_register_t); /* @@ -45,9 +46,10 @@ DEFINE_XEN_GUEST_HANDLE(callback_registe * you attempt to unregister such a callback. */ #define CALLBACKOP_unregister 1 -typedef struct callback_unregister { +struct callback_unregister { int type; -} callback_unregister_t; +}; +typedef struct callback_unregister callback_unregister_t; DEFINE_XEN_GUEST_HANDLE(callback_unregister_t); #endif /* __XEN_PUBLIC_CALLBACK_H__ */ diff -r 9b11eeab4558 xen/include/public/dom0_ops.h --- a/xen/include/public/dom0_ops.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/dom0_ops.h Fri May 19 16:39:17 2006 -0400 @@ -24,14 +24,15 @@ /************************************************************************/ #define DOM0_GETMEMLIST 2 -typedef struct dom0_getmemlist { +struct dom0_getmemlist { /* IN variables. */ domid_t domain; unsigned long max_pfns; XEN_GUEST_HANDLE(ulong) buffer; /* OUT variables. */ unsigned long num_pfns; -} dom0_getmemlist_t; +}; +typedef struct dom0_getmemlist dom0_getmemlist_t; DEFINE_XEN_GUEST_HANDLE(dom0_getmemlist_t); #define DOM0_SCHEDCTL 6 @@ -45,39 +46,43 @@ DEFINE_XEN_GUEST_HANDLE(dom0_adjustdom_t DEFINE_XEN_GUEST_HANDLE(dom0_adjustdom_t); #define DOM0_CREATEDOMAIN 8 -typedef struct dom0_createdomain { +struct dom0_createdomain { /* IN parameters */ uint32_t ssidref; xen_domain_handle_t handle; /* IN/OUT parameters. */ /* Identifier for new domain (auto-allocate if zero is specified). */ domid_t domain; -} dom0_createdomain_t; +}; +typedef struct dom0_createdomain dom0_createdomain_t; DEFINE_XEN_GUEST_HANDLE(dom0_createdomain_t); #define DOM0_DESTROYDOMAIN 9 -typedef struct dom0_destroydomain { - /* IN variables. */ - domid_t domain; -} dom0_destroydomain_t; +struct dom0_destroydomain { + /* IN variables. */ + domid_t domain; +}; +typedef struct dom0_destroydomain dom0_destroydomain_t; DEFINE_XEN_GUEST_HANDLE(dom0_destroydomain_t); #define DOM0_PAUSEDOMAIN 10 -typedef struct dom0_pausedomain { +struct dom0_pausedomain { /* IN parameters. */ domid_t domain; -} dom0_pausedomain_t; +}; +typedef struct dom0_pausedomain dom0_pausedomain_t; DEFINE_XEN_GUEST_HANDLE(dom0_pausedomain_t); #define DOM0_UNPAUSEDOMAIN 11 -typedef struct dom0_unpausedomain { +struct dom0_unpausedomain { /* IN parameters. */ domid_t domain; -} dom0_unpausedomain_t; +}; +typedef struct dom0_unpausedomain dom0_unpausedomain_t; DEFINE_XEN_GUEST_HANDLE(dom0_unpausedomain_t); #define DOM0_GETDOMAININFO 12 -typedef struct dom0_getdomaininfo { +struct dom0_getdomaininfo { /* IN variables. */ domid_t domain; /* NB. IN/OUT variable. */ /* OUT variables. */ @@ -99,21 +104,23 @@ typedef struct dom0_getdomaininfo { uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ uint32_t ssidref; xen_domain_handle_t handle; -} dom0_getdomaininfo_t; +}; +typedef struct dom0_getdomaininfo dom0_getdomaininfo_t; DEFINE_XEN_GUEST_HANDLE(dom0_getdomaininfo_t); #define DOM0_SETVCPUCONTEXT 13 -typedef struct dom0_setvcpucontext { +struct dom0_setvcpucontext { /* IN variables. */ domid_t domain; uint32_t vcpu; /* IN/OUT parameters */ XEN_GUEST_HANDLE(vcpu_guest_context_t) ctxt; -} dom0_setvcpucontext_t; +}; +typedef struct dom0_setvcpucontext dom0_setvcpucontext_t; DEFINE_XEN_GUEST_HANDLE(dom0_setvcpucontext_t); #define DOM0_MSR 15 -typedef struct dom0_msr { +struct dom0_msr { /* IN variables. */ uint32_t write; cpumap_t cpu_mask; @@ -123,7 +130,8 @@ typedef struct dom0_msr { /* OUT variables. */ uint32_t out1; uint32_t out2; -} dom0_msr_t; +}; +typedef struct dom0_msr dom0_msr_t; DEFINE_XEN_GUEST_HANDLE(dom0_msr_t); /* @@ -131,12 +139,13 @@ DEFINE_XEN_GUEST_HANDLE(dom0_msr_t); * 1 January, 1970 if the current system time was <system_time>. */ #define DOM0_SETTIME 17 -typedef struct dom0_settime { +struct dom0_settime { /* IN variables. */ uint32_t secs; uint32_t nsecs; uint64_t system_time; -} dom0_settime_t; +}; +typedef struct dom0_settime dom0_settime_t; DEFINE_XEN_GUEST_HANDLE(dom0_settime_t); #define DOM0_GETPAGEFRAMEINFO 18 @@ -151,44 +160,47 @@ DEFINE_XEN_GUEST_HANDLE(dom0_settime_t); #define LTAB_MASK XTAB #define LTABTYPE_MASK (0x7<<LTAB_SHIFT) -typedef struct dom0_getpageframeinfo { +struct dom0_getpageframeinfo { /* IN variables. */ unsigned long mfn; /* Machine page frame number to query. */ domid_t domain; /* To which domain does the frame belong? */ /* OUT variables. */ /* Is the page PINNED to a type? */ uint32_t type; /* see above type defs */ -} dom0_getpageframeinfo_t; +}; +typedef struct dom0_getpageframeinfo dom0_getpageframeinfo_t; DEFINE_XEN_GUEST_HANDLE(dom0_getpageframeinfo_t); /* * Read console content from Xen buffer ring. */ #define DOM0_READCONSOLE 19 -typedef struct dom0_readconsole { +struct dom0_readconsole { /* IN variables. */ uint32_t clear; /* Non-zero -> clear after reading. */ /* IN/OUT variables. */ XEN_GUEST_HANDLE(char) buffer; /* In: Buffer start; Out: Used buffer start */ uint32_t count; /* In: Buffer size; Out: Used buffer size */ -} dom0_readconsole_t; +}; +typedef struct dom0_readconsole dom0_readconsole_t; DEFINE_XEN_GUEST_HANDLE(dom0_readconsole_t); /* * Set which physical cpus a vcpu can execute on. */ #define DOM0_SETVCPUAFFINITY 20 -typedef struct dom0_setvcpuaffinity { +struct dom0_setvcpuaffinity { /* IN variables. */ domid_t domain; uint32_t vcpu; cpumap_t cpumap; -} dom0_setvcpuaffinity_t; +}; +typedef struct dom0_setvcpuaffinity dom0_setvcpuaffinity_t; DEFINE_XEN_GUEST_HANDLE(dom0_setvcpuaffinity_t); /* Get trace buffers machine base address */ #define DOM0_TBUFCONTROL 21 -typedef struct dom0_tbufcontrol { +struct dom0_tbufcontrol { /* IN variables */ #define DOM0_TBUF_GET_INFO 0 #define DOM0_TBUF_SET_CPU_MASK 1 @@ -203,14 +215,15 @@ typedef struct dom0_tbufcontrol { /* OUT variables */ unsigned long buffer_mfn; uint32_t size; -} dom0_tbufcontrol_t; +}; +typedef struct dom0_tbufcontrol dom0_tbufcontrol_t; DEFINE_XEN_GUEST_HANDLE(dom0_tbufcontrol_t); /* * Get physical information about the host machine */ #define DOM0_PHYSINFO 22 -typedef struct dom0_physinfo { +struct dom0_physinfo { uint32_t threads_per_core; uint32_t cores_per_socket; uint32_t sockets_per_node; @@ -219,17 +232,19 @@ typedef struct dom0_physinfo { unsigned long total_pages; unsigned long free_pages; uint32_t hw_cap[8]; -} dom0_physinfo_t; +}; +typedef struct dom0_physinfo dom0_physinfo_t; DEFINE_XEN_GUEST_HANDLE(dom0_physinfo_t); /* * Get the ID of the current scheduler. */ #define DOM0_SCHED_ID 24 -typedef struct dom0_sched_id { +struct dom0_sched_id { /* OUT variable */ uint32_t sched_id; -} dom0_sched_id_t; +}; +typedef struct dom0_physinfo dom0_sched_id_t; DEFINE_XEN_GUEST_HANDLE(dom0_sched_id_t); /* @@ -246,15 +261,16 @@ DEFINE_XEN_GUEST_HANDLE(dom0_sched_id_t) #define DOM0_SHADOW_CONTROL_OP_CLEAN 11 #define DOM0_SHADOW_CONTROL_OP_PEEK 12 -typedef struct dom0_shadow_control_stats { +struct dom0_shadow_control_stats { uint32_t fault_count; uint32_t dirty_count; uint32_t dirty_net_count; uint32_t dirty_block_count; -} dom0_shadow_control_stats_t; +}; +typedef struct dom0_shadow_control_stats dom0_shadow_control_stats_t; DEFINE_XEN_GUEST_HANDLE(dom0_shadow_control_stats_t); -typedef struct dom0_shadow_control { +struct dom0_shadow_control { /* IN variables. */ domid_t domain; uint32_t op; @@ -262,26 +278,29 @@ typedef struct dom0_shadow_control { /* IN/OUT variables. */ unsigned long pages; /* size of buffer, updated with actual size */ /* OUT variables. */ - dom0_shadow_control_stats_t stats; -} dom0_shadow_control_t; + struct dom0_shadow_control_stats stats; +}; +typedef struct dom0_shadow_control dom0_shadow_control_t; DEFINE_XEN_GUEST_HANDLE(dom0_shadow_control_t); #define DOM0_SETDOMAINMAXMEM 28 -typedef struct dom0_setdomainmaxmem { +struct dom0_setdomainmaxmem { /* IN variables. */ domid_t domain; unsigned long max_memkb; -} dom0_setdomainmaxmem_t; +}; +typedef struct dom0_setdomainmaxmem dom0_setdomainmaxmem_t; DEFINE_XEN_GUEST_HANDLE(dom0_setdomainmaxmem_t); #define DOM0_GETPAGEFRAMEINFO2 29 /* batched interface */ -typedef struct dom0_getpageframeinfo2 { +struct dom0_getpageframeinfo2 { /* IN variables. */ domid_t domain; unsigned long num; /* IN/OUT variables. */ XEN_GUEST_HANDLE(ulong) array; -} dom0_getpageframeinfo2_t; +}; +typedef struct dom0_getpageframeinfo2 dom0_getpageframeinfo2_t; DEFINE_XEN_GUEST_HANDLE(dom0_getpageframeinfo2_t); /* @@ -292,7 +311,7 @@ DEFINE_XEN_GUEST_HANDLE(dom0_getpagefram * (x86-specific). */ #define DOM0_ADD_MEMTYPE 31 -typedef struct dom0_add_memtype { +struct dom0_add_memtype { /* IN variables. */ unsigned long mfn; unsigned long nr_mfns; @@ -300,7 +319,8 @@ typedef struct dom0_add_memtype { /* OUT variables. */ uint32_t handle; uint32_t reg; -} dom0_add_memtype_t; +}; +typedef struct dom0_add_memtype dom0_add_memtype_t; DEFINE_XEN_GUEST_HANDLE(dom0_add_memtype_t); /* @@ -311,23 +331,25 @@ DEFINE_XEN_GUEST_HANDLE(dom0_add_memtype * (x86-specific). */ #define DOM0_DEL_MEMTYPE 32 -typedef struct dom0_del_memtype { +struct dom0_del_memtype { /* IN variables. */ uint32_t handle; uint32_t reg; -} dom0_del_memtype_t; +}; +typedef struct dom0_del_memtype dom0_del_memtype_t; DEFINE_XEN_GUEST_HANDLE(dom0_del_memtype_t); /* Read current type of an MTRR (x86-specific). */ #define DOM0_READ_MEMTYPE 33 -typedef struct dom0_read_memtype { +struct dom0_read_memtype { /* IN variables. */ uint32_t reg; /* OUT variables. */ unsigned long mfn; unsigned long nr_mfns; uint32_t type; -} dom0_read_memtype_t; +}; +typedef struct dom0_read_memtype dom0_read_memtype_t; DEFINE_XEN_GUEST_HANDLE(dom0_read_memtype_t); /* Interface for controlling Xen software performance counters. */ @@ -335,50 +357,56 @@ DEFINE_XEN_GUEST_HANDLE(dom0_read_memtyp /* Sub-operations: */ #define DOM0_PERFCCONTROL_OP_RESET 1 /* Reset all counters to zero. */ #define DOM0_PERFCCONTROL_OP_QUERY 2 /* Get perfctr information. */ -typedef struct dom0_perfc_desc { +struct dom0_perfc_desc { char name[80]; /* name of perf counter */ uint32_t nr_vals; /* number of values for this counter */ uint32_t vals[64]; /* array of values */ -} dom0_perfc_desc_t; +}; +typedef struct dom0_perfc_desc dom0_perfc_desc_t; DEFINE_XEN_GUEST_HANDLE(dom0_perfc_desc_t); -typedef struct dom0_perfccontrol { + +struct dom0_perfccontrol { /* IN variables. */ uint32_t op; /* DOM0_PERFCCONTROL_OP_??? */ /* OUT variables. */ uint32_t nr_counters; /* number of counters */ XEN_GUEST_HANDLE(dom0_perfc_desc_t) desc; /* counter information (or NULL) */ -} dom0_perfccontrol_t; +}; +typedef struct dom0_perfccontrol dom0_perfccontrol_t; DEFINE_XEN_GUEST_HANDLE(dom0_perfccontrol_t); #define DOM0_MICROCODE 35 -typedef struct dom0_microcode { +struct dom0_microcode { /* IN variables. */ XEN_GUEST_HANDLE(void) data; /* Pointer to microcode data */ uint32_t length; /* Length of microcode data. */ -} dom0_microcode_t; +}; +typedef struct dom0_microcode dom0_microcode_t; DEFINE_XEN_GUEST_HANDLE(dom0_microcode_t); #define DOM0_IOPORT_PERMISSION 36 -typedef struct dom0_ioport_permission { +struct dom0_ioport_permission { domid_t domain; /* domain to be affected */ uint32_t first_port; /* first port int range */ uint32_t nr_ports; /* size of port range */ uint8_t allow_access; /* allow or deny access to range? */ -} dom0_ioport_permission_t; +}; +typedef struct dom0_ioport_permission dom0_ioport_permission_t; DEFINE_XEN_GUEST_HANDLE(dom0_ioport_permission_t); #define DOM0_GETVCPUCONTEXT 37 -typedef struct dom0_getvcpucontext { +struct dom0_getvcpucontext { /* IN variables. */ domid_t domain; /* domain to be affected */ uint32_t vcpu; /* vcpu # */ /* OUT variables. */ XEN_GUEST_HANDLE(vcpu_guest_context_t) ctxt; -} dom0_getvcpucontext_t; +}; +typedef struct dom0_getvcpucontext dom0_getvcpucontext_t; DEFINE_XEN_GUEST_HANDLE(dom0_getvcpucontext_t); #define DOM0_GETVCPUINFO 43 -typedef struct dom0_getvcpuinfo { +struct dom0_getvcpuinfo { /* IN variables. */ domid_t domain; /* domain to be affected */ uint32_t vcpu; /* vcpu # */ @@ -389,92 +417,104 @@ typedef struct dom0_getvcpuinfo { uint64_t cpu_time; /* total cpu time consumed (ns) */ uint32_t cpu; /* current mapping */ cpumap_t cpumap; /* allowable mapping */ -} dom0_getvcpuinfo_t; +}; +typedef struct dom0_getvcpuinfo dom0_getvcpuinfo_t; DEFINE_XEN_GUEST_HANDLE(dom0_getvcpuinfo_t); #define DOM0_GETDOMAININFOLIST 38 -typedef struct dom0_getdomaininfolist { +struct dom0_getdomaininfolist { /* IN variables. */ domid_t first_domain; uint32_t max_domains; XEN_GUEST_HANDLE(dom0_getdomaininfo_t) buffer; /* OUT variables. */ uint32_t num_domains; -} dom0_getdomaininfolist_t; +}; +typedef struct dom0_getdomaininfolist dom0_getdomaininfolist_t; DEFINE_XEN_GUEST_HANDLE(dom0_getdomaininfolist_t); #define DOM0_PLATFORM_QUIRK 39 #define QUIRK_NOIRQBALANCING 1 /* Do not restrict IO-APIC RTE targets */ #define QUIRK_IOAPIC_BAD_REGSEL 2 /* IO-APIC REGSEL forgets its value */ #define QUIRK_IOAPIC_GOOD_REGSEL 3 /* IO-APIC REGSEL behaves properly */ -typedef struct dom0_platform_quirk { +struct dom0_platform_quirk { /* IN variables. */ uint32_t quirk_id; -} dom0_platform_quirk_t; +}; +typedef struct dom0_platform_quirk dom0_platform_quirk_t; DEFINE_XEN_GUEST_HANDLE(dom0_platform_quirk_t); #define DOM0_PHYSICAL_MEMORY_MAP 40 -typedef struct dom0_memory_map_entry { +struct dom0_memory_map_entry { uint64_t start, end; uint32_t flags; /* reserved */ uint8_t is_ram; -} dom0_memory_map_entry_t; +}; +typedef struct dom0_memory_map_entry dom0_memory_map_entry_t; DEFINE_XEN_GUEST_HANDLE(dom0_memory_map_entry_t); -typedef struct dom0_physical_memory_map { + +struct dom0_physical_memory_map { /* IN variables. */ uint32_t max_map_entries; /* OUT variables. */ uint32_t nr_map_entries; XEN_GUEST_HANDLE(dom0_memory_map_entry_t) memory_map; -} dom0_physical_memory_map_t; +}; +typedef struct dom0_physical_memory_map dom0_physical_memory_map_t; DEFINE_XEN_GUEST_HANDLE(dom0_physical_memory_map_t); #define DOM0_MAX_VCPUS 41 -typedef struct dom0_max_vcpus { +struct dom0_max_vcpus { domid_t domain; /* domain to be affected */ uint32_t max; /* maximum number of vcpus */ -} dom0_max_vcpus_t; +}; +typedef struct dom0_max_vcpus dom0_max_vcpus_t; DEFINE_XEN_GUEST_HANDLE(dom0_max_vcpus_t); #define DOM0_SETDOMAINHANDLE 44 -typedef struct dom0_setdomainhandle { +struct dom0_setdomainhandle { domid_t domain; xen_domain_handle_t handle; -} dom0_setdomainhandle_t; +}; +typedef struct dom0_setdomainhandle dom0_setdomainhandle_t; DEFINE_XEN_GUEST_HANDLE(dom0_setdomainhandle_t); #define DOM0_SETDEBUGGING 45 -typedef struct dom0_setdebugging { +struct dom0_setdebugging { domid_t domain; uint8_t enable; -} dom0_setdebugging_t; +}; +typedef struct dom0_setdebugging dom0_setdebugging_t; DEFINE_XEN_GUEST_HANDLE(dom0_setdebugging_t); #define DOM0_IRQ_PERMISSION 46 -typedef struct dom0_irq_permission { +struct dom0_irq_permission { domid_t domain; /* domain to be affected */ uint8_t pirq; uint8_t allow_access; /* flag to specify enable/disable of IRQ access */ -} dom0_irq_permission_t; +}; +typedef struct dom0_irq_permission dom0_irq_permission_t; DEFINE_XEN_GUEST_HANDLE(dom0_irq_permission_t); #define DOM0_IOMEM_PERMISSION 47 -typedef struct dom0_iomem_permission { +struct dom0_iomem_permission { domid_t domain; /* domain to be affected */ unsigned long first_mfn; /* first page (physical page number) in range */ unsigned long nr_mfns; /* number of pages in range (>0) */ uint8_t allow_access; /* allow (!0) or deny (0) access to range? */ -} dom0_iomem_permission_t; +}; +typedef struct dom0_iomem_permission dom0_iomem_permission_t; DEFINE_XEN_GUEST_HANDLE(dom0_iomem_permission_t); #define DOM0_HYPERCALL_INIT 48 -typedef struct dom0_hypercall_init { +struct dom0_hypercall_init { domid_t domain; /* domain to be affected */ unsigned long mfn; /* machine frame to be initialised */ -} dom0_hypercall_init_t; +}; +typedef struct dom0_hypercall_init dom0_hypercall_init_t; DEFINE_XEN_GUEST_HANDLE(dom0_hypercall_init_t); -typedef struct dom0_op { +struct dom0_op { uint32_t cmd; uint32_t interface_version; /* DOM0_INTERFACE_VERSION */ union { @@ -517,7 +557,8 @@ typedef struct dom0_op { struct dom0_hypercall_init hypercall_init; uint8_t pad[128]; } u; -} dom0_op_t; +}; +typedef struct dom0_op dom0_op_t; DEFINE_XEN_GUEST_HANDLE(dom0_op_t); #endif /* __XEN_PUBLIC_DOM0_OPS_H__ */ diff -r 9b11eeab4558 xen/include/public/event_channel.h --- a/xen/include/public/event_channel.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/event_channel.h Fri May 19 16:39:17 2006 -0400 @@ -28,12 +28,13 @@ DEFINE_XEN_GUEST_HANDLE(evtchn_port_t); * 2. <rdom> may be DOMID_SELF, allowing loopback connections. */ #define EVTCHNOP_alloc_unbound 6 -typedef struct evtchn_alloc_unbound { +struct evtchn_alloc_unbound { /* IN parameters */ domid_t dom, remote_dom; /* OUT parameters */ evtchn_port_t port; -} evtchn_alloc_unbound_t; +}; +typedef struct evtchn_alloc_unbound evtchn_alloc_unbound_t; /* * EVTCHNOP_bind_interdomain: Construct an interdomain event channel between @@ -45,13 +46,14 @@ typedef struct evtchn_alloc_unbound { * 2. <remote_dom> may be DOMID_SELF, allowing loopback connections. */ #define EVTCHNOP_bind_interdomain 0 -typedef struct evtchn_bind_interdomain { +struct evtchn_bind_interdomain { /* IN parameters. */ domid_t remote_dom; evtchn_port_t remote_port; /* OUT parameters. */ evtchn_port_t local_port; -} evtchn_bind_interdomain_t; +}; +typedef struct evtchn_bind_interdomain evtchn_bind_interdomain_t; /* * EVTCHNOP_bind_virq: Bind a local event channel to VIRQ <irq> on specified @@ -66,13 +68,14 @@ typedef struct evtchn_bind_interdomain { * binding cannot be changed. */ #define EVTCHNOP_bind_virq 1 -typedef struct evtchn_bind_virq { +struct evtchn_bind_virq { /* IN parameters. */ uint32_t virq; uint32_t vcpu; /* OUT parameters. */ evtchn_port_t port; -} evtchn_bind_virq_t; +}; +typedef struct evtchn_bind_virq evtchn_bind_virq_t; /* * EVTCHNOP_bind_pirq: Bind a local event channel to PIRQ <irq>. @@ -81,14 +84,15 @@ typedef struct evtchn_bind_virq { * 2. Only a sufficiently-privileged domain may bind to a physical IRQ. */ #define EVTCHNOP_bind_pirq 2 -typedef struct evtchn_bind_pirq { +struct evtchn_bind_pirq { /* IN parameters. */ uint32_t pirq; #define BIND_PIRQ__WILL_SHARE 1 uint32_t flags; /* BIND_PIRQ__* */ /* OUT parameters. */ evtchn_port_t port; -} evtchn_bind_pirq_t; +}; +typedef struct evtchn_bind_pirq evtchn_bind_pirq_t; /* * EVTCHNOP_bind_ipi: Bind a local event channel to receive events. @@ -97,11 +101,12 @@ typedef struct evtchn_bind_pirq { * may not be changed. */ #define EVTCHNOP_bind_ipi 7 -typedef struct evtchn_bind_ipi { - uint32_t vcpu; - /* OUT parameters. */ - evtchn_port_t port; -} evtchn_bind_ipi_t; +struct evtchn_bind_ipi { + uint32_t vcpu; + /* OUT parameters. */ + evtchn_port_t port; +}; +typedef struct evtchn_bind_ipi evtchn_bind_ipi_t; /* * EVTCHNOP_close: Close a local event channel <port>. If the channel is @@ -109,20 +114,22 @@ typedef struct evtchn_bind_ipi { * (EVTCHNSTAT_unbound), awaiting a new connection. */ #define EVTCHNOP_close 3 -typedef struct evtchn_close { - /* IN parameters. */ - evtchn_port_t port; -} evtchn_close_t; +struct evtchn_close { + /* IN parameters. */ + evtchn_port_t port; +}; +typedef struct evtchn_close evtchn_close_t; /* * EVTCHNOP_send: Send an event to the remote end of the channel whose local * endpoint is <port>. */ #define EVTCHNOP_send 4 -typedef struct evtchn_send { - /* IN parameters. */ - evtchn_port_t port; -} evtchn_send_t; +struct evtchn_send { + /* IN parameters. */ + evtchn_port_t port; +}; +typedef struct evtchn_send evtchn_send_t; /* * EVTCHNOP_status: Get the current status of the communication channel which @@ -133,7 +140,7 @@ typedef struct evtchn_send { * channel for which <dom> is not DOMID_SELF. */ #define EVTCHNOP_status 5 -typedef struct evtchn_status { +struct evtchn_status { /* IN parameters */ domid_t dom; evtchn_port_t port; @@ -157,7 +164,8 @@ typedef struct evtchn_status { uint32_t pirq; /* EVTCHNSTAT_pirq */ uint32_t virq; /* EVTCHNSTAT_virq */ } u; -} evtchn_status_t; +}; +typedef struct evtchn_status evtchn_status_t; /* * EVTCHNOP_bind_vcpu: Specify which vcpu a channel should notify when an @@ -172,41 +180,44 @@ typedef struct evtchn_status { * has its binding reset to vcpu0). */ #define EVTCHNOP_bind_vcpu 8 -typedef struct evtchn_bind_vcpu { - /* IN parameters. */ - evtchn_port_t port; - uint32_t vcpu; -} evtchn_bind_vcpu_t; +struct evtchn_bind_vcpu { + /* IN parameters. */ + evtchn_port_t port; + uint32_t vcpu; +}; +typedef struct evtchn_bind_vcpu evtchn_bind_vcpu_t; /* * EVTCHNOP_unmask: Unmask the specified local event-channel port and deliver * a notification to the appropriate VCPU if an event is pending. */ #define EVTCHNOP_unmask 9 -typedef struct evtchn_unmask { - /* IN parameters. */ - evtchn_port_t port; -} evtchn_unmask_t; +struct evtchn_unmask { + /* IN parameters. */ + evtchn_port_t port; +}; +typedef struct evtchn_unmask evtchn_unmask_t; /* * Argument to event_channel_op_compat() hypercall. Superceded by new * event_channel_op() hypercall since 0x00030202. */ -typedef struct evtchn_op { +struct evtchn_op { uint32_t cmd; /* EVTCHNOP_* */ union { - evtchn_alloc_unbound_t alloc_unbound; - evtchn_bind_interdomain_t bind_interdomain; - evtchn_bind_virq_t bind_virq; - evtchn_bind_pirq_t bind_pirq; - evtchn_bind_ipi_t bind_ipi; - evtchn_close_t close; - evtchn_send_t send; - evtchn_status_t status; - evtchn_bind_vcpu_t bind_vcpu; - evtchn_unmask_t unmask; + struct evtchn_alloc_unbound alloc_unbound; + struct evtchn_bind_interdomain bind_interdomain; + struct evtchn_bind_virq bind_virq; + struct evtchn_bind_pirq bind_pirq; + struct evtchn_bind_ipi bind_ipi; + struct evtchn_close close; + struct evtchn_send send; + struct evtchn_status status; + struct evtchn_bind_vcpu bind_vcpu; + struct evtchn_unmask unmask; } u; -} evtchn_op_t; +}; +typedef struct evtchn_op evtchn_op_t; DEFINE_XEN_GUEST_HANDLE(evtchn_op_t); #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */ diff -r 9b11eeab4558 xen/include/public/grant_table.h --- a/xen/include/public/grant_table.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/grant_table.h Fri May 19 16:39:17 2006 -0400 @@ -71,7 +71,7 @@ * [XEN]: This field is written by Xen and read by the sharing guest. * [GST]: This field is written by the guest and read by Xen. */ -typedef struct grant_entry { +struct grant_entry { /* GTF_xxx: various type and flag information. [XEN,GST] */ uint16_t flags; /* The domain being granted foreign privileges. [GST] */ @@ -81,7 +81,8 @@ typedef struct grant_entry { * GTF_accept_transfer: Frame whose ownership transferred by @domid. [XEN] */ uint32_t frame; -} grant_entry_t; +}; +typedef struct grant_entry grant_entry_t; /* * Type of grant entry. @@ -156,7 +157,7 @@ typedef uint32_t grant_handle_t; * to be accounted to the correct grant reference! */ #define GNTTABOP_map_grant_ref 0 -typedef struct gnttab_map_grant_ref { +struct gnttab_map_grant_ref { /* IN parameters. */ uint64_t host_addr; uint32_t flags; /* GNTMAP_* */ @@ -166,7 +167,8 @@ typedef struct gnttab_map_grant_ref { int16_t status; /* GNTST_* */ grant_handle_t handle; uint64_t dev_bus_addr; -} gnttab_map_grant_ref_t; +}; +typedef struct gnttab_map_grant_ref gnttab_map_grant_ref_t; DEFINE_XEN_GUEST_HANDLE(gnttab_map_grant_ref_t); /* @@ -181,14 +183,15 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_map_grant * mappings will remain in the device or host TLBs. */ #define GNTTABOP_unmap_grant_ref 1 -typedef struct gnttab_unmap_grant_ref { +struct gnttab_unmap_grant_ref { /* IN parameters. */ uint64_t host_addr; uint64_t dev_bus_addr; grant_handle_t handle; /* OUT parameters. */ int16_t status; /* GNTST_* */ -} gnttab_unmap_grant_ref_t; +}; +typedef struct gnttab_unmap_grant_ref gnttab_unmap_grant_ref_t; DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_grant_ref_t); /* @@ -201,14 +204,15 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_gra * 3. Xen may not support more than a single grant-table page per domain. */ #define GNTTABOP_setup_table 2 -typedef struct gnttab_setup_table { +struct gnttab_setup_table { /* IN parameters. */ domid_t dom; uint32_t nr_frames; /* OUT parameters. */ int16_t status; /* GNTST_* */ XEN_GUEST_HANDLE(ulong) frame_list; -} gnttab_setup_table_t; +}; +typedef struct gnttab_setup_table gnttab_setup_table_t; DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t); /* @@ -216,12 +220,13 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_setup_tab * xen console. Debugging use only. */ #define GNTTABOP_dump_table 3 -typedef struct gnttab_dump_table { +struct gnttab_dump_table { /* IN parameters. */ domid_t dom; /* OUT parameters. */ int16_t status; /* GNTST_* */ -} gnttab_dump_table_t; +}; +typedef struct gnttab_dump_table gnttab_dump_table_t; DEFINE_XEN_GUEST_HANDLE(gnttab_dump_table_t); /* @@ -233,14 +238,15 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_dump_tabl * to the calling domain *unless* the error is GNTST_bad_page. */ #define GNTTABOP_transfer 4 -typedef struct gnttab_transfer { +struct gnttab_transfer { /* IN parameters. */ unsigned long mfn; domid_t domid; grant_ref_t ref; /* OUT parameters. */ int16_t status; -} gnttab_transfer_t; +}; +typedef struct gnttab_transfer gnttab_transfer_t; DEFINE_XEN_GUEST_HANDLE(gnttab_transfer_t); /* diff -r 9b11eeab4558 xen/include/public/hvm/ioreq.h --- a/xen/include/public/hvm/ioreq.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/hvm/ioreq.h Fri May 19 16:39:17 2006 -0400 @@ -41,7 +41,7 @@ * prepare this structure and notify service OS and DM by sending * virq */ -typedef struct { +struct ioreq { uint64_t addr; /* physical address */ uint64_t size; /* size in bytes */ uint64_t count; /* for rep prefixes */ @@ -55,31 +55,35 @@ typedef struct { uint8_t df:1; uint8_t type; /* I/O type */ uint64_t io_count; /* How many IO done on a vcpu */ -} ioreq_t; +}; +typedef struct ioreq ioreq_t; #define MAX_VECTOR 256 #define BITS_PER_BYTE 8 #define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint64_t))) #define INTR_LEN_32 (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint32_t))) -typedef struct { +struct global_iodata { uint16_t pic_elcr; uint16_t pic_irr; uint16_t pic_last_irr; uint16_t pic_clear_irr; -} global_iodata_t; +}; +typedef struct global_iodata global_iodata_t; -typedef struct { - ioreq_t vp_ioreq; +struct vcpu_iodata { + struct ioreq vp_ioreq; /* Event channel port */ unsigned int vp_eport; /* VMX vcpu uses this to notify DM */ unsigned int dm_eport; /* DM uses this to notify VMX vcpu */ -} vcpu_iodata_t; +}; +typedef struct vcpu_iodata vcpu_iodata_t; -typedef struct { - global_iodata_t sp_global; - vcpu_iodata_t vcpu_iodata[1]; -} shared_iopage_t; +struct shared_iopage { + struct global_iodata sp_global; + struct vcpu_iodata vcpu_iodata[1]; +}; +typedef struct shared_iopage shared_iopage_t; #endif /* _IOREQ_H_ */ diff -r 9b11eeab4558 xen/include/public/hvm/vmx_assist.h --- a/xen/include/public/hvm/vmx_assist.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/hvm/vmx_assist.h Fri May 19 16:39:17 2006 -0400 @@ -37,7 +37,7 @@ union vmcs_arbytes { /* * World switch state */ -typedef struct vmx_assist_context { +struct vmx_assist_context { uint32_t eip; /* execution pointer */ uint32_t esp; /* stack pointer */ uint32_t eflags; /* flags register */ @@ -80,7 +80,8 @@ typedef struct vmx_assist_context { uint32_t ldtr_limit; uint32_t ldtr_base; union vmcs_arbytes ldtr_arbytes; -} vmx_assist_context_t; +}; +typedef struct vmx_assist_context vmx_assist_context_t; #endif /* __ASSEMBLY__ */ diff -r 9b11eeab4558 xen/include/public/io/blkif.h --- a/xen/include/public/io/blkif.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/io/blkif.h Fri May 19 16:39:17 2006 -0400 @@ -39,7 +39,7 @@ */ #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 -typedef struct blkif_request { +struct blkif_request { uint8_t operation; /* BLKIF_OP_??? */ uint8_t nr_segments; /* number of segments */ blkif_vdev_t handle; /* only for read/write requests */ @@ -51,13 +51,15 @@ typedef struct blkif_request { /* @last_sect: last sector in frame to transfer (inclusive). */ uint8_t first_sect, last_sect; } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; -} blkif_request_t; +}; +typedef struct blkif_request blkif_request_t; -typedef struct blkif_response { +struct blkif_response { uint64_t id; /* copied from request */ uint8_t operation; /* copied from request */ int16_t status; /* BLKIF_RSP_??? */ -} blkif_response_t; +}; +typedef struct blkif_response blkif_response_t; #define BLKIF_RSP_ERROR -1 /* non-specific ''error'' */ #define BLKIF_RSP_OKAY 0 /* non-specific ''okay'' */ @@ -66,7 +68,7 @@ typedef struct blkif_response { * Generate blkif ring structures and types. */ -DEFINE_RING_TYPES(blkif, blkif_request_t, blkif_response_t); +DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response); #define VDISK_CDROM 0x1 #define VDISK_REMOVABLE 0x2 diff -r 9b11eeab4558 xen/include/public/io/tpmif.h --- a/xen/include/public/io/tpmif.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/io/tpmif.h Fri May 19 16:39:17 2006 -0400 @@ -18,12 +18,13 @@ #include "../grant_table.h" -typedef struct { +struct tpmif_tx_request { unsigned long addr; /* Machine address of packet. */ grant_ref_t ref; /* grant table access reference */ uint16_t unused; uint16_t size; /* Packet size in bytes. */ -} tpmif_tx_request_t; +}; +typedef struct tpmif_tx_request tpmif_tx_request_t; /* * The TPMIF_TX_RING_SIZE defines the number of pages the @@ -35,13 +36,15 @@ typedef uint32_t TPMIF_RING_IDX; /* This structure must fit in a memory page. */ -typedef struct { - tpmif_tx_request_t req; -} tpmif_ring_t; +struct tpmif_ring { + struct tpmif_tx_request req; +}; +typedef struct tpmif_ring tpmif_ring_t; -typedef struct { - tpmif_ring_t ring[TPMIF_TX_RING_SIZE]; -} tpmif_tx_interface_t; +struct tpmif_tx_interface { + struct tpmif_ring ring[TPMIF_TX_RING_SIZE]; +}; +typedef struct tpmif_tx_interface tpmif_tx_interface_t; #endif diff -r 9b11eeab4558 xen/include/public/memory.h --- a/xen/include/public/memory.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/memory.h Fri May 19 16:39:17 2006 -0400 @@ -17,7 +17,7 @@ #define XENMEM_increase_reservation 0 #define XENMEM_decrease_reservation 1 #define XENMEM_populate_physmap 6 -typedef struct xen_memory_reservation { +struct xen_memory_reservation { /* * XENMEM_increase_reservation: @@ -49,7 +49,8 @@ typedef struct xen_memory_reservation { */ domid_t domid; -} xen_memory_reservation_t; +}; +typedef struct xen_memory_reservation xen_memory_reservation_t; DEFINE_XEN_GUEST_HANDLE(xen_memory_reservation_t); /* @@ -74,7 +75,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_memory_reser * arg == addr of xen_machphys_mfn_list_t. */ #define XENMEM_machphys_mfn_list 5 -typedef struct xen_machphys_mfn_list { +struct xen_machphys_mfn_list { /* * Size of the ''extent_start'' array. Fewer entries will be filled if the * machphys table is smaller than max_extents * 2MB. @@ -93,7 +94,8 @@ typedef struct xen_machphys_mfn_list { * than ''max_extents'' if the machphys table is smaller than max_e * 2MB. */ unsigned int nr_extents; -} xen_machphys_mfn_list_t; +}; +typedef struct xen_machphys_mfn_list xen_machphys_mfn_list_t; DEFINE_XEN_GUEST_HANDLE(xen_machphys_mfn_list_t); /* @@ -102,7 +104,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_mfn * arg == addr of xen_add_to_physmap_t. */ #define XENMEM_add_to_physmap 7 -typedef struct xen_add_to_physmap { +struct xen_add_to_physmap { /* Which domain to change the mapping for. */ domid_t domid; @@ -116,7 +118,8 @@ typedef struct xen_add_to_physmap { /* GPFN where the source mapping page should appear. */ unsigned long gpfn; -} xen_add_to_physmap_t; +}; +typedef struct xen_add_to_physmap xen_add_to_physmap_t; DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); /* @@ -124,7 +127,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physm * code on failure. This call only works for auto-translated guests. */ #define XENMEM_translate_gpfn_list 8 -typedef struct xen_translate_gpfn_list { +struct xen_translate_gpfn_list { /* Which domain to translate for? */ domid_t domid; @@ -139,7 +142,8 @@ typedef struct xen_translate_gpfn_list { * list (in which case each input GPFN is overwritten with the output MFN). */ XEN_GUEST_HANDLE(ulong) mfn_list; -} xen_translate_gpfn_list_t; +}; +typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t; DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t); #endif /* __XEN_PUBLIC_MEMORY_H__ */ diff -r 9b11eeab4558 xen/include/public/nmi.h --- a/xen/include/public/nmi.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/nmi.h Fri May 19 16:39:17 2006 -0400 @@ -34,10 +34,11 @@ * arg == pointer to xennmi_callback structure. */ #define XENNMI_register_callback 0 -typedef struct xennmi_callback { +struct xennmi_callback { unsigned long handler_address; unsigned long pad; -} xennmi_callback_t; +}; +typedef struct xennmi_callback xennmi_callback_t; DEFINE_XEN_GUEST_HANDLE(xennmi_callback_t); /* diff -r 9b11eeab4558 xen/include/public/physdev.h --- a/xen/include/public/physdev.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/physdev.h Fri May 19 16:39:17 2006 -0400 @@ -14,10 +14,11 @@ * @arg == pointer to physdev_eoi structure. */ #define PHYSDEVOP_eoi 12 -typedef struct physdev_eoi { +struct physdev_eoi { /* IN */ uint32_t irq; -} physdev_eoi_t; +}; +typedef struct physdev_eoi physdev_eoi_t; DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t); /* @@ -25,12 +26,13 @@ DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t); * @arg == pointer to physdev_irq_status_query structure. */ #define PHYSDEVOP_irq_status_query 5 -typedef struct physdev_irq_status_query { +struct physdev_irq_status_query { /* IN */ uint32_t irq; /* OUT */ uint32_t flags; /* XENIRQSTAT_* */ -} physdev_irq_status_query_t; +}; +typedef struct physdev_irq_status_query physdev_irq_status_query_t; DEFINE_XEN_GUEST_HANDLE(physdev_irq_status_query_t); /* Need to call PHYSDEVOP_eoi when the IRQ has been serviced? */ @@ -42,10 +44,11 @@ DEFINE_XEN_GUEST_HANDLE(physdev_irq_stat * @arg == pointer to physdev_set_iopl structure. */ #define PHYSDEVOP_set_iopl 6 -typedef struct physdev_set_iopl { +struct physdev_set_iopl { /* IN */ uint32_t iopl; -} physdev_set_iopl_t; +}; +typedef struct physdev_set_iopl physdev_set_iopl_t; DEFINE_XEN_GUEST_HANDLE(physdev_set_iopl_t); /* @@ -53,11 +56,12 @@ DEFINE_XEN_GUEST_HANDLE(physdev_set_iopl * @arg == pointer to physdev_set_iobitmap structure. */ #define PHYSDEVOP_set_iobitmap 7 -typedef struct physdev_set_iobitmap { +struct physdev_set_iobitmap { /* IN */ uint8_t *bitmap; uint32_t nr_ports; -} physdev_set_iobitmap_t; +}; +typedef struct physdev_set_iobitmap physdev_set_iobitmap_t; DEFINE_XEN_GUEST_HANDLE(physdev_set_iobitmap_t); /* @@ -66,13 +70,14 @@ DEFINE_XEN_GUEST_HANDLE(physdev_set_iobi */ #define PHYSDEVOP_apic_read 8 #define PHYSDEVOP_apic_write 9 -typedef struct physdev_apic { +struct physdev_apic { /* IN */ unsigned long apic_physbase; uint32_t reg; /* IN or OUT */ uint32_t value; -} physdev_apic_t; +}; +typedef struct physdev_apic physdev_apic_t; DEFINE_XEN_GUEST_HANDLE(physdev_apic_t); /* @@ -81,28 +86,30 @@ DEFINE_XEN_GUEST_HANDLE(physdev_apic_t); */ #define PHYSDEVOP_alloc_irq_vector 10 #define PHYSDEVOP_free_irq_vector 11 -typedef struct physdev_irq { +struct physdev_irq { /* IN */ uint32_t irq; /* IN or OUT */ uint32_t vector; -} physdev_irq_t; +}; +typedef struct physdev_irq physdev_irq_t; DEFINE_XEN_GUEST_HANDLE(physdev_irq_t); /* * Argument to physdev_op_compat() hypercall. Superceded by new physdev_op() * hypercall since 0x00030202. */ -typedef struct physdev_op { +struct physdev_op { uint32_t cmd; union { - physdev_irq_status_query_t irq_status_query; - physdev_set_iopl_t set_iopl; - physdev_set_iobitmap_t set_iobitmap; - physdev_apic_t apic_op; - physdev_irq_t irq_op; + struct physdev_irq_status_query irq_status_query; + struct physdev_set_iopl set_iopl; + struct physdev_set_iobitmap set_iobitmap; + struct physdev_apic apic_op; + struct physdev_irq irq_op; } u; -} physdev_op_t; +}; +typedef struct physdev_op physdev_op_t; DEFINE_XEN_GUEST_HANDLE(physdev_op_t); /* diff -r 9b11eeab4558 xen/include/public/sched.h --- a/xen/include/public/sched.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/sched.h Fri May 19 16:39:17 2006 -0400 @@ -46,9 +46,10 @@ * @arg == pointer to sched_shutdown structure. */ #define SCHEDOP_shutdown 2 -typedef struct sched_shutdown { +struct sched_shutdown { unsigned int reason; /* SHUTDOWN_* */ -} sched_shutdown_t; +}; +typedef struct sched_shutdown sched_shutdown_t; DEFINE_XEN_GUEST_HANDLE(sched_shutdown_t); /* @@ -57,11 +58,12 @@ DEFINE_XEN_GUEST_HANDLE(sched_shutdown_t * @arg == pointer to sched_poll structure. */ #define SCHEDOP_poll 3 -typedef struct sched_poll { +struct sched_poll { XEN_GUEST_HANDLE(evtchn_port_t) ports; unsigned int nr_ports; uint64_t timeout; -} sched_poll_t; +}; +typedef struct sched_poll sched_poll_t; DEFINE_XEN_GUEST_HANDLE(sched_poll_t); /* @@ -71,10 +73,11 @@ DEFINE_XEN_GUEST_HANDLE(sched_poll_t); * @arg == pointer to sched_remote_shutdown structure. */ #define SCHEDOP_remote_shutdown 4 -typedef struct sched_remote_shutdown { +struct sched_remote_shutdown { domid_t domain_id; /* Remote domain ID */ unsigned int reason; /* SHUTDOWN_xxx reason */ -} sched_remote_shutdown_t; +}; +typedef struct sched_remote_shutdown sched_remote_shutdown_t; DEFINE_XEN_GUEST_HANDLE(sched_remote_shutdown_t); /* diff -r 9b11eeab4558 xen/include/public/vcpu.h --- a/xen/include/public/vcpu.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/vcpu.h Fri May 19 16:39:17 2006 -0400 @@ -56,7 +56,7 @@ * @extra_arg == pointer to vcpu_runstate_info structure. */ #define VCPUOP_get_runstate_info 4 -typedef struct vcpu_runstate_info { +struct vcpu_runstate_info { /* VCPU''s current state (RUNSTATE_*). */ int state; /* When was current state entered (system time, ns)? */ @@ -66,7 +66,8 @@ typedef struct vcpu_runstate_info { * guaranteed not to drift from system time. */ uint64_t time[4]; -} vcpu_runstate_info_t; +}; +typedef struct vcpu_runstate_info vcpu_runstate_info_t; /* VCPU is currently running on a physical CPU. */ #define RUNSTATE_running 0 @@ -99,12 +100,13 @@ typedef struct vcpu_runstate_info { * @extra_arg == pointer to vcpu_register_runstate_memory_area structure. */ #define VCPUOP_register_runstate_memory_area 5 -typedef struct vcpu_register_runstate_memory_area { +struct vcpu_register_runstate_memory_area { union { struct vcpu_runstate_info *v; uint64_t p; } addr; -} vcpu_register_runstate_memory_area_t; +}; +typedef struct vcpu_register_runstate_memory_area vcpu_register_runstate_memory_area_t; #endif /* __XEN_PUBLIC_VCPU_H__ */ diff -r 9b11eeab4558 xen/include/public/version.h --- a/xen/include/public/version.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/version.h Fri May 19 16:39:17 2006 -0400 @@ -22,12 +22,13 @@ typedef char xen_extraversion_t[16]; /* arg == xen_compile_info_t. */ #define XENVER_compile_info 2 -typedef struct xen_compile_info { +struct xen_compile_info { char compiler[64]; char compile_by[16]; char compile_domain[32]; char compile_date[32]; -} xen_compile_info_t; +}; +typedef struct xen_compile_info xen_compile_info_t; #define XENVER_capabilities 3 typedef char xen_capabilities_info_t[1024]; @@ -38,15 +39,17 @@ typedef char xen_changeset_info_t[64]; #define XEN_CHANGESET_INFO_LEN (sizeof(xen_changeset_info_t)) #define XENVER_platform_parameters 5 -typedef struct xen_platform_parameters { +struct xen_platform_parameters { unsigned long virt_start; -} xen_platform_parameters_t; +}; +typedef struct xen_platform_parameters xen_platform_parameters_t; #define XENVER_get_features 6 -typedef struct xen_feature_info { +struct xen_feature_info { unsigned int submap_idx; /* IN: which 32-bit submap to return */ uint32_t submap; /* OUT: 32-bit submap */ -} xen_feature_info_t; +}; +typedef struct xen_feature_info xen_feature_info_t; /* Declares the features reported by XENVER_get_features. */ #include "features.h" diff -r 9b11eeab4558 xen/include/public/xenoprof.h --- a/xen/include/public/xenoprof.h Fri May 19 16:30:21 2006 +0100 +++ b/xen/include/public/xenoprof.h Fri May 19 16:39:17 2006 -0400 @@ -41,7 +41,7 @@ struct event_log { }; /* Xenoprof buffer shared between Xen and domain - 1 per VCPU */ -typedef struct xenoprof_buf { +struct xenoprof_buf { uint32_t event_head; uint32_t event_tail; uint32_t event_size; @@ -51,10 +51,11 @@ typedef struct xenoprof_buf { uint64_t user_samples; uint64_t lost_samples; struct event_log event_log[1]; -} xenoprof_buf_t; +}; +typedef struct xenoprof_buf xenoprof_buf_t; DEFINE_XEN_GUEST_HANDLE(xenoprof_buf_t); -typedef struct xenoprof_init { +struct xenoprof_init { int32_t max_samples; int32_t num_events; int32_t is_primary; @@ -62,10 +63,11 @@ typedef struct xenoprof_init { int32_t bufsize; uint64_t buf_maddr; char cpu_type[XENOPROF_CPU_TYPE_SIZE]; -} xenoprof_init_t; +}; +typedef struct xenoprof_init xenoprof_init_t; DEFINE_XEN_GUEST_HANDLE(xenoprof_init_t); -typedef struct xenoprof_counter { +struct xenoprof_counter { uint32_t ind; uint64_t count; uint32_t enabled; @@ -74,7 +76,8 @@ typedef struct xenoprof_counter { uint32_t kernel; uint32_t user; uint64_t unit_mask; -} xenoprof_counter_t; +}; +typedef struct xenoprof_counter xenoprof_counter_t; DEFINE_XEN_GUEST_HANDLE(xenoprof_counter_t); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel