ia64/xen-unstable
changeset 5648:2b6c1a809807
Remove non-ISO attributes from public headers.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
line diff
1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S Fri Jul 01 21:25:45 2005 +0000 1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S Sat Jul 02 08:41:48 2005 +0000 1.3 @@ -127,7 +127,7 @@ 1.4 * Must be consistent with the definition in arch_x86_64.h: 1.5 * struct switch_to_user { 1.6 * u64 rax, r11, rcx, flags, rip, cs, rflags, rsp, ss; 1.7 - * } PACKED; 1.8 + * }; 1.9 * #define VGCF_IN_SYSCALL (1<<8) 1.10 */ 1.11 .macro SWITCH_TO_USER flag
2.1 --- a/tools/debugger/pdb/linux-2.6-module/pdb_module.h Fri Jul 01 21:25:45 2005 +0000 2.2 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_module.h Sat Jul 02 08:41:48 2005 +0000 2.3 @@ -28,7 +28,7 @@ typedef struct 2.4 pdb_op_rd_reg_t rd_reg; 2.5 pdb_op_wr_reg_t wr_reg; 2.6 } u; 2.7 -} PACKED pdb_request_t, *pdb_request_p; 2.8 +} pdb_request_t, *pdb_request_p; 2.9 2.10 2.11 #define PDB_RESPONSE_OKAY 0 2.12 @@ -38,7 +38,7 @@ typedef struct { 2.13 u8 operation; /* copied from request */ 2.14 s16 status; /* PDB_RESPONSE_??? */ 2.15 u32 value; 2.16 -} PACKED pdb_response_t, *pdb_response_p; 2.17 +} pdb_response_t, *pdb_response_p; 2.18 2.19 2.20 DEFINE_RING_TYPES(pdb, pdb_request_t, pdb_response_t);
3.1 --- a/tools/xcs/xcs_proto.h Fri Jul 01 21:25:45 2005 +0000 3.2 +++ b/tools/xcs/xcs_proto.h Sat Jul 02 08:41:48 2005 +0000 3.3 @@ -75,7 +75,7 @@ typedef struct { 3.4 xcs_interface_msg_t interface; 3.5 3.6 xcs_control_msg_t control; /* These are xcs data message types */ 3.7 - } PACKED u; 3.8 + } u; 3.9 } xcs_msg_t; 3.10 3.11 /* message validation macros. */
4.1 --- a/xen/include/asm-x86/domain.h Fri Jul 01 21:25:45 2005 +0000 4.2 +++ b/xen/include/asm-x86/domain.h Sat Jul 02 08:41:48 2005 +0000 4.3 @@ -68,7 +68,9 @@ struct arch_domain 4.4 4.5 struct arch_vcpu 4.6 { 4.7 - struct vcpu_guest_context guest_context; 4.8 + /* Needs 16-byte aligment for FXSAVE/FXRSTOR. */ 4.9 + struct vcpu_guest_context guest_context 4.10 + __attribute__((__aligned__(16))); 4.11 4.12 unsigned long flags; /* TF_ */ 4.13
5.1 --- a/xen/include/asm-x86/mm.h Fri Jul 01 21:25:45 2005 +0000 5.2 +++ b/xen/include/asm-x86/mm.h Sat Jul 02 08:41:48 2005 +0000 5.3 @@ -37,7 +37,7 @@ struct pfn_info 5.4 u32 _domain; /* pickled format */ 5.5 /* Type reference count and various PGT_xxx flags and fields. */ 5.6 u32 type_info; 5.7 - } PACKED inuse; 5.8 + } inuse; 5.9 5.10 /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */ 5.11 struct { 5.12 @@ -45,11 +45,10 @@ struct pfn_info 5.13 cpumask_t cpumask; 5.14 /* Order-size of the free chunk this page is the head of. */ 5.15 u8 order; 5.16 - } PACKED free; 5.17 + } free; 5.18 5.19 - } PACKED u; 5.20 - 5.21 -} PACKED; 5.22 + } u; 5.23 +}; 5.24 5.25 /* The following page types are MUTUALLY EXCLUSIVE. */ 5.26 #define PGT_none (0<<29) /* no special uses of this page */
6.1 --- a/xen/include/public/arch-ia64.h Fri Jul 01 21:25:45 2005 +0000 6.2 +++ b/xen/include/public/arch-ia64.h Sat Jul 02 08:41:48 2005 +0000 6.3 @@ -7,13 +7,6 @@ 6.4 #ifndef __HYPERVISOR_IF_IA64_H__ 6.5 #define __HYPERVISOR_IF_IA64_H__ 6.6 6.7 -// "packed" generates awful code 6.8 -#define PACKED 6.9 - 6.10 -/* Pointers are naturally 64 bits in this architecture; no padding needed. */ 6.11 -#define _MEMORY_PADDING(_X) 6.12 -#define MEMORY_PADDING 6.13 - 6.14 /* Maximum number of virtual CPUs in multi-processor guests. */ 6.15 /* WARNING: before changing this, check that shared_info fits on a page */ 6.16 #define MAX_VIRT_CPUS 1 6.17 @@ -48,11 +41,6 @@ typedef struct { 6.18 6.19 #define INVALID_MFN (~0UL) 6.20 6.21 - 6.22 -typedef struct 6.23 -{ 6.24 -} PACKED cpu_user_regs; 6.25 - 6.26 /* 6.27 * NB. This may become a 64-bit count with no shift. If this happens then the 6.28 * structure size will still be 8 bytes, so no other alignments will change. 6.29 @@ -60,7 +48,7 @@ typedef struct 6.30 typedef struct { 6.31 unsigned int tsc_bits; /* 0: 32 bits read from the CPU's TSC. */ 6.32 unsigned int tsc_bitshift; /* 4: 'tsc_bits' uses N:N+31 of TSC. */ 6.33 -} PACKED tsc_timestamp_t; /* 8 bytes */ 6.34 +} tsc_timestamp_t; /* 8 bytes */ 6.35 6.36 struct pt_fpreg { 6.37 union { 6.38 @@ -183,20 +171,20 @@ typedef struct { 6.39 unsigned long pkrs[8]; // protection key registers 6.40 unsigned long tmp[8]; // temp registers (e.g. for hyperprivops) 6.41 int evtchn_vector; 6.42 -//} PACKED arch_vcpu_info_t; 6.43 -} arch_vcpu_info_t; // DON'T PACK 6.44 +} arch_vcpu_info_t; 6.45 +#define __ARCH_HAS_VCPU_INFO 6.46 6.47 typedef struct { 6.48 int domain_controller_evtchn; 6.49 unsigned int flags; 6.50 -//} PACKED arch_shared_info_t; 6.51 +//} arch_shared_info_t; 6.52 } arch_shared_info_t; // DON'T PACK 6.53 6.54 typedef struct vcpu_guest_context { 6.55 struct pt_regs regs; 6.56 arch_vcpu_info_t vcpu; 6.57 arch_shared_info_t shared; 6.58 -} PACKED vcpu_guest_context_t; 6.59 +} vcpu_guest_context_t; 6.60 6.61 #endif /* !__ASSEMBLY__ */ 6.62
7.1 --- a/xen/include/public/arch-x86_32.h Fri Jul 01 21:25:45 2005 +0000 7.2 +++ b/xen/include/public/arch-x86_32.h Sat Jul 02 08:41:48 2005 +0000 7.3 @@ -9,21 +9,6 @@ 7.4 #ifndef __XEN_PUBLIC_ARCH_X86_32_H__ 7.5 #define __XEN_PUBLIC_ARCH_X86_32_H__ 7.6 7.7 -#ifndef PACKED 7.8 -/* GCC-specific way to pack structure definitions (no implicit padding). */ 7.9 -#define PACKED __attribute__ ((packed)) 7.10 -#endif 7.11 - 7.12 -/* 7.13 - * Pointers and other address fields inside interface structures are padded to 7.14 - * 64 bits. This means that field alignments aren't different between 32- and 7.15 - * 64-bit architectures. 7.16 - */ 7.17 -/* NB. Multi-level macro ensures __LINE__ is expanded before concatenation. */ 7.18 -#define __MEMORY_PADDING(_X) u32 __pad_ ## _X 7.19 -#define _MEMORY_PADDING(_X) __MEMORY_PADDING(_X) 7.20 -#define MEMORY_PADDING _MEMORY_PADDING(__LINE__) 7.21 - 7.22 /* 7.23 * SEGMENT DESCRIPTOR TABLES 7.24 */ 7.25 @@ -88,12 +73,12 @@ typedef unsigned long memory_t; /* Ful 7.26 #define TI_GET_IF(_ti) ((_ti)->flags & 4) 7.27 #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) 7.28 #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) 7.29 -typedef struct { 7.30 - u8 vector; /* 0: exception vector */ 7.31 - u8 flags; /* 1: 0-3: privilege level; 4: clear event enable? */ 7.32 - u16 cs; /* 2: code selector */ 7.33 - memory_t address; /* 4: code address */ 7.34 -} PACKED trap_info_t; /* 8 bytes */ 7.35 +typedef struct trap_info { 7.36 + u8 vector; /* exception vector */ 7.37 + u8 flags; /* 0-3: privilege level; 4: clear event enable? */ 7.38 + u16 cs; /* code selector */ 7.39 + memory_t address; /* code address */ 7.40 +} trap_info_t; 7.41 7.42 typedef struct cpu_user_regs { 7.43 u32 ebx; 7.44 @@ -125,13 +110,13 @@ typedef u64 tsc_timestamp_t; /* RDTSC ti 7.45 * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used. 7.46 */ 7.47 typedef struct vcpu_guest_context { 7.48 + /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */ 7.49 + struct { char x[512]; } fpu_ctxt; /* User-level FPU registers */ 7.50 #define VGCF_I387_VALID (1<<0) 7.51 #define VGCF_VMX_GUEST (1<<1) 7.52 #define VGCF_IN_KERNEL (1<<2) 7.53 unsigned long flags; /* VGCF_* flags */ 7.54 cpu_user_regs_t user_regs; /* User-level CPU registers */ 7.55 - struct { char x[512]; } fpu_ctxt /* User-level FPU registers */ 7.56 - __attribute__((__aligned__(16))); /* (needs 16-byte alignment) */ 7.57 trap_info_t trap_ctxt[256]; /* Virtual IDT */ 7.58 unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */ 7.59 unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ 7.60 @@ -145,14 +130,11 @@ typedef struct vcpu_guest_context { 7.61 unsigned long vm_assist; /* VMASST_TYPE_* bitmap */ 7.62 } vcpu_guest_context_t; 7.63 7.64 -typedef struct { 7.65 +typedef struct arch_shared_info { 7.66 /* MFN of a table of MFNs that make up p2m table */ 7.67 u64 pfn_to_mfn_frame_list; 7.68 } arch_shared_info_t; 7.69 7.70 -typedef struct { 7.71 -} arch_vcpu_info_t; 7.72 - 7.73 #endif 7.74 7.75 #endif
8.1 --- a/xen/include/public/arch-x86_64.h Fri Jul 01 21:25:45 2005 +0000 8.2 +++ b/xen/include/public/arch-x86_64.h Sat Jul 02 08:41:48 2005 +0000 8.3 @@ -9,15 +9,6 @@ 8.4 #ifndef __XEN_PUBLIC_ARCH_X86_64_H__ 8.5 #define __XEN_PUBLIC_ARCH_X86_64_H__ 8.6 8.7 -#ifndef PACKED 8.8 -/* GCC-specific way to pack structure definitions (no implicit padding). */ 8.9 -#define PACKED __attribute__ ((packed)) 8.10 -#endif 8.11 - 8.12 -/* Pointers are naturally 64 bits in this architecture; no padding needed. */ 8.13 -#define _MEMORY_PADDING(_X) 8.14 -#define MEMORY_PADDING 8.15 - 8.16 /* 8.17 * SEGMENT DESCRIPTOR TABLES 8.18 */ 8.19 @@ -110,7 +101,7 @@ struct switch_to_user { 8.20 /* Top of stack (%rsp at point of hypercall). */ 8.21 u64 rax, r11, rcx, flags, rip, cs, rflags, rsp, ss; 8.22 /* Bottom of switch_to_user stack frame. */ 8.23 -} PACKED; 8.24 +}; 8.25 8.26 /* NB. Both the following are 64 bits each. */ 8.27 typedef unsigned long memory_t; /* Full-sized pointer/address/memory-size. */ 8.28 @@ -129,13 +120,12 @@ typedef unsigned long memory_t; /* Ful 8.29 #define TI_GET_IF(_ti) ((_ti)->flags & 4) 8.30 #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) 8.31 #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) 8.32 -typedef struct { 8.33 - u8 vector; /* 0: exception vector */ 8.34 - u8 flags; /* 1: 0-3: privilege level; 4: clear event enable? */ 8.35 - u16 cs; /* 2: code selector */ 8.36 - u32 __pad; /* 4 */ 8.37 - memory_t address; /* 8: code address */ 8.38 -} PACKED trap_info_t; /* 16 bytes */ 8.39 +typedef struct trap_info { 8.40 + u8 vector; /* exception vector */ 8.41 + u8 flags; /* 0-3: privilege level; 4: clear event enable? */ 8.42 + u16 cs; /* code selector */ 8.43 + memory_t address; /* code address */ 8.44 +} trap_info_t; 8.45 8.46 typedef struct cpu_user_regs { 8.47 u64 r15; 8.48 @@ -175,13 +165,13 @@ typedef u64 tsc_timestamp_t; /* RDTSC ti 8.49 * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used. 8.50 */ 8.51 typedef struct vcpu_guest_context { 8.52 + /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */ 8.53 + struct { char x[512]; } fpu_ctxt; /* User-level FPU registers */ 8.54 #define VGCF_I387_VALID (1<<0) 8.55 #define VGCF_VMX_GUEST (1<<1) 8.56 #define VGCF_IN_KERNEL (1<<2) 8.57 unsigned long flags; /* VGCF_* flags */ 8.58 cpu_user_regs_t user_regs; /* User-level CPU registers */ 8.59 - struct { char x[512]; } fpu_ctxt /* User-level FPU registers */ 8.60 - __attribute__((__aligned__(16))); /* (needs 16-byte alignment) */ 8.61 trap_info_t trap_ctxt[256]; /* Virtual IDT */ 8.62 unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */ 8.63 unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ 8.64 @@ -198,14 +188,11 @@ typedef struct vcpu_guest_context { 8.65 u64 gs_base_user; 8.66 } vcpu_guest_context_t; 8.67 8.68 -typedef struct { 8.69 +typedef struct arch_shared_info { 8.70 /* MFN of a table of MFNs that make up p2m table */ 8.71 u64 pfn_to_mfn_frame_list; 8.72 } arch_shared_info_t; 8.73 8.74 -typedef struct { 8.75 -} arch_vcpu_info_t; 8.76 - 8.77 #endif /* !__ASSEMBLY__ */ 8.78 8.79 #endif
9.1 --- a/xen/include/public/dom0_ops.h Fri Jul 01 21:25:45 2005 +0000 9.2 +++ b/xen/include/public/dom0_ops.h Sat Jul 02 08:41:48 2005 +0000 9.3 @@ -19,7 +19,7 @@ 9.4 * This makes sure that old versions of dom0 tools will stop working in a 9.5 * well-defined way (rather than crashing the machine, for instance). 9.6 */ 9.7 -#define DOM0_INTERFACE_VERSION 0xAAAA1008 9.8 +#define DOM0_INTERFACE_VERSION 0xAAAA1009 9.9 9.10 /************************************************************************/ 9.11
10.1 --- a/xen/include/public/event_channel.h Fri Jul 01 21:25:45 2005 +0000 10.2 +++ b/xen/include/public/event_channel.h Sat Jul 02 08:41:48 2005 +0000 10.3 @@ -15,13 +15,12 @@ 10.4 * will be allocated, and the field filled in on return. 10.5 */ 10.6 #define EVTCHNOP_alloc_unbound 6 10.7 -typedef struct { 10.8 +typedef struct evtchn_alloc_unbound { 10.9 /* IN parameters */ 10.10 - domid_t dom; /* 0 */ 10.11 - u16 __pad; 10.12 + domid_t dom; 10.13 /* IN/OUT parameters */ 10.14 - u32 port; /* 4 */ 10.15 -} PACKED evtchn_alloc_unbound_t; /* 8 bytes */ 10.16 + u32 port; 10.17 +} evtchn_alloc_unbound_t; 10.18 10.19 /* 10.20 * EVTCHNOP_bind_interdomain: Construct an interdomain event channel between 10.21 @@ -44,12 +43,12 @@ typedef struct { 10.22 * be closed or unbound. 10.23 */ 10.24 #define EVTCHNOP_bind_interdomain 0 10.25 -typedef struct { 10.26 +typedef struct evtchn_bind_interdomain { 10.27 /* IN parameters. */ 10.28 - domid_t dom1, dom2; /* 0, 2 */ 10.29 + domid_t dom1, dom2; 10.30 /* IN/OUT parameters. */ 10.31 - u32 port1, port2; /* 4, 8 */ 10.32 -} PACKED evtchn_bind_interdomain_t; /* 12 bytes */ 10.33 + u32 port1, port2; 10.34 +} evtchn_bind_interdomain_t; 10.35 10.36 /* 10.37 * EVTCHNOP_bind_virq: Bind a local event channel to IRQ <irq> on calling vcpu. 10.38 @@ -59,12 +58,12 @@ typedef struct { 10.39 * may not be changed. 10.40 */ 10.41 #define EVTCHNOP_bind_virq 1 10.42 -typedef struct { 10.43 +typedef struct evtchn_bind_virq { 10.44 /* IN parameters. */ 10.45 - u32 virq; /* 0 */ 10.46 + u32 virq; 10.47 /* OUT parameters. */ 10.48 - u32 port; /* 4 */ 10.49 -} PACKED evtchn_bind_virq_t; /* 8 bytes */ 10.50 + u32 port; 10.51 +} evtchn_bind_virq_t; 10.52 10.53 /* 10.54 * EVTCHNOP_bind_pirq: Bind a local event channel to IRQ <irq>. 10.55 @@ -73,14 +72,14 @@ typedef struct { 10.56 * 2. Only a sufficiently-privileged domain may bind to a physical IRQ. 10.57 */ 10.58 #define EVTCHNOP_bind_pirq 2 10.59 -typedef struct { 10.60 +typedef struct evtchn_bind_pirq { 10.61 /* IN parameters. */ 10.62 - u32 pirq; /* 0 */ 10.63 + u32 pirq; 10.64 #define BIND_PIRQ__WILL_SHARE 1 10.65 - u32 flags; /* BIND_PIRQ__* */ /* 4 */ 10.66 + u32 flags; /* BIND_PIRQ__* */ 10.67 /* OUT parameters. */ 10.68 - u32 port; /* 8 */ 10.69 -} PACKED evtchn_bind_pirq_t; /* 12 bytes */ 10.70 + u32 port; 10.71 +} evtchn_bind_pirq_t; 10.72 10.73 /* 10.74 * EVTCHNOP_bind_ipi: Bind a local event channel to receive events. 10.75 @@ -89,12 +88,12 @@ typedef struct { 10.76 * may not be changed. 10.77 */ 10.78 #define EVTCHNOP_bind_ipi 7 10.79 -typedef struct { 10.80 +typedef struct evtchn_bind_ipi { 10.81 /* IN parameters. */ 10.82 - u32 ipi_vcpu; /* 0 */ 10.83 + u32 ipi_vcpu; 10.84 /* OUT parameters. */ 10.85 - u32 port; /* 4 */ 10.86 -} PACKED evtchn_bind_ipi_t; /* 8 bytes */ 10.87 + u32 port; 10.88 +} evtchn_bind_ipi_t; 10.89 10.90 /* 10.91 * EVTCHNOP_close: Close the communication channel which has an endpoint at 10.92 @@ -106,24 +105,23 @@ typedef struct { 10.93 * for which <dom> is not DOMID_SELF. 10.94 */ 10.95 #define EVTCHNOP_close 3 10.96 -typedef struct { 10.97 +typedef struct evtchn_close { 10.98 /* IN parameters. */ 10.99 - domid_t dom; /* 0 */ 10.100 - u16 __pad; 10.101 - u32 port; /* 4 */ 10.102 + domid_t dom; 10.103 + u32 port; 10.104 /* No OUT parameters. */ 10.105 -} PACKED evtchn_close_t; /* 8 bytes */ 10.106 +} evtchn_close_t; 10.107 10.108 /* 10.109 * EVTCHNOP_send: Send an event to the remote end of the channel whose local 10.110 * endpoint is <DOMID_SELF, local_port>. 10.111 */ 10.112 #define EVTCHNOP_send 4 10.113 -typedef struct { 10.114 +typedef struct evtchn_send { 10.115 /* IN parameters. */ 10.116 - u32 local_port; /* 0 */ 10.117 + u32 local_port; 10.118 /* No OUT parameters. */ 10.119 -} PACKED evtchn_send_t; /* 4 bytes */ 10.120 +} evtchn_send_t; 10.121 10.122 /* 10.123 * EVTCHNOP_status: Get the current status of the communication channel which 10.124 @@ -134,11 +132,10 @@ typedef struct { 10.125 * channel for which <dom> is not DOMID_SELF. 10.126 */ 10.127 #define EVTCHNOP_status 5 10.128 -typedef struct { 10.129 +typedef struct evtchn_status { 10.130 /* IN parameters */ 10.131 - domid_t dom; /* 0 */ 10.132 - u16 __pad; 10.133 - u32 port; /* 4 */ 10.134 + domid_t dom; 10.135 + u32 port; 10.136 /* OUT parameters */ 10.137 #define EVTCHNSTAT_closed 0 /* Channel is not in use. */ 10.138 #define EVTCHNSTAT_unbound 1 /* Channel is waiting interdom connection.*/ 10.139 @@ -146,26 +143,24 @@ typedef struct { 10.140 #define EVTCHNSTAT_pirq 3 /* Channel is bound to a phys IRQ line. */ 10.141 #define EVTCHNSTAT_virq 4 /* Channel is bound to a virtual IRQ line */ 10.142 #define EVTCHNSTAT_ipi 5 /* Channel is bound to a virtual IPI line */ 10.143 - u32 status; /* 8 */ 10.144 - union { /* 12 */ 10.145 + u32 status; 10.146 + union { 10.147 struct { 10.148 - domid_t dom; /* 12 */ 10.149 - } PACKED unbound; /* EVTCHNSTAT_unbound */ 10.150 + domid_t dom; 10.151 + } unbound; /* EVTCHNSTAT_unbound */ 10.152 struct { 10.153 - domid_t dom; /* 12 */ 10.154 - u16 __pad; 10.155 - u32 port; /* 16 */ 10.156 - } PACKED interdomain; /* EVTCHNSTAT_interdomain */ 10.157 - u32 pirq; /* EVTCHNSTAT_pirq */ /* 12 */ 10.158 - u32 virq; /* EVTCHNSTAT_virq */ /* 12 */ 10.159 - u32 ipi_vcpu; /* EVTCHNSTAT_ipi */ /* 12 */ 10.160 - } PACKED u; 10.161 -} PACKED evtchn_status_t; /* 20 bytes */ 10.162 + domid_t dom; 10.163 + u32 port; 10.164 + } interdomain; /* EVTCHNSTAT_interdomain */ 10.165 + u32 pirq; /* EVTCHNSTAT_pirq */ 10.166 + u32 virq; /* EVTCHNSTAT_virq */ 10.167 + u32 ipi_vcpu; /* EVTCHNSTAT_ipi */ 10.168 + } u; 10.169 +} evtchn_status_t; 10.170 10.171 -typedef struct { 10.172 - u32 cmd; /* EVTCHNOP_* */ /* 0 */ 10.173 - u32 __reserved; /* 4 */ 10.174 - union { /* 8 */ 10.175 +typedef struct evtchn_op { 10.176 + u32 cmd; /* EVTCHNOP_* */ 10.177 + union { 10.178 evtchn_alloc_unbound_t alloc_unbound; 10.179 evtchn_bind_interdomain_t bind_interdomain; 10.180 evtchn_bind_virq_t bind_virq; 10.181 @@ -174,8 +169,7 @@ typedef struct { 10.182 evtchn_close_t close; 10.183 evtchn_send_t send; 10.184 evtchn_status_t status; 10.185 - u8 __dummy[24]; 10.186 - } PACKED u; 10.187 -} PACKED evtchn_op_t; /* 32 bytes */ 10.188 + } u; 10.189 +} evtchn_op_t; 10.190 10.191 #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
11.1 --- a/xen/include/public/grant_table.h Fri Jul 01 21:25:45 2005 +0000 11.2 +++ b/xen/include/public/grant_table.h Sat Jul 02 08:41:48 2005 +0000 11.3 @@ -71,17 +71,17 @@ 11.4 * [XEN]: This field is written by Xen and read by the sharing guest. 11.5 * [GST]: This field is written by the guest and read by Xen. 11.6 */ 11.7 -typedef struct { 11.8 +typedef struct grant_entry { 11.9 /* GTF_xxx: various type and flag information. [XEN,GST] */ 11.10 - u16 flags; /* 0 */ 11.11 + u16 flags; 11.12 /* The domain being granted foreign privileges. [GST] */ 11.13 - domid_t domid; /* 2 */ 11.14 + domid_t domid; 11.15 /* 11.16 * GTF_permit_access: Frame that @domid is allowed to map and access. [GST] 11.17 * GTF_accept_transfer: Frame whose ownership transferred by @domid. [XEN] 11.18 */ 11.19 - u32 frame; /* 4 */ 11.20 -} PACKED grant_entry_t; /* 8 bytes */ 11.21 + u32 frame; 11.22 +} grant_entry_t; 11.23 11.24 /* 11.25 * Type of grant entry. 11.26 @@ -148,18 +148,16 @@ typedef u16 grant_ref_t; 11.27 * to be accounted to the correct grant reference! 11.28 */ 11.29 #define GNTTABOP_map_grant_ref 0 11.30 -typedef struct { 11.31 +typedef struct gnttab_map_grant_ref { 11.32 /* IN parameters. */ 11.33 - memory_t host_virt_addr; /* 0 */ 11.34 - MEMORY_PADDING; 11.35 - domid_t dom; /* 8 */ 11.36 - grant_ref_t ref; /* 10 */ 11.37 - u16 flags; /* 12: GNTMAP_* */ 11.38 + memory_t host_virt_addr; 11.39 + domid_t dom; 11.40 + grant_ref_t ref; 11.41 + u16 flags; /* GNTMAP_* */ 11.42 /* OUT parameters. */ 11.43 - s16 handle; /* 14: +ve: handle; -ve: GNTST_* */ 11.44 - memory_t dev_bus_addr; /* 16 */ 11.45 - MEMORY_PADDING; 11.46 -} PACKED gnttab_map_grant_ref_t; /* 24 bytes */ 11.47 + s16 handle; /* +ve: handle; -ve: GNTST_* */ 11.48 + memory_t dev_bus_addr; 11.49 +} gnttab_map_grant_ref_t; 11.50 11.51 /* 11.52 * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings 11.53 @@ -173,17 +171,14 @@ typedef struct { 11.54 * mappings will remain in the device or host TLBs. 11.55 */ 11.56 #define GNTTABOP_unmap_grant_ref 1 11.57 -typedef struct { 11.58 +typedef struct gnttab_unmap_grant_ref { 11.59 /* IN parameters. */ 11.60 - memory_t host_virt_addr; /* 0 */ 11.61 - MEMORY_PADDING; 11.62 - memory_t dev_bus_addr; /* 8 */ 11.63 - MEMORY_PADDING; 11.64 - u16 handle; /* 16 */ 11.65 + memory_t host_virt_addr; 11.66 + memory_t dev_bus_addr; 11.67 + u16 handle; 11.68 /* OUT parameters. */ 11.69 - s16 status; /* 18: GNTST_* */ 11.70 - u32 __pad; 11.71 -} PACKED gnttab_unmap_grant_ref_t; /* 24 bytes */ 11.72 + s16 status; /* GNTST_* */ 11.73 +} gnttab_unmap_grant_ref_t; 11.74 11.75 #define GNTUNMAP_DEV_FROM_VIRT (~0U) 11.76 11.77 @@ -197,28 +192,26 @@ typedef struct { 11.78 * 3. Xen may not support more than a single grant-table page per domain. 11.79 */ 11.80 #define GNTTABOP_setup_table 2 11.81 -typedef struct { 11.82 +typedef struct gnttab_setup_table { 11.83 /* IN parameters. */ 11.84 - domid_t dom; /* 0 */ 11.85 - u16 nr_frames; /* 2 */ 11.86 - u16 __pad; 11.87 + domid_t dom; 11.88 + u16 nr_frames; 11.89 /* OUT parameters. */ 11.90 - s16 status; /* 6: GNTST_* */ 11.91 - unsigned long *frame_list; /* 8 */ 11.92 - MEMORY_PADDING; 11.93 -} PACKED gnttab_setup_table_t; /* 16 bytes */ 11.94 + s16 status; /* GNTST_* */ 11.95 + unsigned long *frame_list; 11.96 +} gnttab_setup_table_t; 11.97 11.98 /* 11.99 * GNTTABOP_dump_table: Dump the contents of the grant table to the 11.100 * xen console. Debugging use only. 11.101 */ 11.102 #define GNTTABOP_dump_table 3 11.103 -typedef struct { 11.104 +typedef struct gnttab_dump_table { 11.105 /* IN parameters. */ 11.106 - domid_t dom; /* 0 */ 11.107 + domid_t dom; 11.108 /* OUT parameters. */ 11.109 - s16 status; /* 2: GNTST_* */ 11.110 -} PACKED gnttab_dump_table_t; /* 4 bytes */ 11.111 + s16 status; /* GNTST_* */ 11.112 +} gnttab_dump_table_t; 11.113 11.114 11.115 /* 11.116 @@ -265,16 +258,14 @@ typedef struct { 11.117 "no spare translation slot in the I/O MMU", \ 11.118 "permission denied" \ 11.119 } 11.120 - 11.121 - 11.122 -typedef struct { 11.123 - union { /* 0 */ 11.124 + 11.125 +typedef struct gnttab_op { 11.126 + union { 11.127 gnttab_map_grant_ref_t map_grant_ref; 11.128 gnttab_unmap_grant_ref_t unmap_grant_ref; 11.129 gnttab_setup_table_t setup_table; 11.130 gnttab_dump_table_t dump_table; 11.131 - u8 __dummy[24]; 11.132 - } PACKED u; 11.133 -} PACKED gnttab_op_t; /* 32 bytes */ 11.134 + } u; 11.135 +} gnttab_op_t; 11.136 11.137 #endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
12.1 --- a/xen/include/public/io/blkif.h Fri Jul 01 21:25:45 2005 +0000 12.2 +++ b/xen/include/public/io/blkif.h Sat Jul 02 08:41:48 2005 +0000 12.3 @@ -28,12 +28,12 @@ 12.4 */ 12.5 #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 12.6 12.7 -typedef struct { 12.8 - u8 operation; /* 0: BLKIF_OP_??? */ 12.9 - u8 nr_segments; /* 1: number of segments */ 12.10 - blkif_vdev_t device; /* 2: only for read/write requests */ 12.11 - unsigned long id; /* 4: private guest value, echoed in resp */ 12.12 - blkif_sector_t sector_number; /* start sector idx on disk (r/w only) */ 12.13 +typedef struct blkif_request { 12.14 + u8 operation; /* BLKIF_OP_??? */ 12.15 + u8 nr_segments; /* number of segments */ 12.16 + blkif_vdev_t device; /* only for read/write requests */ 12.17 + unsigned long id; /* private guest value, echoed in resp */ 12.18 + blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ 12.19 /* @f_a_s[2:0]=last_sect ; @f_a_s[5:3]=first_sect */ 12.20 #ifdef CONFIG_XEN_BLKDEV_GRANT 12.21 /* @f_a_s[:16]= grant reference (16 bits) */ 12.22 @@ -43,7 +43,7 @@ typedef struct { 12.23 /* @first_sect: first sector in frame to transfer (inclusive). */ 12.24 /* @last_sect: last sector in frame to transfer (inclusive). */ 12.25 unsigned long frame_and_sects[BLKIF_MAX_SEGMENTS_PER_REQUEST]; 12.26 -} PACKED blkif_request_t; 12.27 +} blkif_request_t; 12.28 12.29 #define blkif_first_sect(_fas) (((_fas)>>3)&7) 12.30 #define blkif_last_sect(_fas) ((_fas)&7) 12.31 @@ -52,11 +52,11 @@ typedef struct { 12.32 #define blkif_gref_from_fas(_fas) ((_fas)>>16) 12.33 #endif 12.34 12.35 -typedef struct { 12.36 +typedef struct blkif_response { 12.37 unsigned long id; /* copied from request */ 12.38 u8 operation; /* copied from request */ 12.39 s16 status; /* BLKIF_RSP_??? */ 12.40 -} PACKED blkif_response_t; 12.41 +} blkif_response_t; 12.42 12.43 #define BLKIF_RSP_ERROR -1 /* non-specific 'error' */ 12.44 #define BLKIF_RSP_OKAY 0 /* non-specific 'okay' */ 12.45 @@ -88,11 +88,10 @@ DEFINE_RING_TYPES(blkif, blkif_request_t 12.46 #define VDISK_READONLY 0x4 12.47 12.48 typedef struct vdisk { 12.49 - blkif_sector_t capacity; /* 0: Size in terms of 512-byte sectors. */ 12.50 - blkif_vdev_t device; /* 8: Device number (opaque 16 bit value). */ 12.51 - u16 info; /* 10: Device type and flags (VDISK_*). */ 12.52 - u16 sector_size; /* 12: Minimum alignment for requests. */ 12.53 - u16 _pad; 12.54 -} PACKED vdisk_t; /* 16 bytes */ 12.55 + blkif_sector_t capacity; /* Size in terms of 512-byte sectors. */ 12.56 + blkif_vdev_t device; /* Device number (opaque 16 bit value). */ 12.57 + u16 info; /* Device type and flags (VDISK_*). */ 12.58 + u16 sector_size; /* Minimum alignment for requests. */ 12.59 +} vdisk_t; /* 16 bytes */ 12.60 12.61 #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
13.1 --- a/xen/include/public/io/domain_controller.h Fri Jul 01 21:25:45 2005 +0000 13.2 +++ b/xen/include/public/io/domain_controller.h Sat Jul 02 08:41:48 2005 +0000 13.3 @@ -16,13 +16,13 @@ 13.4 * CONTROLLER MESSAGING INTERFACE. 13.5 */ 13.6 13.7 -typedef struct { 13.8 +typedef struct control_msg { 13.9 u8 type; /* 0: echoed in response */ 13.10 u8 subtype; /* 1: echoed in response */ 13.11 u8 id; /* 2: echoed in response */ 13.12 u8 length; /* 3: number of bytes in 'msg' */ 13.13 u8 msg[60]; /* 4: type-specific message data */ 13.14 -} PACKED control_msg_t; /* 64 bytes */ 13.15 +} control_msg_t; /* 64 bytes */ 13.16 13.17 /* These are used by the control message deferred ring. */ 13.18 #define CONTROL_RING_SIZE 8 13.19 @@ -38,16 +38,16 @@ typedef u32 CONTROL_RING_IDX; 13.20 #define CONTROL_RING_MEM 520 13.21 DEFINE_RING_TYPES(ctrl, control_msg_t, control_msg_t); 13.22 13.23 -typedef struct { 13.24 +typedef struct control_if { 13.25 union { 13.26 - ctrl_sring_t tx_ring; /* 0: guest -> controller */ 13.27 + ctrl_sring_t tx_ring; /* guest -> controller */ 13.28 char __x[CONTROL_RING_MEM]; 13.29 - } PACKED; 13.30 + }; 13.31 union { 13.32 - ctrl_sring_t rx_ring; /* 520: controller -> guest */ 13.33 + ctrl_sring_t rx_ring; /* controller -> guest */ 13.34 char __y[CONTROL_RING_MEM]; 13.35 - } PACKED; 13.36 -} PACKED control_if_t; /* 1040 bytes */ 13.37 + }; 13.38 +} control_if_t; 13.39 13.40 /* 13.41 * Top-level command types. 13.42 @@ -103,12 +103,12 @@ typedef struct { 13.43 #define BLKIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */ 13.44 #define BLKIF_INTERFACE_STATUS_CONNECTED 2 /* Exists and is connected. */ 13.45 #define BLKIF_INTERFACE_STATUS_CHANGED 3 /* A device has been added or removed. */ 13.46 -typedef struct { 13.47 - u32 handle; /* 0 */ 13.48 - u32 status; /* 4 */ 13.49 - u16 evtchn; /* 8: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.50 - domid_t domid; /* 10: status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.51 -} PACKED blkif_fe_interface_status_t; /* 12 bytes */ 13.52 +typedef struct blkif_fe_interface_status { 13.53 + u32 handle; 13.54 + u32 status; 13.55 + u16 evtchn; /* (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.56 + domid_t domid; /* status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.57 +} blkif_fe_interface_status_t; 13.58 13.59 /* 13.60 * CMSG_BLKIF_FE_DRIVER_STATUS: 13.61 @@ -124,46 +124,44 @@ typedef struct { 13.62 */ 13.63 #define BLKIF_DRIVER_STATUS_DOWN 0 13.64 #define BLKIF_DRIVER_STATUS_UP 1 13.65 -typedef struct { 13.66 +typedef struct blkif_fe_driver_status { 13.67 /* IN */ 13.68 - u32 status; /* 0: BLKIF_DRIVER_STATUS_??? */ 13.69 + u32 status; /* BLKIF_DRIVER_STATUS_??? */ 13.70 /* OUT */ 13.71 /* Driver should query interfaces [0..max_handle]. */ 13.72 - u32 max_handle; /* 4 */ 13.73 -} PACKED blkif_fe_driver_status_t; /* 8 bytes */ 13.74 + u32 max_handle; 13.75 +} blkif_fe_driver_status_t; 13.76 13.77 /* 13.78 * CMSG_BLKIF_FE_INTERFACE_CONNECT: 13.79 * If successful, the domain controller will acknowledge with a 13.80 * STATUS_CONNECTED message. 13.81 */ 13.82 -typedef struct { 13.83 - u32 handle; /* 0 */ 13.84 - u32 __pad; 13.85 - memory_t shmem_frame; /* 8 */ 13.86 - MEMORY_PADDING; 13.87 -} PACKED blkif_fe_interface_connect_t; /* 16 bytes */ 13.88 +typedef struct blkif_fe_interface_connect { 13.89 + u32 handle; 13.90 + memory_t shmem_frame; 13.91 +} blkif_fe_interface_connect_t; 13.92 13.93 /* 13.94 * CMSG_BLKIF_FE_INTERFACE_DISCONNECT: 13.95 * If successful, the domain controller will acknowledge with a 13.96 * STATUS_DISCONNECTED message. 13.97 */ 13.98 -typedef struct { 13.99 - u32 handle; /* 0 */ 13.100 -} PACKED blkif_fe_interface_disconnect_t; /* 4 bytes */ 13.101 +typedef struct blkif_fe_interface_disconnect { 13.102 + u32 handle; 13.103 +} blkif_fe_interface_disconnect_t; 13.104 13.105 /* 13.106 * CMSG_BLKIF_FE_INTERFACE_QUERY: 13.107 */ 13.108 -typedef struct { 13.109 +typedef struct blkif_fe_interface_query { 13.110 /* IN */ 13.111 - u32 handle; /* 0 */ 13.112 + u32 handle; 13.113 /* OUT */ 13.114 - u32 status; /* 4 */ 13.115 - u16 evtchn; /* 8: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.116 - domid_t domid; /* 10: status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.117 -} PACKED blkif_fe_interface_query_t; /* 12 bytes */ 13.118 + u32 status; 13.119 + u16 evtchn; /* (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.120 + domid_t domid; /* status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.121 +} blkif_fe_interface_query_t; 13.122 13.123 13.124 /****************************************************************************** 13.125 @@ -218,14 +216,13 @@ typedef struct { 13.126 * created. The controller will send a DOWN notification to the front-end 13.127 * driver. 13.128 */ 13.129 -typedef struct { 13.130 +typedef struct blkif_be_create { 13.131 /* IN */ 13.132 - domid_t domid; /* 0: Domain attached to new interface. */ 13.133 - u16 __pad; 13.134 - u32 blkif_handle; /* 4: Domain-specific interface handle. */ 13.135 + domid_t domid; /* Domain attached to new interface. */ 13.136 + u32 blkif_handle; /* Domain-specific interface handle. */ 13.137 /* OUT */ 13.138 - u32 status; /* 8 */ 13.139 -} PACKED blkif_be_create_t; /* 12 bytes */ 13.140 + u32 status; 13.141 +} blkif_be_create_t; 13.142 13.143 /* 13.144 * CMSG_BLKIF_BE_DESTROY: 13.145 @@ -233,14 +230,13 @@ typedef struct { 13.146 * torn down. The controller will send a DESTROYED notification to the 13.147 * front-end driver. 13.148 */ 13.149 -typedef struct { 13.150 +typedef struct blkif_be_destroy { 13.151 /* IN */ 13.152 - domid_t domid; /* 0: Identify interface to be destroyed. */ 13.153 - u16 __pad; 13.154 - u32 blkif_handle; /* 4: ...ditto... */ 13.155 + domid_t domid; /* Identify interface to be destroyed. */ 13.156 + u32 blkif_handle; /* ...ditto... */ 13.157 /* OUT */ 13.158 - u32 status; /* 8 */ 13.159 -} PACKED blkif_be_destroy_t; /* 12 bytes */ 13.160 + u32 status; 13.161 +} blkif_be_destroy_t; 13.162 13.163 /* 13.164 * CMSG_BLKIF_BE_CONNECT: 13.165 @@ -248,17 +244,15 @@ typedef struct { 13.166 * connected. The controller will send a CONNECTED notification to the 13.167 * front-end driver. 13.168 */ 13.169 -typedef struct { 13.170 +typedef struct blkif_be_connect { 13.171 /* IN */ 13.172 - domid_t domid; /* 0: Domain attached to new interface. */ 13.173 - u16 __pad; 13.174 - u32 blkif_handle; /* 4: Domain-specific interface handle. */ 13.175 - memory_t shmem_frame; /* 8: Page cont. shared comms window. */ 13.176 - MEMORY_PADDING; 13.177 - u32 evtchn; /* 16: Event channel for notifications. */ 13.178 + domid_t domid; /* Domain attached to new interface. */ 13.179 + u32 blkif_handle; /* Domain-specific interface handle. */ 13.180 + memory_t shmem_frame; /* Page cont. shared comms window. */ 13.181 + u32 evtchn; /* Event channel for notifications. */ 13.182 /* OUT */ 13.183 - u32 status; /* 20 */ 13.184 -} PACKED blkif_be_connect_t; /* 24 bytes */ 13.185 + u32 status; 13.186 +} blkif_be_connect_t; 13.187 13.188 /* 13.189 * CMSG_BLKIF_BE_DISCONNECT: 13.190 @@ -266,40 +260,36 @@ typedef struct { 13.191 * disconnected. The controller will send a DOWN notification to the front-end 13.192 * driver. 13.193 */ 13.194 -typedef struct { 13.195 +typedef struct blkif_be_disconnect { 13.196 /* IN */ 13.197 - domid_t domid; /* 0: Domain attached to new interface. */ 13.198 - u16 __pad; 13.199 - u32 blkif_handle; /* 4: Domain-specific interface handle. */ 13.200 + domid_t domid; /* Domain attached to new interface. */ 13.201 + u32 blkif_handle; /* Domain-specific interface handle. */ 13.202 /* OUT */ 13.203 - u32 status; /* 8 */ 13.204 -} PACKED blkif_be_disconnect_t; /* 12 bytes */ 13.205 + u32 status; 13.206 +} blkif_be_disconnect_t; 13.207 13.208 /* CMSG_BLKIF_BE_VBD_CREATE */ 13.209 -typedef struct { 13.210 +typedef struct blkif_be_vbd_create { 13.211 /* IN */ 13.212 - domid_t domid; /* 0: Identify blkdev interface. */ 13.213 - u16 __pad; 13.214 - u32 blkif_handle; /* 4: ...ditto... */ 13.215 - blkif_pdev_t pdevice; /* 8 */ 13.216 - u32 dev_handle; /* 12: Extended device id field. */ 13.217 - blkif_vdev_t vdevice; /* 16: Interface-specific id for this VBD. */ 13.218 - u16 readonly; /* 18: Non-zero -> VBD isn't writable. */ 13.219 + domid_t domid; /* Identify blkdev interface. */ 13.220 + u32 blkif_handle; /* ...ditto... */ 13.221 + blkif_pdev_t pdevice; 13.222 + u32 dev_handle; /* Extended device id field. */ 13.223 + blkif_vdev_t vdevice; /* Interface-specific id for this VBD. */ 13.224 + u16 readonly; /* Non-zero -> VBD isn't writable. */ 13.225 /* OUT */ 13.226 - u32 status; /* 20 */ 13.227 -} PACKED blkif_be_vbd_create_t; /* 24 bytes */ 13.228 + u32 status; 13.229 +} blkif_be_vbd_create_t; 13.230 13.231 /* CMSG_BLKIF_BE_VBD_DESTROY */ 13.232 -typedef struct { 13.233 +typedef struct blkif_be_vbd_destroy { 13.234 /* IN */ 13.235 - domid_t domid; /* 0: Identify blkdev interface. */ 13.236 - u16 __pad0; /* 2 */ 13.237 - u32 blkif_handle; /* 4: ...ditto... */ 13.238 - blkif_vdev_t vdevice; /* 8: Interface-specific id of the VBD. */ 13.239 - u16 __pad1; /* 10 */ 13.240 + domid_t domid; /* Identify blkdev interface. */ 13.241 + u32 blkif_handle; /* ...ditto... */ 13.242 + blkif_vdev_t vdevice; /* Interface-specific id of the VBD. */ 13.243 /* OUT */ 13.244 - u32 status; /* 12 */ 13.245 -} PACKED blkif_be_vbd_destroy_t; /* 16 bytes */ 13.246 + u32 status; 13.247 +} blkif_be_vbd_destroy_t; 13.248 13.249 /* 13.250 * CMSG_BLKIF_BE_DRIVER_STATUS: 13.251 @@ -307,9 +297,9 @@ typedef struct { 13.252 * If the driver goes DOWN while interfaces are still UP, the controller 13.253 * will automatically send DOWN notifications. 13.254 */ 13.255 -typedef struct { 13.256 - u32 status; /* 0: BLKIF_DRIVER_STATUS_??? */ 13.257 -} PACKED blkif_be_driver_status_t; /* 4 bytes */ 13.258 +typedef struct blkif_be_driver_status { 13.259 + u32 status; /* BLKIF_DRIVER_STATUS_??? */ 13.260 +} blkif_be_driver_status_t; 13.261 13.262 13.263 /****************************************************************************** 13.264 @@ -336,13 +326,13 @@ typedef struct { 13.265 #define NETIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */ 13.266 #define NETIF_INTERFACE_STATUS_CONNECTED 2 /* Exists and is connected. */ 13.267 #define NETIF_INTERFACE_STATUS_CHANGED 3 /* A device has been added or removed. */ 13.268 -typedef struct { 13.269 - u32 handle; /* 0 */ 13.270 - u32 status; /* 4 */ 13.271 - u16 evtchn; /* 8: status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.272 - u8 mac[6]; /* 10: status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.273 - domid_t domid; /* 16: status != NETIF_INTERFACE_STATUS_DESTROYED */ 13.274 -} PACKED netif_fe_interface_status_t; /* 18 bytes */ 13.275 +typedef struct netif_fe_interface_status { 13.276 + u32 handle; 13.277 + u32 status; 13.278 + u16 evtchn; /* status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.279 + u8 mac[6]; /* status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.280 + domid_t domid; /* status != NETIF_INTERFACE_STATUS_DESTROYED */ 13.281 +} netif_fe_interface_status_t; 13.282 13.283 /* 13.284 * CMSG_NETIF_FE_DRIVER_STATUS: 13.285 @@ -358,49 +348,46 @@ typedef struct { 13.286 */ 13.287 #define NETIF_DRIVER_STATUS_DOWN 0 13.288 #define NETIF_DRIVER_STATUS_UP 1 13.289 -typedef struct { 13.290 +typedef struct netif_fe_driver_status { 13.291 /* IN */ 13.292 - u32 status; /* 0: NETIF_DRIVER_STATUS_??? */ 13.293 + u32 status; /* NETIF_DRIVER_STATUS_??? */ 13.294 /* OUT */ 13.295 /* Driver should query interfaces [0..max_handle]. */ 13.296 - u32 max_handle; /* 4 */ 13.297 -} PACKED netif_fe_driver_status_t; /* 8 bytes */ 13.298 + u32 max_handle; 13.299 +} netif_fe_driver_status_t; 13.300 13.301 /* 13.302 * CMSG_NETIF_FE_INTERFACE_CONNECT: 13.303 * If successful, the domain controller will acknowledge with a 13.304 * STATUS_CONNECTED message. 13.305 */ 13.306 -typedef struct { 13.307 - u32 handle; /* 0 */ 13.308 - u32 __pad; /* 4 */ 13.309 - memory_t tx_shmem_frame; /* 8 */ 13.310 - MEMORY_PADDING; 13.311 - memory_t rx_shmem_frame; /* 16 */ 13.312 - MEMORY_PADDING; 13.313 -} PACKED netif_fe_interface_connect_t; /* 24 bytes */ 13.314 +typedef struct netif_fe_interface_connect { 13.315 + u32 handle; 13.316 + memory_t tx_shmem_frame; 13.317 + memory_t rx_shmem_frame; 13.318 +} netif_fe_interface_connect_t; 13.319 13.320 /* 13.321 * CMSG_NETIF_FE_INTERFACE_DISCONNECT: 13.322 * If successful, the domain controller will acknowledge with a 13.323 * STATUS_DISCONNECTED message. 13.324 */ 13.325 -typedef struct { 13.326 - u32 handle; /* 0 */ 13.327 -} PACKED netif_fe_interface_disconnect_t; /* 4 bytes */ 13.328 +typedef struct netif_fe_interface_disconnect { 13.329 + u32 handle; 13.330 +} netif_fe_interface_disconnect_t; 13.331 13.332 /* 13.333 * CMSG_NETIF_FE_INTERFACE_QUERY: 13.334 */ 13.335 -typedef struct { 13.336 +typedef struct netif_fe_interface_query { 13.337 /* IN */ 13.338 - u32 handle; /* 0 */ 13.339 + u32 handle; 13.340 /* OUT */ 13.341 - u32 status; /* 4 */ 13.342 - u16 evtchn; /* 8: status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.343 - u8 mac[6]; /* 10: status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.344 - domid_t domid; /* 16: status != NETIF_INTERFACE_STATUS_DESTROYED */ 13.345 -} PACKED netif_fe_interface_query_t; /* 18 bytes */ 13.346 + u32 status; 13.347 + u16 evtchn; /* status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.348 + u8 mac[6]; /* status == NETIF_INTERFACE_STATUS_CONNECTED */ 13.349 + domid_t domid; /* status != NETIF_INTERFACE_STATUS_DESTROYED */ 13.350 +} netif_fe_interface_query_t; 13.351 13.352 13.353 /****************************************************************************** 13.354 @@ -448,18 +435,15 @@ typedef struct { 13.355 * created. The controller will send a DOWN notification to the front-end 13.356 * driver. 13.357 */ 13.358 -typedef struct { 13.359 +typedef struct netif_be_create { 13.360 /* IN */ 13.361 - domid_t domid; /* 0: Domain attached to new interface. */ 13.362 - u16 __pad0; /* 2 */ 13.363 - u32 netif_handle; /* 4: Domain-specific interface handle. */ 13.364 - u8 mac[6]; /* 8 */ 13.365 - u16 __pad1; /* 14 */ 13.366 - u8 be_mac[6]; /* 16 */ 13.367 - u16 __pad2; /* 22 */ 13.368 + domid_t domid; /* Domain attached to new interface. */ 13.369 + u32 netif_handle; /* Domain-specific interface handle. */ 13.370 + u8 mac[6]; 13.371 + u8 be_mac[6]; 13.372 /* OUT */ 13.373 - u32 status; /* 24 */ 13.374 -} PACKED netif_be_create_t; /* 28 bytes */ 13.375 + u32 status; 13.376 +} netif_be_create_t; 13.377 13.378 /* 13.379 * CMSG_NETIF_BE_DESTROY: 13.380 @@ -467,30 +451,28 @@ typedef struct { 13.381 * torn down. The controller will send a DESTROYED notification to the 13.382 * front-end driver. 13.383 */ 13.384 -typedef struct { 13.385 +typedef struct netif_be_destroy { 13.386 /* IN */ 13.387 - domid_t domid; /* 0: Identify interface to be destroyed. */ 13.388 - u16 __pad; 13.389 - u32 netif_handle; /* 4: ...ditto... */ 13.390 + domid_t domid; /* Identify interface to be destroyed. */ 13.391 + u32 netif_handle; /* ...ditto... */ 13.392 /* OUT */ 13.393 - u32 status; /* 8 */ 13.394 -} PACKED netif_be_destroy_t; /* 12 bytes */ 13.395 + u32 status; 13.396 +} netif_be_destroy_t; 13.397 13.398 /* 13.399 * CMSG_NETIF_BE_CREDITLIMIT: 13.400 * Limit a virtual interface to "credit_bytes" bytes per "period_usec" 13.401 * microseconds. 13.402 */ 13.403 -typedef struct { 13.404 +typedef struct netif_be_creditlimit { 13.405 /* IN */ 13.406 - domid_t domid; /* 0: Domain attached to new interface. */ 13.407 - u16 __pad0; /* 2 */ 13.408 - u32 netif_handle; /* 4: Domain-specific interface handle. */ 13.409 - u32 credit_bytes; /* 8: Vifs credit of bytes per period. */ 13.410 - u32 period_usec; /* 12: Credit replenishment period. */ 13.411 + domid_t domid; /* Domain attached to new interface. */ 13.412 + u32 netif_handle; /* Domain-specific interface handle. */ 13.413 + u32 credit_bytes; /* Vifs credit of bytes per period. */ 13.414 + u32 period_usec; /* Credit replenishment period. */ 13.415 /* OUT */ 13.416 - u32 status; /* 16 */ 13.417 -} PACKED netif_be_creditlimit_t; /* 20 bytes */ 13.418 + u32 status; 13.419 +} netif_be_creditlimit_t; 13.420 13.421 /* 13.422 * CMSG_NETIF_BE_CONNECT: 13.423 @@ -498,20 +480,16 @@ typedef struct { 13.424 * connected. The controller will send a CONNECTED notification to the 13.425 * front-end driver. 13.426 */ 13.427 -typedef struct { 13.428 +typedef struct netif_be_connect { 13.429 /* IN */ 13.430 - domid_t domid; /* 0: Domain attached to new interface. */ 13.431 - u16 __pad0; /* 2 */ 13.432 - u32 netif_handle; /* 4: Domain-specific interface handle. */ 13.433 - memory_t tx_shmem_frame; /* 8: Page cont. tx shared comms window. */ 13.434 - MEMORY_PADDING; 13.435 - memory_t rx_shmem_frame; /* 16: Page cont. rx shared comms window. */ 13.436 - MEMORY_PADDING; 13.437 - u16 evtchn; /* 24: Event channel for notifications. */ 13.438 - u16 __pad1; /* 26 */ 13.439 + domid_t domid; /* Domain attached to new interface. */ 13.440 + u32 netif_handle; /* Domain-specific interface handle. */ 13.441 + memory_t tx_shmem_frame; /* Page cont. tx shared comms window. */ 13.442 + memory_t rx_shmem_frame; /* Page cont. rx shared comms window. */ 13.443 + u16 evtchn; /* Event channel for notifications. */ 13.444 /* OUT */ 13.445 - u32 status; /* 28 */ 13.446 -} PACKED netif_be_connect_t; /* 32 bytes */ 13.447 + u32 status; 13.448 +} netif_be_connect_t; 13.449 13.450 /* 13.451 * CMSG_NETIF_BE_DISCONNECT: 13.452 @@ -519,14 +497,13 @@ typedef struct { 13.453 * disconnected. The controller will send a DOWN notification to the front-end 13.454 * driver. 13.455 */ 13.456 -typedef struct { 13.457 +typedef struct netif_be_disconnect { 13.458 /* IN */ 13.459 - domid_t domid; /* 0: Domain attached to new interface. */ 13.460 - u16 __pad; 13.461 - u32 netif_handle; /* 4: Domain-specific interface handle. */ 13.462 + domid_t domid; /* Domain attached to new interface. */ 13.463 + u32 netif_handle; /* Domain-specific interface handle. */ 13.464 /* OUT */ 13.465 - u32 status; /* 8 */ 13.466 -} PACKED netif_be_disconnect_t; /* 12 bytes */ 13.467 + u32 status; 13.468 +} netif_be_disconnect_t; 13.469 13.470 /* 13.471 * CMSG_NETIF_BE_DRIVER_STATUS: 13.472 @@ -534,9 +511,9 @@ typedef struct { 13.473 * If the driver goes DOWN while interfaces are still UP, the domain 13.474 * will automatically send DOWN notifications. 13.475 */ 13.476 -typedef struct { 13.477 - u32 status; /* 0: NETIF_DRIVER_STATUS_??? */ 13.478 -} PACKED netif_be_driver_status_t; /* 4 bytes */ 13.479 +typedef struct netif_be_driver_status { 13.480 + u32 status; /* NETIF_DRIVER_STATUS_??? */ 13.481 +} netif_be_driver_status_t; 13.482 13.483 13.484 13.485 @@ -561,13 +538,13 @@ typedef struct { 13.486 #define USBIF_INTERFACE_STATUS_DESTROYED 0 /* Interface doesn't exist. */ 13.487 #define USBIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */ 13.488 #define USBIF_INTERFACE_STATUS_CONNECTED 2 /* Exists and is connected. */ 13.489 -typedef struct { 13.490 - u32 status; /* 0 */ 13.491 - u16 evtchn; /* 4: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.492 - domid_t domid; /* 6: status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.493 - u32 bandwidth; /* 8 */ 13.494 - u32 num_ports; /* 12 */ 13.495 -} PACKED usbif_fe_interface_status_changed_t; /* 12 bytes */ 13.496 +typedef struct usbif_fe_interface_status_changed { 13.497 + u32 status; 13.498 + u16 evtchn; /* (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */ 13.499 + domid_t domid; /* status != BLKIF_INTERFACE_STATUS_DESTROYED */ 13.500 + u32 bandwidth; 13.501 + u32 num_ports; 13.502 +} usbif_fe_interface_status_changed_t; 13.503 13.504 /* 13.505 * CMSG_USBIF_FE_DRIVER_STATUS_CHANGED: 13.506 @@ -583,28 +560,27 @@ typedef struct { 13.507 */ 13.508 #define USBIF_DRIVER_STATUS_DOWN 0 13.509 #define USBIF_DRIVER_STATUS_UP 1 13.510 -typedef struct { 13.511 +typedef struct usbif_fe_driver_status_changed { 13.512 /* IN */ 13.513 - u32 status; /* 0: USBIF_DRIVER_STATUS_??? */ 13.514 -} PACKED usbif_fe_driver_status_changed_t; /* 4 bytes */ 13.515 + u32 status; /* USBIF_DRIVER_STATUS_??? */ 13.516 +} usbif_fe_driver_status_changed_t; 13.517 13.518 /* 13.519 * CMSG_USBIF_FE_INTERFACE_CONNECT: 13.520 * If successful, the domain controller will acknowledge with a 13.521 * STATUS_CONNECTED message. 13.522 */ 13.523 -typedef struct { 13.524 - u32 __pad; 13.525 - memory_t shmem_frame; /* 8 */ 13.526 - MEMORY_PADDING; 13.527 -} PACKED usbif_fe_interface_connect_t; /* 16 bytes */ 13.528 +typedef struct usbif_fe_interface_connect { 13.529 + memory_t shmem_frame; 13.530 +} usbif_fe_interface_connect_t; 13.531 13.532 /* 13.533 * CMSG_BLKIF_FE_INTERFACE_DISCONNECT: 13.534 * If successful, the domain controller will acknowledge with a 13.535 * STATUS_DISCONNECTED message. 13.536 */ 13.537 -typedef struct {} PACKED usbif_fe_interface_disconnect_t; /* 4 bytes */ 13.538 +typedef struct usbif_fe_interface_disconnect { 13.539 +} usbif_fe_interface_disconnect_t; 13.540 13.541 13.542 /****************************************************************************** 13.543 @@ -648,13 +624,12 @@ typedef struct {} PACKED usbif_fe_interf 13.544 * created. The controller will send a DOWN notification to the front-end 13.545 * driver. 13.546 */ 13.547 -typedef struct { 13.548 +typedef struct usbif_be_create { 13.549 /* IN */ 13.550 - domid_t domid; /* 0: Domain attached to new interface. */ 13.551 - u16 __pad; 13.552 + domid_t domid; /* Domain attached to new interface. */ 13.553 /* OUT */ 13.554 - u32 status; /* 8 */ 13.555 -} PACKED usbif_be_create_t; /* 12 bytes */ 13.556 + u32 status; 13.557 +} usbif_be_create_t; 13.558 13.559 /* 13.560 * CMSG_USBIF_BE_DESTROY: 13.561 @@ -662,13 +637,12 @@ typedef struct { 13.562 * torn down. The controller will send a DESTROYED notification to the 13.563 * front-end driver. 13.564 */ 13.565 -typedef struct { 13.566 +typedef struct usbif_be_destroy { 13.567 /* IN */ 13.568 - domid_t domid; /* 0: Identify interface to be destroyed. */ 13.569 - u16 __pad; 13.570 + domid_t domid; /* Identify interface to be destroyed. */ 13.571 /* OUT */ 13.572 - u32 status; /* 8 */ 13.573 -} PACKED usbif_be_destroy_t; /* 12 bytes */ 13.574 + u32 status; 13.575 +} usbif_be_destroy_t; 13.576 13.577 /* 13.578 * CMSG_USBIF_BE_CONNECT: 13.579 @@ -676,19 +650,17 @@ typedef struct { 13.580 * connected. The controller will send a CONNECTED notification to the 13.581 * front-end driver. 13.582 */ 13.583 -typedef struct { 13.584 +typedef struct usbif_be_connect { 13.585 /* IN */ 13.586 - domid_t domid; /* 0: Domain attached to new interface. */ 13.587 - u16 __pad; 13.588 - memory_t shmem_frame; /* 8: Page cont. shared comms window. */ 13.589 - MEMORY_PADDING; 13.590 - u32 evtchn; /* 16: Event channel for notifications. */ 13.591 - u32 bandwidth; /* 20: Bandwidth allocated for isoch / int - us 13.592 + domid_t domid; /* Domain attached to new interface. */ 13.593 + memory_t shmem_frame; /* Page cont. shared comms window. */ 13.594 + u32 evtchn; /* Event channel for notifications. */ 13.595 + u32 bandwidth; /* Bandwidth allocated for isoch / int - us 13.596 * per 1ms frame (ie between 0 and 900 or 800 13.597 * depending on USB version). */ 13.598 /* OUT */ 13.599 - u32 status; /* 24 */ 13.600 -} PACKED usbif_be_connect_t; /* 28 bytes */ 13.601 + u32 status; 13.602 +} usbif_be_connect_t; 13.603 13.604 /* 13.605 * CMSG_USBIF_BE_DISCONNECT: 13.606 @@ -696,13 +668,12 @@ typedef struct { 13.607 * disconnected. The controller will send a DOWN notification to the front-end 13.608 * driver. 13.609 */ 13.610 -typedef struct { 13.611 +typedef struct usbif_be_disconnect { 13.612 /* IN */ 13.613 - domid_t domid; /* 0: Domain attached to new interface. */ 13.614 - u16 __pad; 13.615 + domid_t domid; /* Domain attached to new interface. */ 13.616 /* OUT */ 13.617 - u32 status; /* 8 */ 13.618 -} PACKED usbif_be_disconnect_t; /* 12 bytes */ 13.619 + u32 status; 13.620 +} usbif_be_disconnect_t; 13.621 13.622 /* 13.623 * CMSG_USBIF_BE_DRIVER_STATUS_CHANGED: 13.624 @@ -710,9 +681,9 @@ typedef struct { 13.625 * If the driver goes DOWN while interfaces are still UP, the controller 13.626 * will automatically send DOWN notifications. 13.627 */ 13.628 -typedef struct { 13.629 - u32 status; /* 0: USBIF_DRIVER_STATUS_??? */ 13.630 -} PACKED usbif_be_driver_status_changed_t; /* 4 bytes */ 13.631 +typedef struct usbif_be_driver_status_changed { 13.632 + u32 status; /* USBIF_DRIVER_STATUS_??? */ 13.633 +} usbif_be_driver_status_changed_t; 13.634 13.635 #define USB_PATH_LEN 16 13.636 13.637 @@ -721,25 +692,23 @@ typedef struct { 13.638 * Instruct the backend driver to claim any device plugged into the specified 13.639 * host port and to allow the specified domain to control that port. 13.640 */ 13.641 -typedef struct 13.642 -{ 13.643 +typedef struct usbif_be_claim_port { 13.644 /* IN */ 13.645 - domid_t domid; /* 0: which domain */ 13.646 - u32 usbif_port; /* 6: port on the virtual root hub */ 13.647 - u32 status; /* 10: status of operation */ 13.648 + domid_t domid; /* which domain */ 13.649 + u32 usbif_port; /* port on the virtual root hub */ 13.650 + u32 status; /* status of operation */ 13.651 char path[USB_PATH_LEN]; /* Currently specified in the Linux style - may need to be 13.652 * converted to some OS-independent format at some stage. */ 13.653 -} PACKED usbif_be_claim_port_t; 13.654 +} usbif_be_claim_port_t; 13.655 13.656 /* 13.657 * CMSG_USBIF_BE_RELEASE_PORT: 13.658 * Instruct the backend driver to release any device plugged into the specified 13.659 * host port. 13.660 */ 13.661 -typedef struct 13.662 -{ 13.663 +typedef struct usbif_be_release_port { 13.664 char path[USB_PATH_LEN]; 13.665 -} PACKED usbif_be_release_port_t; 13.666 +} usbif_be_release_port_t; 13.667 13.668 /****************************************************************************** 13.669 * SHUTDOWN DEFINITIONS 13.670 @@ -754,10 +723,9 @@ typedef struct 13.671 /* SHUTDOWN_suspend. */ 13.672 #define CMSG_SHUTDOWN_SYSRQ 3 13.673 13.674 -typedef struct { 13.675 - char key; /* 0: sysrq key */ 13.676 - char __pad[3]; /* 1: */ 13.677 -} PACKED shutdown_sysrq_t; /* 4 bytes */ 13.678 +typedef struct shutdown_sysrq { 13.679 + char key; /* sysrq key */ 13.680 +} shutdown_sysrq_t; 13.681 13.682 /****************************************************************************** 13.683 * VCPU HOTPLUG CONTROLS 13.684 @@ -773,10 +741,10 @@ typedef struct { 13.685 * CMSG_VCPU_HOTPLUG: 13.686 * Indicate which vcpu's state should change 13.687 */ 13.688 -typedef struct { 13.689 - u32 vcpu; /* 0: VCPU's whose state will change */ 13.690 - u32 status; /* 4: Return code indicates success or failure. */ 13.691 -} PACKED vcpu_hotplug_t; 13.692 +typedef struct vcpu_hotplug { 13.693 + u32 vcpu; /* VCPU's whose state will change */ 13.694 + u32 status; /* Return code indicates success or failure. */ 13.695 +} vcpu_hotplug_t; 13.696 13.697 /****************************************************************************** 13.698 * MEMORY CONTROLS 13.699 @@ -788,12 +756,12 @@ typedef struct { 13.700 * CMSG_MEM_REQUEST: 13.701 * Request that the domain change its memory reservation. 13.702 */ 13.703 -typedef struct { 13.704 +typedef struct mem_request { 13.705 /* OUT */ 13.706 - u32 target; /* 0: Target memory reservation in pages. */ 13.707 + u32 target; /* Target memory reservation in pages. */ 13.708 /* IN */ 13.709 - u32 status; /* 4: Return code indicates success or failure. */ 13.710 -} PACKED mem_request_t; /* 8 bytes */ 13.711 + u32 status; /* Return code indicates success or failure. */ 13.712 +} mem_request_t; 13.713 13.714 13.715 /****************************************************************************** 13.716 @@ -801,12 +769,12 @@ typedef struct { 13.717 */ 13.718 13.719 #define CMSG_DEBUG_CONNECTION_STATUS 0 13.720 -typedef struct { 13.721 +typedef struct pdb_Connection { 13.722 #define PDB_CONNECTION_STATUS_UP 1 13.723 #define PDB_CONNECTION_STATUS_DOWN 2 13.724 u32 status; 13.725 memory_t ring; /* status: UP */ 13.726 u32 evtchn; /* status: UP */ 13.727 -} PACKED pdb_connection_t, *pdb_connection_p; 13.728 +} pdb_connection_t, *pdb_connection_p; 13.729 13.730 #endif /* __XEN_PUBLIC_IO_DOMAIN_CONTROLLER_H__ */
14.1 --- a/xen/include/public/io/netif.h Fri Jul 01 21:25:45 2005 +0000 14.2 +++ b/xen/include/public/io/netif.h Sat Jul 02 08:41:48 2005 +0000 14.3 @@ -9,31 +9,28 @@ 14.4 #ifndef __XEN_PUBLIC_IO_NETIF_H__ 14.5 #define __XEN_PUBLIC_IO_NETIF_H__ 14.6 14.7 -typedef struct { 14.8 - memory_t addr; /* 0: Machine address of packet. */ 14.9 - MEMORY_PADDING; 14.10 +typedef struct netif_tx_request { 14.11 + memory_t addr; /* Machine address of packet. */ 14.12 u16 csum_blank:1; /* Proto csum field blank? */ 14.13 - u16 id:15; /* 8: Echoed in response message. */ 14.14 - u16 size; /* 10: Packet size in bytes. */ 14.15 -} PACKED netif_tx_request_t; /* 12 bytes */ 14.16 + u16 id:15; /* Echoed in response message. */ 14.17 + u16 size; /* Packet size in bytes. */ 14.18 +} netif_tx_request_t; 14.19 + 14.20 +typedef struct netif_tx_response { 14.21 + u16 id; 14.22 + s8 status; 14.23 +} netif_tx_response_t; 14.24 14.25 typedef struct { 14.26 - u16 id; /* 0 */ 14.27 - s8 status; /* 2 */ 14.28 - u8 __pad; /* 3 */ 14.29 -} PACKED netif_tx_response_t; /* 4 bytes */ 14.30 + u16 id; /* Echoed in response message. */ 14.31 +} netif_rx_request_t; 14.32 14.33 typedef struct { 14.34 - u16 id; /* 0: Echoed in response message. */ 14.35 -} PACKED netif_rx_request_t; /* 2 bytes */ 14.36 - 14.37 -typedef struct { 14.38 - memory_t addr; /* 0: Machine address of packet. */ 14.39 - MEMORY_PADDING; 14.40 + memory_t addr; /* Machine address of packet. */ 14.41 u16 csum_valid:1; /* Protocol checksum is validated? */ 14.42 - u16 id:15; /* 8: */ 14.43 - s16 status; /* 10: -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */ 14.44 -} PACKED netif_rx_response_t; /* 12 bytes */ 14.45 + u16 id:15; 14.46 + s16 status; /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */ 14.47 +} netif_rx_response_t; 14.48 14.49 /* 14.50 * We use a special capitalised type name because it is _essential_ that all 14.51 @@ -53,7 +50,7 @@ typedef u32 NETIF_RING_IDX; 14.52 #define NETIF_RX_RING_SIZE 256 14.53 14.54 /* This structure must fit in a memory page. */ 14.55 -typedef struct { 14.56 +typedef struct netif_tx_interface { 14.57 /* 14.58 * Frontend places packets into ring at tx_req_prod. 14.59 * Frontend receives event when tx_resp_prod passes tx_event. 14.60 @@ -61,30 +58,30 @@ typedef struct { 14.61 * may use it to determine if all queued packets have been seen by the 14.62 * backend. 14.63 */ 14.64 - NETIF_RING_IDX req_prod; /* 0 */ 14.65 - NETIF_RING_IDX req_cons; /* 4 */ 14.66 - NETIF_RING_IDX resp_prod; /* 8 */ 14.67 - NETIF_RING_IDX event; /* 12 */ 14.68 - union { /* 16 */ 14.69 + NETIF_RING_IDX req_prod; 14.70 + NETIF_RING_IDX req_cons; 14.71 + NETIF_RING_IDX resp_prod; 14.72 + NETIF_RING_IDX event; 14.73 + union { 14.74 netif_tx_request_t req; 14.75 netif_tx_response_t resp; 14.76 - } PACKED ring[NETIF_TX_RING_SIZE]; 14.77 -} PACKED netif_tx_interface_t; 14.78 + } ring[NETIF_TX_RING_SIZE]; 14.79 +} netif_tx_interface_t; 14.80 14.81 /* This structure must fit in a memory page. */ 14.82 -typedef struct { 14.83 +typedef struct netif_rx_interface { 14.84 /* 14.85 * Frontend places empty buffers into ring at rx_req_prod. 14.86 * Frontend receives event when rx_resp_prod passes rx_event. 14.87 */ 14.88 - NETIF_RING_IDX req_prod; /* 0 */ 14.89 - NETIF_RING_IDX resp_prod; /* 4 */ 14.90 - NETIF_RING_IDX event; /* 8 */ 14.91 - union { /* 12 */ 14.92 + NETIF_RING_IDX req_prod; 14.93 + NETIF_RING_IDX resp_prod; 14.94 + NETIF_RING_IDX event; 14.95 + union { 14.96 netif_rx_request_t req; 14.97 netif_rx_response_t resp; 14.98 - } PACKED ring[NETIF_RX_RING_SIZE]; 14.99 -} PACKED netif_rx_interface_t; 14.100 + } ring[NETIF_RX_RING_SIZE]; 14.101 +} netif_rx_interface_t; 14.102 14.103 /* Descriptor status values */ 14.104 #define NETIF_RSP_DROPPED -2
15.1 --- a/xen/include/public/physdev.h Fri Jul 01 21:25:45 2005 +0000 15.2 +++ b/xen/include/public/physdev.h Sat Jul 02 08:41:48 2005 +0000 15.3 @@ -11,56 +11,51 @@ 15.4 #define PHYSDEVOP_APIC_WRITE 9 15.5 #define PHYSDEVOP_ASSIGN_VECTOR 10 15.6 15.7 -typedef struct { 15.8 +typedef struct physdevop_irq_status_query { 15.9 /* IN */ 15.10 - u32 irq; /* 0 */ 15.11 + u32 irq; 15.12 /* OUT */ 15.13 /* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */ 15.14 #define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0) 15.15 - u32 flags; /* 4 */ 15.16 -} PACKED physdevop_irq_status_query_t; /* 8 bytes */ 15.17 + u32 flags; 15.18 +} physdevop_irq_status_query_t; 15.19 15.20 -typedef struct { 15.21 - /* IN */ 15.22 - u32 iopl; /* 0 */ 15.23 -} PACKED physdevop_set_iopl_t; /* 4 bytes */ 15.24 - 15.25 -typedef struct { 15.26 +typedef struct physdevop_set_iopl { 15.27 /* IN */ 15.28 - memory_t bitmap; /* 0 */ 15.29 - MEMORY_PADDING; 15.30 - u32 nr_ports; /* 8 */ 15.31 - u32 __pad0; /* 12 */ 15.32 -} PACKED physdevop_set_iobitmap_t; /* 16 bytes */ 15.33 + u32 iopl; 15.34 +} physdevop_set_iopl_t; 15.35 15.36 -typedef struct { 15.37 +typedef struct physdevop_set_iobitmap { 15.38 /* IN */ 15.39 - u32 apic; /* 0 */ 15.40 + memory_t bitmap; 15.41 + u32 nr_ports; 15.42 +} physdevop_set_iobitmap_t; 15.43 + 15.44 +typedef struct physdevop_apic { 15.45 + /* IN */ 15.46 + u32 apic; 15.47 u32 offset; 15.48 /* IN or OUT */ 15.49 u32 value; 15.50 -} PACKED physdevop_apic_t; 15.51 +} physdevop_apic_t; 15.52 15.53 -typedef struct { 15.54 +typedef struct physdevop_irq { 15.55 /* IN */ 15.56 - u32 irq; /* 0 */ 15.57 + u32 irq; 15.58 /* OUT */ 15.59 u32 vector; 15.60 -} PACKED physdevop_irq_t; 15.61 +} physdevop_irq_t; 15.62 15.63 -typedef struct _physdev_op_st 15.64 -{ 15.65 - u32 cmd; /* 0 */ 15.66 - u32 __pad; /* 4 */ 15.67 - union { /* 8 */ 15.68 +typedef struct physdev_op { 15.69 + u32 cmd; 15.70 + union { 15.71 physdevop_irq_status_query_t irq_status_query; 15.72 physdevop_set_iopl_t set_iopl; 15.73 physdevop_set_iobitmap_t set_iobitmap; 15.74 physdevop_apic_t apic_op; 15.75 physdevop_irq_t irq_op; 15.76 - u8 __dummy[32]; 15.77 - } PACKED u; 15.78 -} PACKED physdev_op_t; /* 40 bytes */ 15.79 + } u; 15.80 +} physdev_op_t; 15.81 15.82 #endif /* __XEN_PUBLIC_PHYSDEV_H__ */ 15.83
16.1 --- a/xen/include/public/policy_ops.h Fri Jul 01 21:25:45 2005 +0000 16.2 +++ b/xen/include/public/policy_ops.h Sat Jul 02 08:41:48 2005 +0000 16.3 @@ -16,7 +16,6 @@ 16.4 * 16.5 */ 16.6 16.7 - 16.8 #ifndef __XEN_PUBLIC_POLICY_OPS_H__ 16.9 #define __XEN_PUBLIC_POLICY_OPS_H__ 16.10 16.11 @@ -28,47 +27,44 @@ 16.12 * This makes sure that old versions of policy tools will stop working in a 16.13 * well-defined way (rather than crashing the machine, for instance). 16.14 */ 16.15 -#define POLICY_INTERFACE_VERSION 0xAAAA0002 16.16 +#define POLICY_INTERFACE_VERSION 0xAAAA0003 16.17 16.18 /************************************************************************/ 16.19 16.20 #define POLICY_SETPOLICY 4 16.21 -typedef struct { 16.22 +typedef struct policy_setpolicy { 16.23 /* IN variables. */ 16.24 u16 policy_type; 16.25 - u16 padding1; 16.26 /* OUT variables */ 16.27 void *pushcache; 16.28 u16 pushcache_size; 16.29 -} PACKED policy_setpolicy_t; 16.30 +} policy_setpolicy_t; 16.31 16.32 16.33 #define POLICY_GETPOLICY 5 16.34 -typedef struct { 16.35 +typedef struct policy_getpolicy { 16.36 /* IN variables. */ 16.37 u16 policy_type; 16.38 - u16 padding1; 16.39 /* OUT variables */ 16.40 void *pullcache; 16.41 u16 pullcache_size; 16.42 -} PACKED policy_getpolicy_t; 16.43 +} policy_getpolicy_t; 16.44 16.45 #define POLICY_DUMPSTATS 6 16.46 -typedef struct { 16.47 +typedef struct policy_dumpstats { 16.48 void *pullcache; 16.49 u16 pullcache_size; 16.50 -} PACKED policy_dumpstats_t; 16.51 +} policy_dumpstats_t; 16.52 16.53 16.54 -typedef struct { 16.55 - u32 cmd; /* 0 */ 16.56 - u32 interface_version; /* 4 */ /* POLICY_INTERFACE_VERSION */ 16.57 - union { /* 8 */ 16.58 - u32 dummy[14]; /* 72bytes */ 16.59 +typedef struct policy_op { 16.60 + u32 cmd; 16.61 + u32 interface_version; /* POLICY_INTERFACE_VERSION */ 16.62 + union { 16.63 policy_setpolicy_t setpolicy; 16.64 policy_getpolicy_t getpolicy; 16.65 policy_dumpstats_t dumpstats; 16.66 - } PACKED u; 16.67 -} PACKED policy_op_t; /* 80 bytes */ 16.68 + } u; 16.69 +} policy_op_t; 16.70 16.71 #endif /* __XEN_PUBLIC_POLICY_OPS_H__ */
17.1 --- a/xen/include/public/sched_ctl.h Fri Jul 01 21:25:45 2005 +0000 17.2 +++ b/xen/include/public/sched_ctl.h Sat Jul 02 08:41:48 2005 +0000 17.3 @@ -19,8 +19,7 @@ 17.4 * Generic scheduler control command - used to adjust system-wide scheduler 17.5 * parameters 17.6 */ 17.7 -struct sched_ctl_cmd 17.8 -{ 17.9 +struct sched_ctl_cmd { 17.10 u32 sched_id; 17.11 u32 direction; 17.12 union { 17.13 @@ -30,33 +29,30 @@ struct sched_ctl_cmd 17.14 } u; 17.15 }; 17.16 17.17 -struct sched_adjdom_cmd 17.18 -{ 17.19 - u32 sched_id; /* 0 */ 17.20 - u32 direction; /* 4 */ 17.21 - domid_t domain; /* 8 */ 17.22 - u16 __pad0; 17.23 - u32 __pad1; 17.24 - union { /* 16 */ 17.25 +struct sched_adjdom_cmd { 17.26 + u32 sched_id; 17.27 + u32 direction; 17.28 + domid_t domain; 17.29 + union { 17.30 struct bvt_adjdom 17.31 { 17.32 - u32 mcu_adv; /* 16: mcu advance: inverse of weight */ 17.33 - u32 warpback; /* 20: warp? */ 17.34 - s32 warpvalue; /* 24: warp value */ 17.35 - long long warpl; /* 32: warp limit */ 17.36 - long long warpu; /* 40: unwarp time requirement */ 17.37 - } PACKED bvt; 17.38 + u32 mcu_adv; /* mcu advance: inverse of weight */ 17.39 + u32 warpback; /* warp? */ 17.40 + s32 warpvalue; /* warp value */ 17.41 + long long warpl; /* warp limit */ 17.42 + long long warpu; /* unwarp time requirement */ 17.43 + } bvt; 17.44 17.45 struct sedf_adjdom 17.46 { 17.47 - u64 period; /* 16 */ 17.48 - u64 slice; /* 24 */ 17.49 - u64 latency; /* 32 */ 17.50 - u16 extratime; /* 36 */ 17.51 - u16 weight; /* 38 */ 17.52 - } PACKED sedf; 17.53 + u64 period; 17.54 + u64 slice; 17.55 + u64 latency; 17.56 + u16 extratime; 17.57 + u16 weight; 17.58 + } sedf; 17.59 17.60 - } PACKED u; 17.61 -} PACKED; /* 40 bytes */ 17.62 + } u; 17.63 +}; 17.64 17.65 #endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
18.1 --- a/xen/include/public/vmx_assist.h Fri Jul 01 21:25:45 2005 +0000 18.2 +++ b/xen/include/public/vmx_assist.h Sat Jul 02 08:41:48 2005 +0000 18.3 @@ -43,7 +43,7 @@ union vmcs_arbytes { 18.4 g : 1, 18.5 null_bit : 1, 18.6 reserved2 : 15; 18.7 - } __attribute__((packed)) fields; 18.8 + } fields; 18.9 unsigned int bytes; 18.10 }; 18.11
19.1 --- a/xen/include/public/xen.h Fri Jul 01 21:25:45 2005 +0000 19.2 +++ b/xen/include/public/xen.h Sat Jul 02 08:41:48 2005 +0000 19.3 @@ -295,8 +295,7 @@ typedef struct 19.4 * Per-VCPU information goes here. This will be cleaned up more when Xen 19.5 * actually supports multi-VCPU guests. 19.6 */ 19.7 -typedef struct 19.8 -{ 19.9 +typedef struct vcpu_info { 19.10 /* 19.11 * 'evtchn_upcall_pending' is written non-zero by Xen to indicate 19.12 * a pending notification for a particular VCPU. It is then cleared 19.13 @@ -322,20 +321,20 @@ typedef struct 19.14 * an upcall activation. The mask is cleared when the VCPU requests 19.15 * to block: this avoids wakeup-waiting races. 19.16 */ 19.17 - u8 evtchn_upcall_pending; /* 0 */ 19.18 - u8 evtchn_upcall_mask; /* 1 */ 19.19 - u8 pad0, pad1; 19.20 - u32 evtchn_pending_sel; /* 4 */ 19.21 - arch_vcpu_info_t arch; /* 8 */ 19.22 -} PACKED vcpu_info_t; /* 8 + arch */ 19.23 + u8 evtchn_upcall_pending; 19.24 + u8 evtchn_upcall_mask; 19.25 + u32 evtchn_pending_sel; 19.26 +#ifdef __ARCH_HAS_VCPU_INFO 19.27 + arch_vcpu_info_t arch; 19.28 +#endif 19.29 +} vcpu_info_t; 19.30 19.31 /* 19.32 * Xen/kernel shared data -- pointer provided in start_info. 19.33 * NB. We expect that this struct is smaller than a page. 19.34 */ 19.35 -typedef struct shared_info_st 19.36 -{ 19.37 - vcpu_info_t vcpu_data[MAX_VIRT_CPUS]; /* 0 */ 19.38 +typedef struct shared_info { 19.39 + vcpu_info_t vcpu_data[MAX_VIRT_CPUS]; 19.40 19.41 u32 n_vcpu; 19.42 19.43 @@ -370,14 +369,14 @@ typedef struct shared_info_st 19.44 * 32-bit selector to be set. Each bit in the selector covers a 32-bit 19.45 * word in the PENDING bitfield array. 19.46 */ 19.47 - u32 evtchn_pending[32]; /* 4 */ 19.48 - u32 evtchn_mask[32]; /* 136 */ 19.49 + u32 evtchn_pending[32]; 19.50 + u32 evtchn_mask[32]; 19.51 19.52 /* 19.53 * Time: The following abstractions are exposed: System Time, Clock Time, 19.54 * Domain Virtual Time. Domains can access Cycle counter time directly. 19.55 */ 19.56 - u64 cpu_freq; /* 264: CPU frequency (Hz). */ 19.57 + u64 cpu_freq; /* CPU frequency (Hz). */ 19.58 19.59 /* 19.60 * The following values are updated periodically (and not necessarily 19.61 @@ -386,8 +385,8 @@ typedef struct shared_info_st 19.62 * incremented immediately after. See the Xen-specific Linux code for an 19.63 * example of how to read these values safely (arch/xen/kernel/time.c). 19.64 */ 19.65 - u32 time_version1; /* 272 */ 19.66 - u32 time_version2; /* 276 */ 19.67 + u32 time_version1; 19.68 + u32 time_version2; 19.69 tsc_timestamp_t tsc_timestamp; /* TSC at last update of time vals. */ 19.70 u64 system_time; /* Time, in nanosecs, since boot. */ 19.71 u32 wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */ 19.72 @@ -399,12 +398,12 @@ typedef struct shared_info_st 19.73 * Allow a domain to specify a timeout value in system time and 19.74 * domain virtual time. 19.75 */ 19.76 - u64 wall_timeout; /* 312 */ 19.77 - u64 domain_timeout; /* 320 */ 19.78 + u64 wall_timeout; 19.79 + u64 domain_timeout; 19.80 19.81 arch_shared_info_t arch; 19.82 19.83 -} PACKED shared_info_t; 19.84 +} shared_info_t; 19.85 19.86 /* 19.87 * Start-of-day memory layout for the initial domain (DOM0): 19.88 @@ -432,31 +431,22 @@ typedef struct shared_info_st 19.89 */ 19.90 19.91 #define MAX_GUEST_CMDLINE 1024 19.92 -typedef struct { 19.93 - /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ 19.94 - memory_t nr_pages; /* 0: Total pages allocated to this domain. */ 19.95 - _MEMORY_PADDING(A); 19.96 - memory_t shared_info; /* 8: MACHINE address of shared info struct. */ 19.97 - _MEMORY_PADDING(B); 19.98 - u32 flags; /* 16: SIF_xxx flags. */ 19.99 - u16 domain_controller_evtchn; /* 20 */ 19.100 - u16 __pad; 19.101 - /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ 19.102 - memory_t pt_base; /* 24: VIRTUAL address of page directory. */ 19.103 - _MEMORY_PADDING(C); 19.104 - memory_t nr_pt_frames; /* 32: Number of bootstrap p.t. frames. */ 19.105 - _MEMORY_PADDING(D); 19.106 - memory_t mfn_list; /* 40: VIRTUAL address of page-frame list. */ 19.107 - _MEMORY_PADDING(E); 19.108 - memory_t mod_start; /* 48: VIRTUAL address of pre-loaded module. */ 19.109 - _MEMORY_PADDING(F); 19.110 - memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */ 19.111 - _MEMORY_PADDING(G); 19.112 - s8 cmd_line[MAX_GUEST_CMDLINE]; /* 64 */ 19.113 - memory_t store_page; /* 1088: VIRTUAL address of store page. */ 19.114 - _MEMORY_PADDING(H); 19.115 - u16 store_evtchn; /* 1096: Event channel for store communication. */ 19.116 -} PACKED start_info_t; /* 1098 bytes */ 19.117 +typedef struct start_info { 19.118 + /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ 19.119 + memory_t nr_pages; /* Total pages allocated to this domain. */ 19.120 + memory_t shared_info; /* MACHINE address of shared info struct. */ 19.121 + u32 flags; /* SIF_xxx flags. */ 19.122 + u16 domain_controller_evtchn; 19.123 + /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ 19.124 + memory_t pt_base; /* VIRTUAL address of page directory. */ 19.125 + memory_t nr_pt_frames; /* Number of bootstrap p.t. frames. */ 19.126 + memory_t mfn_list; /* VIRTUAL address of page-frame list. */ 19.127 + memory_t mod_start; /* VIRTUAL address of pre-loaded module. */ 19.128 + memory_t mod_len; /* Size (bytes) of pre-loaded module. */ 19.129 + s8 cmd_line[MAX_GUEST_CMDLINE]; 19.130 + memory_t store_page; /* VIRTUAL address of store page. */ 19.131 + u16 store_evtchn; /* Event channel for store communication. */ 19.132 +} start_info_t; 19.133 19.134 /* These flags are passed in the 'flags' field of start_info_t. */ 19.135 #define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */