ia64/xen-unstable

changeset 8679:98c8afe4c433

Uniform definition of do_iret prototype. Use 'struct foo'
in various places instead of 'foo_t'.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jan 27 16:16:52 2006 +0100 (2006-01-27)
parents f1bfe32828a1
children 2add7a262530
files xen/arch/x86/dom0_ops.c xen/arch/x86/mm.c xen/arch/x86/physdev.c xen/arch/x86/setup.c xen/arch/x86/traps.c xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_32/seg_fixup.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/asm-offsets.c xen/arch/x86/x86_64/traps.c xen/common/dom0_ops.c xen/common/event_channel.c xen/common/multicall.c xen/include/acm/acm_hooks.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/dom0_ops.h xen/include/public/xen.h xen/include/xen/multicall.h
line diff
     1.1 --- a/xen/arch/x86/dom0_ops.c	Fri Jan 27 14:24:50 2006 +0000
     1.2 +++ b/xen/arch/x86/dom0_ops.c	Fri Jan 27 16:16:52 2006 +0100
     1.3 @@ -46,7 +46,7 @@ static void read_msr_for(void *unused)
     1.4          (void)rdmsr_user(msr_addr, msr_lo, msr_hi);
     1.5  }
     1.6  
     1.7 -long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op)
     1.8 +long arch_do_dom0_op(struct dom0_op *op, struct dom0_op *u_dom0_op)
     1.9  {
    1.10      long ret = 0;
    1.11  
     2.1 --- a/xen/arch/x86/mm.c	Fri Jan 27 14:24:50 2006 +0000
     2.2 +++ b/xen/arch/x86/mm.c	Fri Jan 27 16:16:52 2006 +0100
     2.3 @@ -1957,12 +1957,12 @@ int do_mmuext_op(
     2.4  }
     2.5  
     2.6  int do_mmu_update(
     2.7 -    mmu_update_t *ureqs,
     2.8 +    struct mmu_update *ureqs,
     2.9      unsigned int count,
    2.10      unsigned int *pdone,
    2.11      unsigned int foreigndom)
    2.12  {
    2.13 -    mmu_update_t req;
    2.14 +    struct mmu_update req;
    2.15      void *va;
    2.16      unsigned long gpfn, mfn;
    2.17      struct pfn_info *page;
     3.1 --- a/xen/arch/x86/physdev.c	Fri Jan 27 14:24:50 2006 +0000
     3.2 +++ b/xen/arch/x86/physdev.c	Fri Jan 27 16:16:52 2006 +0100
     3.3 @@ -17,11 +17,11 @@ extern int ioapic_guest_write(int apicid
     3.4  /*
     3.5   * Demuxing hypercall.
     3.6   */
     3.7 -long do_physdev_op(physdev_op_t *uop)
     3.8 +long do_physdev_op(struct physdev_op *uop)
     3.9  {
    3.10 -    physdev_op_t op;
    3.11 -    long         ret;
    3.12 -    int          irq;
    3.13 +    struct physdev_op op;
    3.14 +    long ret;
    3.15 +    int  irq;
    3.16  
    3.17      if ( unlikely(copy_from_user(&op, uop, sizeof(op)) != 0) )
    3.18          return -EFAULT;
    3.19 @@ -39,7 +39,7 @@ long do_physdev_op(physdev_op_t *uop)
    3.20              break;
    3.21          op.u.irq_status_query.flags = 0;
    3.22          /* Edge-triggered interrupts don't need an explicit unmask downcall. */
    3.23 -        if ( strstr(irq_desc[irq_to_vector(irq)].handler->typename, "edge") == NULL )
    3.24 +        if ( !strstr(irq_desc[irq_to_vector(irq)].handler->typename, "edge") )
    3.25              op.u.irq_status_query.flags |= PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY;
    3.26          ret = 0;
    3.27          break;
     4.1 --- a/xen/arch/x86/setup.c	Fri Jan 27 14:24:50 2006 +0000
     4.2 +++ b/xen/arch/x86/setup.c	Fri Jan 27 16:16:52 2006 +0100
     4.3 @@ -337,8 +337,9 @@ void __init __start_xen(multiboot_info_t
     4.4             nr_pages << (PAGE_SHIFT - 10));
     4.5      total_pages = nr_pages;
     4.6  
     4.7 -    /* Sanity check for unwanted bloat of dom0_op_t structure. */
     4.8 -    BUG_ON(sizeof(((dom0_op_t *)0)->u) != sizeof(((dom0_op_t *)0)->u.pad));
     4.9 +    /* Sanity check for unwanted bloat of dom0_op structure. */
    4.10 +    BUG_ON(sizeof(((struct dom0_op *)0)->u) !=
    4.11 +           sizeof(((struct dom0_op *)0)->u.pad));
    4.12  
    4.13      BUG_ON(sizeof(start_info_t) > PAGE_SIZE);
    4.14      BUG_ON(sizeof(shared_info_t) > PAGE_SIZE);
     5.1 --- a/xen/arch/x86/traps.c	Fri Jan 27 14:24:50 2006 +0000
     5.2 +++ b/xen/arch/x86/traps.c	Fri Jan 27 16:16:52 2006 +0100
     5.3 @@ -325,7 +325,7 @@ static inline int do_trap(int trapnr, ch
     5.4  {
     5.5      struct vcpu *v = current;
     5.6      struct trap_bounce *tb = &v->arch.trap_bounce;
     5.7 -    trap_info_t *ti;
     5.8 +    struct trap_info *ti;
     5.9      unsigned long fixup;
    5.10  
    5.11      DEBUGGER_trap_entry(trapnr, regs);
    5.12 @@ -392,7 +392,7 @@ asmlinkage int do_int3(struct cpu_user_r
    5.13  {
    5.14      struct vcpu *v = current;
    5.15      struct trap_bounce *tb = &v->arch.trap_bounce;
    5.16 -    trap_info_t *ti;
    5.17 +    struct trap_info *ti;
    5.18  
    5.19      DEBUGGER_trap_entry(TRAP_int3, regs);
    5.20  
    5.21 @@ -421,7 +421,7 @@ asmlinkage int do_machine_check(struct c
    5.22  
    5.23  void propagate_page_fault(unsigned long addr, u16 error_code)
    5.24  {
    5.25 -    trap_info_t *ti;
    5.26 +    struct trap_info *ti;
    5.27      struct vcpu *v = current;
    5.28      struct trap_bounce *tb = &v->arch.trap_bounce;
    5.29  
    5.30 @@ -1014,7 +1014,7 @@ asmlinkage int do_general_protection(str
    5.31  {
    5.32      struct vcpu *v = current;
    5.33      struct trap_bounce *tb = &v->arch.trap_bounce;
    5.34 -    trap_info_t *ti;
    5.35 +    struct trap_info *ti;
    5.36      unsigned long fixup;
    5.37  
    5.38      DEBUGGER_trap_entry(TRAP_gp_fault, regs);
    5.39 @@ -1217,7 +1217,7 @@ void unset_nmi_callback(void)
    5.40  asmlinkage int math_state_restore(struct cpu_user_regs *regs)
    5.41  {
    5.42      struct trap_bounce *tb;
    5.43 -    trap_info_t *ti;
    5.44 +    struct trap_info *ti;
    5.45  
    5.46      /* Prevent recursion. */
    5.47      clts();
    5.48 @@ -1246,7 +1246,7 @@ asmlinkage int do_debug(struct cpu_user_
    5.49      unsigned long condition;
    5.50      struct vcpu *v = current;
    5.51      struct trap_bounce *tb = &v->arch.trap_bounce;
    5.52 -    trap_info_t *ti;
    5.53 +    struct trap_info *ti;
    5.54  
    5.55      __asm__ __volatile__("mov %%db6,%0" : "=r" (condition));
    5.56  
    5.57 @@ -1364,10 +1364,10 @@ void __init trap_init(void)
    5.58  }
    5.59  
    5.60  
    5.61 -long do_set_trap_table(trap_info_t *traps)
    5.62 +long do_set_trap_table(struct trap_info *traps)
    5.63  {
    5.64 -    trap_info_t cur;
    5.65 -    trap_info_t *dst = current->arch.guest_context.trap_ctxt;
    5.66 +    struct trap_info cur;
    5.67 +    struct trap_info *dst = current->arch.guest_context.trap_ctxt;
    5.68      long rc = 0;
    5.69  
    5.70      LOCK_BIGLOCK(current->domain);
     6.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Fri Jan 27 14:24:50 2006 +0000
     6.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Fri Jan 27 16:16:52 2006 +0100
     6.3 @@ -90,15 +90,15 @@ void __dummy__(void)
     6.4      BLANK();
     6.5  #endif
     6.6  
     6.7 -    OFFSET(MULTICALL_op, multicall_entry_t, op);
     6.8 -    OFFSET(MULTICALL_arg0, multicall_entry_t, args[0]);
     6.9 -    OFFSET(MULTICALL_arg1, multicall_entry_t, args[1]);
    6.10 -    OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
    6.11 -    OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
    6.12 -    OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
    6.13 -    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
    6.14 -    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
    6.15 -    OFFSET(MULTICALL_result, multicall_entry_t, result);
    6.16 +    OFFSET(MULTICALL_op, struct multicall_entry, op);
    6.17 +    OFFSET(MULTICALL_arg0, struct multicall_entry, args[0]);
    6.18 +    OFFSET(MULTICALL_arg1, struct multicall_entry, args[1]);
    6.19 +    OFFSET(MULTICALL_arg2, struct multicall_entry, args[2]);
    6.20 +    OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
    6.21 +    OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
    6.22 +    OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
    6.23 +    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
    6.24 +    OFFSET(MULTICALL_result, struct multicall_entry, result);
    6.25      BLANK();
    6.26  
    6.27      DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
     7.1 --- a/xen/arch/x86/x86_32/seg_fixup.c	Fri Jan 27 14:24:50 2006 +0000
     7.2 +++ b/xen/arch/x86/x86_32/seg_fixup.c	Fri Jan 27 16:16:52 2006 +0100
     7.3 @@ -268,7 +268,7 @@ int fixup_seg(u16 seg, unsigned long off
     7.4  int gpf_emulate_4gb(struct cpu_user_regs *regs)
     7.5  {
     7.6      struct vcpu *d = current;
     7.7 -    trap_info_t   *ti;
     7.8 +    struct trap_info   *ti;
     7.9      struct trap_bounce *tb;
    7.10      u8            modrm, mod, reg, rm, decode;
    7.11      void         *memreg, *regreg;
     8.1 --- a/xen/arch/x86/x86_32/traps.c	Fri Jan 27 14:24:50 2006 +0000
     8.2 +++ b/xen/arch/x86/x86_32/traps.c	Fri Jan 27 16:16:52 2006 +0100
     8.3 @@ -157,7 +157,7 @@ asmlinkage void do_double_fault(void)
     8.4          __asm__ __volatile__ ( "hlt" );
     8.5  }
     8.6  
     8.7 -asmlinkage unsigned long do_iret(void)
     8.8 +unsigned long do_iret(void)
     8.9  {
    8.10      struct cpu_user_regs *regs = guest_cpu_user_regs();
    8.11      u32 eflags;
    8.12 @@ -263,7 +263,7 @@ void __init percpu_traps_init(void)
    8.13  
    8.14  void init_int80_direct_trap(struct vcpu *v)
    8.15  {
    8.16 -    trap_info_t *ti = &v->arch.guest_context.trap_ctxt[0x80];
    8.17 +    struct trap_info *ti = &v->arch.guest_context.trap_ctxt[0x80];
    8.18  
    8.19      /*
    8.20       * We can't virtualise interrupt gates, as there's no way to get
     9.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Fri Jan 27 14:24:50 2006 +0000
     9.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Fri Jan 27 16:16:52 2006 +0100
     9.3 @@ -90,15 +90,15 @@ void __dummy__(void)
     9.4      BLANK();
     9.5  #endif
     9.6  
     9.7 -    OFFSET(MULTICALL_op, multicall_entry_t, op);
     9.8 -    OFFSET(MULTICALL_arg0, multicall_entry_t, args[0]);
     9.9 -    OFFSET(MULTICALL_arg1, multicall_entry_t, args[1]);
    9.10 -    OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
    9.11 -    OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
    9.12 -    OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
    9.13 -    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
    9.14 -    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
    9.15 -    OFFSET(MULTICALL_result, multicall_entry_t, result);
    9.16 +    OFFSET(MULTICALL_op, struct multicall_entry, op);
    9.17 +    OFFSET(MULTICALL_arg0, struct multicall_entry, args[0]);
    9.18 +    OFFSET(MULTICALL_arg1, struct multicall_entry, args[1]);
    9.19 +    OFFSET(MULTICALL_arg2, struct multicall_entry, args[2]);
    9.20 +    OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
    9.21 +    OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
    9.22 +    OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
    9.23 +    OFFSET(MULTICALL_arg6, struct multicall_entry, args[6]);
    9.24 +    OFFSET(MULTICALL_result, struct multicall_entry, result);
    9.25      BLANK();
    9.26  
    9.27      DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
    10.1 --- a/xen/arch/x86/x86_64/traps.c	Fri Jan 27 14:24:50 2006 +0000
    10.2 +++ b/xen/arch/x86/x86_64/traps.c	Fri Jan 27 16:16:52 2006 +0100
    10.3 @@ -122,7 +122,7 @@ void toggle_guest_mode(struct vcpu *v)
    10.4      write_ptbase(v);
    10.5  }
    10.6  
    10.7 -long do_iret(void)
    10.8 +unsigned long do_iret(void)
    10.9  {
   10.10      struct cpu_user_regs *regs = guest_cpu_user_regs();
   10.11      struct iret_context iret_saved;
    11.1 --- a/xen/common/dom0_ops.c	Fri Jan 27 14:24:50 2006 +0000
    11.2 +++ b/xen/common/dom0_ops.c	Fri Jan 27 16:16:52 2006 +0100
    11.3 @@ -22,7 +22,8 @@
    11.4  #include <public/sched_ctl.h>
    11.5  #include <acm/acm_hooks.h>
    11.6  
    11.7 -extern long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op);
    11.8 +extern long arch_do_dom0_op(
    11.9 +    struct dom0_op *op, struct dom0_op *u_dom0_op);
   11.10  extern void arch_getdomaininfo_ctxt(
   11.11      struct vcpu *, struct vcpu_guest_context *);
   11.12  
   11.13 @@ -86,10 +87,10 @@ static void getdomaininfo(struct domain 
   11.14      memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
   11.15  }
   11.16  
   11.17 -long do_dom0_op(dom0_op_t *u_dom0_op)
   11.18 +long do_dom0_op(struct dom0_op *u_dom0_op)
   11.19  {
   11.20      long ret = 0;
   11.21 -    dom0_op_t curop, *op = &curop;
   11.22 +    struct dom0_op curop, *op = &curop;
   11.23      void *ssid = NULL; /* save security ptr between pre and post/fail hooks */
   11.24      static spinlock_t dom0_lock = SPIN_LOCK_UNLOCKED;
   11.25  
    12.1 --- a/xen/common/event_channel.c	Fri Jan 27 14:24:50 2006 +0000
    12.2 +++ b/xen/common/event_channel.c	Fri Jan 27 16:16:52 2006 +0100
    12.3 @@ -580,10 +580,10 @@ static long evtchn_unmask(evtchn_unmask_
    12.4      return 0;
    12.5  }
    12.6  
    12.7 -long do_event_channel_op(evtchn_op_t *uop)
    12.8 +long do_event_channel_op(struct evtchn_op *uop)
    12.9  {
   12.10      long rc;
   12.11 -    evtchn_op_t op;
   12.12 +    struct evtchn_op op;
   12.13  
   12.14      if ( copy_from_user(&op, uop, sizeof(op)) != 0 )
   12.15          return -EFAULT;
    13.1 --- a/xen/common/multicall.c	Fri Jan 27 14:24:50 2006 +0000
    13.2 +++ b/xen/common/multicall.c	Fri Jan 27 16:16:52 2006 +0100
    13.3 @@ -15,7 +15,7 @@
    13.4  
    13.5  struct mc_state mc_state[NR_CPUS];
    13.6  
    13.7 -long do_multicall(multicall_entry_t *call_list, unsigned int nr_calls)
    13.8 +long do_multicall(struct multicall_entry *call_list, unsigned int nr_calls)
    13.9  {
   13.10      struct mc_state *mcs = &mc_state[smp_processor_id()];
   13.11      unsigned int     i;
   13.12 @@ -51,7 +51,7 @@ long do_multicall(multicall_entry_t *cal
   13.13               * Deliberately corrupt the contents of the multicall structure.
   13.14               * The caller must depend only on the 'result' field on return.
   13.15               */
   13.16 -            multicall_entry_t corrupt;
   13.17 +            struct multicall_entry corrupt;
   13.18              memset(&corrupt, 0xAA, sizeof(corrupt));
   13.19              (void)__copy_to_user(&call_list[i], &corrupt, sizeof(corrupt));
   13.20          }
    14.1 --- a/xen/include/acm/acm_hooks.h	Fri Jan 27 14:24:50 2006 +0000
    14.2 +++ b/xen/include/acm/acm_hooks.h	Fri Jan 27 16:16:52 2006 +0100
    14.3 @@ -129,13 +129,13 @@ extern struct acm_operations *acm_second
    14.4  
    14.5  #ifndef ACM_SECURITY
    14.6  
    14.7 -static inline int acm_pre_dom0_op(dom0_op_t *op, void **ssid) 
    14.8 +static inline int acm_pre_dom0_op(struct dom0_op *op, void **ssid) 
    14.9  { return 0; }
   14.10 -static inline void acm_post_dom0_op(dom0_op_t *op, void *ssid) 
   14.11 +static inline void acm_post_dom0_op(struct dom0_op *op, void *ssid) 
   14.12  { return; }
   14.13 -static inline void acm_fail_dom0_op(dom0_op_t *op, void *ssid) 
   14.14 +static inline void acm_fail_dom0_op(struct dom0_op *op, void *ssid) 
   14.15  { return; }
   14.16 -static inline int acm_pre_event_channel(evtchn_op_t *op) 
   14.17 +static inline int acm_pre_event_channel(struct evtchn_op *op) 
   14.18  { return 0; }
   14.19  static inline int acm_pre_grant_map_ref(domid_t id) 
   14.20  { return 0; }
   14.21 @@ -223,7 +223,7 @@ static inline int acm_pre_eventchannel_i
   14.22          return ACM_ACCESS_PERMITTED;
   14.23  }
   14.24  
   14.25 -static inline int acm_pre_dom0_op(dom0_op_t *op, void **ssid) 
   14.26 +static inline int acm_pre_dom0_op(struct dom0_op *op, void **ssid) 
   14.27  {
   14.28      int ret = -EACCES;
   14.29      struct domain *d;
   14.30 @@ -260,7 +260,7 @@ static inline int acm_pre_dom0_op(dom0_o
   14.31      return ret;
   14.32  }
   14.33  
   14.34 -static inline void acm_post_dom0_op(dom0_op_t *op, void **ssid)
   14.35 +static inline void acm_post_dom0_op(struct dom0_op *op, void **ssid)
   14.36  {
   14.37      switch(op->cmd) {
   14.38      case DOM0_CREATEDOMAIN:
   14.39 @@ -279,7 +279,7 @@ static inline void acm_post_dom0_op(dom0
   14.40      }
   14.41  }
   14.42  
   14.43 -static inline void acm_fail_dom0_op(dom0_op_t *op, void *ssid) 
   14.44 +static inline void acm_fail_dom0_op(struct dom0_op *op, void *ssid) 
   14.45  {
   14.46      switch(op->cmd) {
   14.47      case DOM0_CREATEDOMAIN:
   14.48 @@ -289,7 +289,7 @@ static inline void acm_fail_dom0_op(dom0
   14.49      }
   14.50  }
   14.51  
   14.52 -static inline int acm_pre_event_channel(evtchn_op_t *op) 
   14.53 +static inline int acm_pre_event_channel(struct evtchn_op *op) 
   14.54  {
   14.55      int ret = -EACCES;
   14.56  
    15.1 --- a/xen/include/public/arch-x86_32.h	Fri Jan 27 14:24:50 2006 +0000
    15.2 +++ b/xen/include/public/arch-x86_32.h	Fri Jan 27 16:16:52 2006 +0100
    15.3 @@ -118,7 +118,7 @@ typedef struct vcpu_guest_context {
    15.4  #define VGCF_IN_KERNEL  (1<<2)
    15.5      unsigned long flags;                    /* VGCF_* flags                 */
    15.6      cpu_user_regs_t user_regs;              /* User-level CPU registers     */
    15.7 -    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
    15.8 +    struct trap_info trap_ctxt[256];        /* Virtual IDT                  */
    15.9      unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   15.10      unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   15.11      unsigned long kernel_ss, kernel_sp;     /* Virtual TSS (only SS1/SP1)   */
    16.1 --- a/xen/include/public/arch-x86_64.h	Fri Jan 27 14:24:50 2006 +0000
    16.2 +++ b/xen/include/public/arch-x86_64.h	Fri Jan 27 16:16:52 2006 +0100
    16.3 @@ -200,7 +200,7 @@ typedef struct vcpu_guest_context {
    16.4  #define VGCF_IN_KERNEL  (1<<2)
    16.5      unsigned long flags;                    /* VGCF_* flags                 */
    16.6      cpu_user_regs_t user_regs;              /* User-level CPU registers     */
    16.7 -    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
    16.8 +    struct trap_info trap_ctxt[256];        /* Virtual IDT                  */
    16.9      unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
   16.10      unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
   16.11      unsigned long kernel_ss, kernel_sp;     /* Virtual TSS (only SS1/SP1)   */
    17.1 --- a/xen/include/public/dom0_ops.h	Fri Jan 27 14:24:50 2006 +0000
    17.2 +++ b/xen/include/public/dom0_ops.h	Fri Jan 27 16:16:52 2006 +0100
    17.3 @@ -24,7 +24,7 @@
    17.4  /************************************************************************/
    17.5  
    17.6  #define DOM0_GETMEMLIST        2
    17.7 -typedef struct {
    17.8 +typedef struct dom0_getmemlist {
    17.9      /* IN variables. */
   17.10      domid_t       domain;
   17.11      unsigned long max_pfns;
   17.12 @@ -42,7 +42,7 @@ typedef struct sched_ctl_cmd dom0_schedc
   17.13  typedef struct sched_adjdom_cmd dom0_adjustdom_t;
   17.14  
   17.15  #define DOM0_CREATEDOMAIN      8
   17.16 -typedef struct {
   17.17 +typedef struct dom0_createdomain {
   17.18      /* IN parameters */
   17.19      uint32_t ssidref;
   17.20      xen_domain_handle_t handle;
   17.21 @@ -52,25 +52,25 @@ typedef struct {
   17.22  } dom0_createdomain_t;
   17.23  
   17.24  #define DOM0_DESTROYDOMAIN     9
   17.25 -typedef struct {
   17.26 +typedef struct dom0_destroydomain {
   17.27      /* IN variables. */
   17.28      domid_t domain;
   17.29  } dom0_destroydomain_t;
   17.30  
   17.31  #define DOM0_PAUSEDOMAIN      10
   17.32 -typedef struct {
   17.33 +typedef struct dom0_pausedomain {
   17.34      /* IN parameters. */
   17.35      domid_t domain;
   17.36  } dom0_pausedomain_t;
   17.37  
   17.38  #define DOM0_UNPAUSEDOMAIN    11
   17.39 -typedef struct {
   17.40 +typedef struct dom0_unpausedomain {
   17.41      /* IN parameters. */
   17.42      domid_t domain;
   17.43  } dom0_unpausedomain_t;
   17.44  
   17.45  #define DOM0_GETDOMAININFO    12
   17.46 -typedef struct {
   17.47 +typedef struct dom0_getdomaininfo {
   17.48      /* IN variables. */
   17.49      domid_t  domain;                  /* NB. IN/OUT variable. */
   17.50      /* OUT variables. */
   17.51 @@ -95,7 +95,7 @@ typedef struct {
   17.52  } dom0_getdomaininfo_t;
   17.53  
   17.54  #define DOM0_SETVCPUCONTEXT   13
   17.55 -typedef struct {
   17.56 +typedef struct dom0_setvcpucontext {
   17.57      /* IN variables. */
   17.58      domid_t               domain;
   17.59      uint32_t              vcpu;
   17.60 @@ -104,7 +104,7 @@ typedef struct {
   17.61  } dom0_setvcpucontext_t;
   17.62  
   17.63  #define DOM0_MSR              15
   17.64 -typedef struct {
   17.65 +typedef struct dom0_msr {
   17.66      /* IN variables. */
   17.67      uint32_t write;
   17.68      cpumap_t cpu_mask;
   17.69 @@ -121,7 +121,7 @@ typedef struct {
   17.70   * 1 January, 1970 if the current system time was <system_time>.
   17.71   */
   17.72  #define DOM0_SETTIME          17
   17.73 -typedef struct {
   17.74 +typedef struct dom0_settime {
   17.75      /* IN variables. */
   17.76      uint32_t secs;
   17.77      uint32_t nsecs;
   17.78 @@ -139,7 +139,7 @@ typedef struct {
   17.79  #define LTAB_MASK XTAB
   17.80  #define LTABTYPE_MASK (0x7<<28)
   17.81  
   17.82 -typedef struct {
   17.83 +typedef struct dom0_getpageframeinfo {
   17.84      /* IN variables. */
   17.85      unsigned long pfn;     /* Machine page frame number to query.       */
   17.86      domid_t domain;        /* To which domain does the frame belong?    */
   17.87 @@ -152,7 +152,7 @@ typedef struct {
   17.88   * Read console content from Xen buffer ring.
   17.89   */
   17.90  #define DOM0_READCONSOLE      19
   17.91 -typedef struct {
   17.92 +typedef struct dom0_readconsole {
   17.93      /* IN variables. */
   17.94      uint32_t clear;        /* Non-zero -> clear after reading. */
   17.95      /* IN/OUT variables. */
   17.96 @@ -164,7 +164,7 @@ typedef struct {
   17.97   * Set which physical cpus a vcpu can execute on.
   17.98   */
   17.99  #define DOM0_SETVCPUAFFINITY  20
  17.100 -typedef struct {
  17.101 +typedef struct dom0_setvcpuaffinity {
  17.102      /* IN variables. */
  17.103      domid_t   domain;
  17.104      uint32_t  vcpu;
  17.105 @@ -173,7 +173,7 @@ typedef struct {
  17.106  
  17.107  /* Get trace buffers machine base address */
  17.108  #define DOM0_TBUFCONTROL       21
  17.109 -typedef struct {
  17.110 +typedef struct dom0_tbufcontrol {
  17.111      /* IN variables */
  17.112  #define DOM0_TBUF_GET_INFO     0
  17.113  #define DOM0_TBUF_SET_CPU_MASK 1
  17.114 @@ -194,7 +194,7 @@ typedef struct {
  17.115   * Get physical information about the host machine
  17.116   */
  17.117  #define DOM0_PHYSINFO         22
  17.118 -typedef struct {
  17.119 +typedef struct dom0_physinfo {
  17.120      uint32_t threads_per_core;
  17.121      uint32_t cores_per_socket;
  17.122      uint32_t sockets_per_node;
  17.123 @@ -209,7 +209,7 @@ typedef struct {
  17.124   * Get the ID of the current scheduler.
  17.125   */
  17.126  #define DOM0_SCHED_ID        24
  17.127 -typedef struct {
  17.128 +typedef struct dom0_sched_id {
  17.129      /* OUT variable */
  17.130      uint32_t sched_id;
  17.131  } dom0_sched_id_t;
  17.132 @@ -228,15 +228,14 @@ typedef struct {
  17.133  #define DOM0_SHADOW_CONTROL_OP_CLEAN       11
  17.134  #define DOM0_SHADOW_CONTROL_OP_PEEK        12
  17.135  
  17.136 -typedef struct dom0_shadow_control
  17.137 -{
  17.138 +typedef struct dom0_shadow_control_stats {
  17.139      uint32_t fault_count;
  17.140      uint32_t dirty_count;
  17.141      uint32_t dirty_net_count;     
  17.142      uint32_t dirty_block_count;     
  17.143  } dom0_shadow_control_stats_t;
  17.144  
  17.145 -typedef struct {
  17.146 +typedef struct dom0_shadow_control {
  17.147      /* IN variables. */
  17.148      domid_t        domain;
  17.149      uint32_t       op;
  17.150 @@ -248,14 +247,14 @@ typedef struct {
  17.151  } dom0_shadow_control_t;
  17.152  
  17.153  #define DOM0_SETDOMAINMAXMEM   28
  17.154 -typedef struct {
  17.155 +typedef struct dom0_setdomainmaxmem {
  17.156      /* IN variables. */
  17.157      domid_t       domain;
  17.158      unsigned long max_memkb;
  17.159  } dom0_setdomainmaxmem_t;
  17.160  
  17.161  #define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
  17.162 -typedef struct {
  17.163 +typedef struct dom0_getpageframeinfo2 {
  17.164      /* IN variables. */
  17.165      domid_t        domain;
  17.166      unsigned long  num;
  17.167 @@ -271,7 +270,7 @@ typedef struct {
  17.168   * (x86-specific).
  17.169   */
  17.170  #define DOM0_ADD_MEMTYPE         31
  17.171 -typedef struct {
  17.172 +typedef struct dom0_add_memtype {
  17.173      /* IN variables. */
  17.174      unsigned long pfn;
  17.175      unsigned long nr_pfns;
  17.176 @@ -289,7 +288,7 @@ typedef struct {
  17.177   * (x86-specific).
  17.178   */
  17.179  #define DOM0_DEL_MEMTYPE         32
  17.180 -typedef struct {
  17.181 +typedef struct dom0_del_memtype {
  17.182      /* IN variables. */
  17.183      uint32_t handle;
  17.184      uint32_t reg;
  17.185 @@ -297,7 +296,7 @@ typedef struct {
  17.186  
  17.187  /* Read current type of an MTRR (x86-specific). */
  17.188  #define DOM0_READ_MEMTYPE        33
  17.189 -typedef struct {
  17.190 +typedef struct dom0_read_memtype {
  17.191      /* IN variables. */
  17.192      uint32_t reg;
  17.193      /* OUT variables. */
  17.194 @@ -311,12 +310,12 @@ typedef struct {
  17.195  /* Sub-operations: */
  17.196  #define DOM0_PERFCCONTROL_OP_RESET 1   /* Reset all counters to zero. */
  17.197  #define DOM0_PERFCCONTROL_OP_QUERY 2   /* Get perfctr information. */
  17.198 -typedef struct {
  17.199 +typedef struct dom0_perfc_desc {
  17.200      uint8_t      name[80];             /* name of perf counter */
  17.201      uint32_t     nr_vals;              /* number of values for this counter */
  17.202      uint32_t     vals[64];             /* array of values */
  17.203  } dom0_perfc_desc_t;
  17.204 -typedef struct {
  17.205 +typedef struct dom0_perfccontrol {
  17.206      /* IN variables. */
  17.207      uint32_t       op;                /*  DOM0_PERFCCONTROL_OP_??? */
  17.208      /* OUT variables. */
  17.209 @@ -325,14 +324,14 @@ typedef struct {
  17.210  } dom0_perfccontrol_t;
  17.211  
  17.212  #define DOM0_MICROCODE           35
  17.213 -typedef struct {
  17.214 +typedef struct dom0_microcode {
  17.215      /* IN variables. */
  17.216      void    *data;                    /* Pointer to microcode data */
  17.217      uint32_t length;                  /* Length of microcode data. */
  17.218  } dom0_microcode_t;
  17.219  
  17.220  #define DOM0_IOPORT_PERMISSION   36
  17.221 -typedef struct {
  17.222 +typedef struct dom0_ioport_permission {
  17.223      domid_t  domain;                  /* domain to be affected */
  17.224      uint32_t first_port;              /* first port int range */
  17.225      uint32_t nr_ports;                /* size of port range */
  17.226 @@ -340,7 +339,7 @@ typedef struct {
  17.227  } dom0_ioport_permission_t;
  17.228  
  17.229  #define DOM0_GETVCPUCONTEXT      37
  17.230 -typedef struct {
  17.231 +typedef struct dom0_getvcpucontext {
  17.232      /* IN variables. */
  17.233      domid_t  domain;                  /* domain to be affected */
  17.234      uint32_t vcpu;                    /* vcpu # */
  17.235 @@ -349,7 +348,7 @@ typedef struct {
  17.236  } dom0_getvcpucontext_t;
  17.237  
  17.238  #define DOM0_GETVCPUINFO         43
  17.239 -typedef struct {
  17.240 +typedef struct dom0_getvcpuinfo {
  17.241      /* IN variables. */
  17.242      domid_t  domain;                  /* domain to be affected */
  17.243      uint32_t vcpu;                    /* vcpu # */
  17.244 @@ -363,7 +362,7 @@ typedef struct {
  17.245  } dom0_getvcpuinfo_t;
  17.246  
  17.247  #define DOM0_GETDOMAININFOLIST   38
  17.248 -typedef struct {
  17.249 +typedef struct dom0_getdomaininfolist {
  17.250      /* IN variables. */
  17.251      domid_t               first_domain;
  17.252      uint32_t              max_domains;
  17.253 @@ -374,13 +373,13 @@ typedef struct {
  17.254  
  17.255  #define DOM0_PLATFORM_QUIRK      39  
  17.256  #define QUIRK_NOIRQBALANCING  1
  17.257 -typedef struct {
  17.258 +typedef struct dom0_platform_quirk {
  17.259      /* IN variables. */
  17.260      uint32_t quirk_id;
  17.261  } dom0_platform_quirk_t;
  17.262  
  17.263  #define DOM0_PHYSICAL_MEMORY_MAP 40
  17.264 -typedef struct {
  17.265 +typedef struct dom0_physical_memory_map {
  17.266      /* IN variables. */
  17.267      uint32_t max_map_entries;
  17.268      /* OUT variables. */
  17.269 @@ -393,32 +392,32 @@ typedef struct {
  17.270  } dom0_physical_memory_map_t;
  17.271  
  17.272  #define DOM0_MAX_VCPUS 41
  17.273 -typedef struct {
  17.274 +typedef struct dom0_max_vcpus {
  17.275      domid_t  domain;        /* domain to be affected */
  17.276      uint32_t max;           /* maximum number of vcpus */
  17.277  } dom0_max_vcpus_t;
  17.278  
  17.279  #define DOM0_SETDOMAINHANDLE 44
  17.280 -typedef struct {
  17.281 +typedef struct dom0_setdomainhandle {
  17.282      domid_t domain;
  17.283      xen_domain_handle_t handle;
  17.284  } dom0_setdomainhandle_t;
  17.285  
  17.286  #define DOM0_SETDEBUGGING 45
  17.287 -typedef struct {
  17.288 +typedef struct dom0_setdebugging {
  17.289      domid_t domain;
  17.290      uint8_t enable;
  17.291  } dom0_setdebugging_t;
  17.292  
  17.293  #define DOM0_IRQ_PERMISSION 46
  17.294 -typedef struct {
  17.295 +typedef struct dom0_irq_permission {
  17.296      domid_t domain;          /* domain to be affected */
  17.297      uint8_t pirq;
  17.298      uint8_t allow_access;    /* flag to specify enable/disable of IRQ access */
  17.299  } dom0_irq_permission_t;
  17.300  
  17.301  #define DOM0_IOMEM_PERMISSION 47
  17.302 -typedef struct {
  17.303 +typedef struct dom0_iomem_permission {
  17.304      domid_t  domain;          /* domain to be affected */
  17.305      unsigned long first_pfn;  /* first page (physical page number) in range */
  17.306      unsigned long nr_pfns;    /* number of pages in range (>0) */
  17.307 @@ -426,52 +425,52 @@ typedef struct {
  17.308  } dom0_iomem_permission_t;
  17.309   
  17.310  #define DOM0_HYPERCALL_INIT   48
  17.311 -typedef struct {
  17.312 +typedef struct dom0_hypercall_init {
  17.313      domid_t  domain;          /* domain to be affected */
  17.314      unsigned long mfn;        /* machine frame to be initialised */
  17.315  } dom0_hypercall_init_t;
  17.316   
  17.317 -typedef struct {
  17.318 +typedef struct dom0_op {
  17.319      uint32_t cmd;
  17.320      uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
  17.321      union {
  17.322 -        dom0_createdomain_t      createdomain;
  17.323 -        dom0_pausedomain_t       pausedomain;
  17.324 -        dom0_unpausedomain_t     unpausedomain;
  17.325 -        dom0_destroydomain_t     destroydomain;
  17.326 -        dom0_getmemlist_t        getmemlist;
  17.327 -        dom0_schedctl_t          schedctl;
  17.328 -        dom0_adjustdom_t         adjustdom;
  17.329 -        dom0_setvcpucontext_t    setvcpucontext;
  17.330 -        dom0_getdomaininfo_t     getdomaininfo;
  17.331 -        dom0_getpageframeinfo_t  getpageframeinfo;
  17.332 -        dom0_msr_t               msr;
  17.333 -        dom0_settime_t           settime;
  17.334 -        dom0_readconsole_t       readconsole;
  17.335 -        dom0_setvcpuaffinity_t   setvcpuaffinity;
  17.336 -        dom0_tbufcontrol_t       tbufcontrol;
  17.337 -        dom0_physinfo_t          physinfo;
  17.338 -        dom0_sched_id_t          sched_id;
  17.339 -        dom0_shadow_control_t    shadow_control;
  17.340 -        dom0_setdomainmaxmem_t   setdomainmaxmem;
  17.341 -        dom0_getpageframeinfo2_t getpageframeinfo2;
  17.342 -        dom0_add_memtype_t       add_memtype;
  17.343 -        dom0_del_memtype_t       del_memtype;
  17.344 -        dom0_read_memtype_t      read_memtype;
  17.345 -        dom0_perfccontrol_t      perfccontrol;
  17.346 -        dom0_microcode_t         microcode;
  17.347 -        dom0_ioport_permission_t ioport_permission;
  17.348 -        dom0_getvcpucontext_t    getvcpucontext;
  17.349 -        dom0_getvcpuinfo_t       getvcpuinfo;
  17.350 -        dom0_getdomaininfolist_t getdomaininfolist;
  17.351 -        dom0_platform_quirk_t    platform_quirk;
  17.352 -        dom0_physical_memory_map_t physical_memory_map;
  17.353 -        dom0_max_vcpus_t         max_vcpus;
  17.354 -        dom0_setdomainhandle_t   setdomainhandle;        
  17.355 -        dom0_setdebugging_t      setdebugging;
  17.356 -        dom0_irq_permission_t    irq_permission;
  17.357 -        dom0_iomem_permission_t  iomem_permission;
  17.358 -        dom0_hypercall_init_t    hypercall_init;
  17.359 +        struct dom0_createdomain      createdomain;
  17.360 +        struct dom0_pausedomain       pausedomain;
  17.361 +        struct dom0_unpausedomain     unpausedomain;
  17.362 +        struct dom0_destroydomain     destroydomain;
  17.363 +        struct dom0_getmemlist        getmemlist;
  17.364 +        struct sched_ctl_cmd          schedctl;
  17.365 +        struct sched_adjdom_cmd       adjustdom;
  17.366 +        struct dom0_setvcpucontext    setvcpucontext;
  17.367 +        struct dom0_getdomaininfo     getdomaininfo;
  17.368 +        struct dom0_getpageframeinfo  getpageframeinfo;
  17.369 +        struct dom0_msr               msr;
  17.370 +        struct dom0_settime           settime;
  17.371 +        struct dom0_readconsole       readconsole;
  17.372 +        struct dom0_setvcpuaffinity   setvcpuaffinity;
  17.373 +        struct dom0_tbufcontrol       tbufcontrol;
  17.374 +        struct dom0_physinfo          physinfo;
  17.375 +        struct dom0_sched_id          sched_id;
  17.376 +        struct dom0_shadow_control    shadow_control;
  17.377 +        struct dom0_setdomainmaxmem   setdomainmaxmem;
  17.378 +        struct dom0_getpageframeinfo2 getpageframeinfo2;
  17.379 +        struct dom0_add_memtype       add_memtype;
  17.380 +        struct dom0_del_memtype       del_memtype;
  17.381 +        struct dom0_read_memtype      read_memtype;
  17.382 +        struct dom0_perfccontrol      perfccontrol;
  17.383 +        struct dom0_microcode         microcode;
  17.384 +        struct dom0_ioport_permission ioport_permission;
  17.385 +        struct dom0_getvcpucontext    getvcpucontext;
  17.386 +        struct dom0_getvcpuinfo       getvcpuinfo;
  17.387 +        struct dom0_getdomaininfolist getdomaininfolist;
  17.388 +        struct dom0_platform_quirk    platform_quirk;
  17.389 +        struct dom0_physical_memory_map physical_memory_map;
  17.390 +        struct dom0_max_vcpus         max_vcpus;
  17.391 +        struct dom0_setdomainhandle   setdomainhandle;        
  17.392 +        struct dom0_setdebugging      setdebugging;
  17.393 +        struct dom0_irq_permission    irq_permission;
  17.394 +        struct dom0_iomem_permission  iomem_permission;
  17.395 +        struct dom0_hypercall_init    hypercall_init;
  17.396          uint8_t                  pad[128];
  17.397      } u;
  17.398  } dom0_op_t;
    18.1 --- a/xen/include/public/xen.h	Fri Jan 27 14:24:50 2006 +0000
    18.2 +++ b/xen/include/public/xen.h	Fri Jan 27 16:16:52 2006 +0100
    18.3 @@ -239,8 +239,7 @@ typedef uint16_t domid_t;
    18.4   * Send an array of these to HYPERVISOR_mmu_update().
    18.5   * NB. The fields are natural pointer/address size for this architecture.
    18.6   */
    18.7 -typedef struct
    18.8 -{
    18.9 +typedef struct mmu_update {
   18.10      uint64_t ptr;       /* Machine address of PTE. */
   18.11      uint64_t val;       /* New contents of PTE.    */
   18.12  } mmu_update_t;
   18.13 @@ -249,8 +248,7 @@ typedef struct
   18.14   * Send an array of these to HYPERVISOR_multicall().
   18.15   * NB. The fields are natural register size for this architecture.
   18.16   */
   18.17 -typedef struct
   18.18 -{
   18.19 +typedef struct multicall_entry {
   18.20      unsigned long op, result;
   18.21      unsigned long args[6];
   18.22  } multicall_entry_t;
    19.1 --- a/xen/include/xen/multicall.h	Fri Jan 27 14:24:50 2006 +0000
    19.2 +++ b/xen/include/xen/multicall.h	Fri Jan 27 16:16:52 2006 +0100
    19.3 @@ -12,8 +12,8 @@
    19.4  #define MCSF_in_multicall    (1<<_MCSF_in_multicall)
    19.5  #define MCSF_call_preempted  (1<<_MCSF_call_preempted)
    19.6  struct mc_state {
    19.7 -    unsigned long     flags;
    19.8 -    multicall_entry_t call;
    19.9 +    unsigned long flags;
   19.10 +    struct multicall_entry call;
   19.11  } __cacheline_aligned;
   19.12  
   19.13  extern struct mc_state mc_state[NR_CPUS];