direct-io.hg

changeset 6803:b9b120c7631a

Get rid of anonymous unions in public header files.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Sep 14 13:13:10 2005 +0000 (2005-09-14)
parents cc1572db6a3d
children 1cdc469bf78d
files extras/mini-os/mm.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h tools/libxc/xc_linux_restore.c tools/libxc/xg_private.c xen/arch/x86/mm.c xen/include/public/arch-x86_64.h xen/include/public/xen.h
line diff
     1.1 --- a/extras/mini-os/mm.c	Wed Sep 14 12:49:13 2005 +0000
     1.2 +++ b/extras/mini-os/mm.c	Wed Sep 14 13:13:10 2005 +0000
     1.3 @@ -432,7 +432,7 @@ void build_pagetable(unsigned long *star
     1.4          
     1.5          /* Pin the page to provide correct protection */
     1.6          pin_request.cmd = MMUEXT_PIN_L1_TABLE;
     1.7 -        pin_request.mfn = pfn_to_mfn(pt_frame);
     1.8 +        pin_request.arg1.mfn = pfn_to_mfn(pt_frame);
     1.9          if(HYPERVISOR_mmuext_op(&pin_request, 1, NULL, DOMID_SELF) < 0)
    1.10          {
    1.11              printk("ERROR: pinning failed\n");
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Wed Sep 14 12:49:13 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Wed Sep 14 13:13:10 2005 +0000
     2.3 @@ -115,7 +115,7 @@ void xen_pt_switch(unsigned long ptr)
     2.4  {
     2.5  	struct mmuext_op op;
     2.6  	op.cmd = MMUEXT_NEW_BASEPTR;
     2.7 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
     2.8 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
     2.9  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.10  }
    2.11  
    2.12 @@ -123,7 +123,7 @@ void xen_new_user_pt(unsigned long ptr)
    2.13  {
    2.14  	struct mmuext_op op;
    2.15  	op.cmd = MMUEXT_NEW_USER_BASEPTR;
    2.16 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.17 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.18  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.19  }
    2.20  
    2.21 @@ -138,7 +138,7 @@ void xen_invlpg(unsigned long ptr)
    2.22  {
    2.23  	struct mmuext_op op;
    2.24  	op.cmd = MMUEXT_INVLPG_LOCAL;
    2.25 -	op.linear_addr = ptr & PAGE_MASK;
    2.26 +	op.arg1.linear_addr = ptr & PAGE_MASK;
    2.27  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.28  }
    2.29  
    2.30 @@ -157,7 +157,7 @@ void xen_tlb_flush_mask(cpumask_t *mask)
    2.31  	if ( cpus_empty(*mask) )
    2.32  		return;
    2.33  	op.cmd = MMUEXT_TLB_FLUSH_MULTI;
    2.34 -	op.vcpumask = mask->bits;
    2.35 +	op.arg2.vcpumask = mask->bits;
    2.36  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.37  }
    2.38  
    2.39 @@ -165,7 +165,7 @@ void xen_invlpg_all(unsigned long ptr)
    2.40  {
    2.41  	struct mmuext_op op;
    2.42  	op.cmd = MMUEXT_INVLPG_ALL;
    2.43 -	op.linear_addr = ptr & PAGE_MASK;
    2.44 +	op.arg1.linear_addr = ptr & PAGE_MASK;
    2.45  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.46  }
    2.47  
    2.48 @@ -175,8 +175,8 @@ void xen_invlpg_mask(cpumask_t *mask, un
    2.49  	if ( cpus_empty(*mask) )
    2.50  		return;
    2.51  	op.cmd = MMUEXT_INVLPG_MULTI;
    2.52 -	op.vcpumask = mask->bits;
    2.53 -	op.linear_addr = ptr & PAGE_MASK;
    2.54 +	op.arg1.linear_addr = ptr & PAGE_MASK;
    2.55 +	op.arg2.vcpumask    = mask->bits;
    2.56  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.57  }
    2.58  
    2.59 @@ -193,7 +193,7 @@ void xen_pgd_pin(unsigned long ptr)
    2.60  #else
    2.61  	op.cmd = MMUEXT_PIN_L2_TABLE;
    2.62  #endif
    2.63 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.64 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.65  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.66  }
    2.67  
    2.68 @@ -201,7 +201,7 @@ void xen_pgd_unpin(unsigned long ptr)
    2.69  {
    2.70  	struct mmuext_op op;
    2.71  	op.cmd = MMUEXT_UNPIN_TABLE;
    2.72 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.73 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.74  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.75  }
    2.76  
    2.77 @@ -209,7 +209,7 @@ void xen_pte_pin(unsigned long ptr)
    2.78  {
    2.79  	struct mmuext_op op;
    2.80  	op.cmd = MMUEXT_PIN_L1_TABLE;
    2.81 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.82 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.83  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.84  }
    2.85  
    2.86 @@ -217,7 +217,7 @@ void xen_pte_unpin(unsigned long ptr)
    2.87  {
    2.88  	struct mmuext_op op;
    2.89  	op.cmd = MMUEXT_UNPIN_TABLE;
    2.90 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.91 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
    2.92  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    2.93  }
    2.94  
    2.95 @@ -226,7 +226,7 @@ void xen_pud_pin(unsigned long ptr)
    2.96  {
    2.97  	struct mmuext_op op;
    2.98  	op.cmd = MMUEXT_PIN_L3_TABLE;
    2.99 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.100 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.101  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   2.102  }
   2.103  
   2.104 @@ -234,7 +234,7 @@ void xen_pud_unpin(unsigned long ptr)
   2.105  {
   2.106  	struct mmuext_op op;
   2.107  	op.cmd = MMUEXT_UNPIN_TABLE;
   2.108 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.109 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.110  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   2.111  }
   2.112  
   2.113 @@ -242,7 +242,7 @@ void xen_pmd_pin(unsigned long ptr)
   2.114  {
   2.115  	struct mmuext_op op;
   2.116  	op.cmd = MMUEXT_PIN_L2_TABLE;
   2.117 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.118 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.119  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   2.120  }
   2.121  
   2.122 @@ -250,7 +250,7 @@ void xen_pmd_unpin(unsigned long ptr)
   2.123  {
   2.124  	struct mmuext_op op;
   2.125  	op.cmd = MMUEXT_UNPIN_TABLE;
   2.126 -	op.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.127 +	op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
   2.128  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   2.129  }
   2.130  #endif /* CONFIG_X86_64 */
   2.131 @@ -260,8 +260,8 @@ void xen_set_ldt(unsigned long ptr, unsi
   2.132  {
   2.133  	struct mmuext_op op;
   2.134  	op.cmd = MMUEXT_SET_LDT;
   2.135 -	op.linear_addr = ptr;
   2.136 -	op.nr_ents = len;
   2.137 +	op.arg1.linear_addr = ptr;
   2.138 +	op.arg2.nr_ents     = len;
   2.139  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   2.140  }
   2.141  
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Wed Sep 14 12:49:13 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Wed Sep 14 13:13:10 2005 +0000
     3.3 @@ -294,7 +294,7 @@ static void net_rx_action(unsigned long 
     3.4          mcl++;
     3.5  
     3.6          mmuext->cmd = MMUEXT_REASSIGN_PAGE;
     3.7 -        mmuext->mfn = old_mfn;
     3.8 +        mmuext->arg1.mfn = old_mfn;
     3.9          mmuext++;
    3.10  #endif
    3.11          mmu->ptr = ((unsigned long long)new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
    3.12 @@ -355,7 +355,7 @@ static void net_rx_action(unsigned long 
    3.13  #ifdef CONFIG_XEN_NETDEV_GRANT
    3.14          old_mfn = 0; /* XXX Fix this so we can free_mfn() on error! */
    3.15  #else
    3.16 -        old_mfn = mmuext[0].mfn;
    3.17 +        old_mfn = mmuext[0].arg1.mfn;
    3.18  #endif
    3.19          atomic_set(&(skb_shinfo(skb)->dataref), 1);
    3.20          skb_shinfo(skb)->nr_frags = 0;
     4.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h	Wed Sep 14 12:49:13 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h	Wed Sep 14 13:13:10 2005 +0000
     4.3 @@ -67,7 +67,7 @@ static inline void switch_mm(struct mm_s
     4.4  		/* Re-load page tables: load_cr3(next->pgd) */
     4.5  		per_cpu(cur_pgd, cpu) = next->pgd;
     4.6  		op->cmd = MMUEXT_NEW_BASEPTR;
     4.7 -		op->mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
     4.8 +		op->arg1.mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
     4.9  		op++;
    4.10  
    4.11  		/*
    4.12 @@ -76,8 +76,8 @@ static inline void switch_mm(struct mm_s
    4.13  		if (unlikely(prev->context.ldt != next->context.ldt)) {
    4.14  			/* load_LDT_nolock(&next->context, cpu) */
    4.15  			op->cmd = MMUEXT_SET_LDT;
    4.16 -			op->linear_addr = (unsigned long)next->context.ldt;
    4.17 -			op->nr_ents     = next->context.size;
    4.18 +			op->arg1.linear_addr = (unsigned long)next->context.ldt;
    4.19 +			op->arg2.nr_ents     = next->context.size;
    4.20  			op++;
    4.21  		}
    4.22  
     5.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h	Wed Sep 14 12:49:13 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h	Wed Sep 14 13:13:10 2005 +0000
     5.3 @@ -83,19 +83,19 @@ static inline void switch_mm(struct mm_s
     5.4  		/* load_cr3(next->pgd) */
     5.5  		per_cpu(cur_pgd, smp_processor_id()) = next->pgd;
     5.6  		op->cmd = MMUEXT_NEW_BASEPTR;
     5.7 -		op->mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
     5.8 +		op->arg1.mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
     5.9  		op++;
    5.10  
    5.11  		/* xen_new_user_pt(__pa(__user_pgd(next->pgd))) */
    5.12  		op->cmd = MMUEXT_NEW_USER_BASEPTR;
    5.13 -		op->mfn = pfn_to_mfn(__pa(__user_pgd(next->pgd)) >> PAGE_SHIFT);
    5.14 +		op->arg1.mfn = pfn_to_mfn(__pa(__user_pgd(next->pgd)) >> PAGE_SHIFT);
    5.15  		op++;
    5.16  		
    5.17  		if (unlikely(next->context.ldt != prev->context.ldt)) {
    5.18  			/* load_LDT_nolock(&next->context, cpu) */
    5.19  			op->cmd = MMUEXT_SET_LDT;
    5.20 -			op->linear_addr = (unsigned long)next->context.ldt;
    5.21 -			op->nr_ents     = next->context.size;
    5.22 +			op->arg1.linear_addr = (unsigned long)next->context.ldt;
    5.23 +			op->arg2.nr_ents     = next->context.size;
    5.24  			op++;
    5.25  		}
    5.26  
     6.1 --- a/tools/libxc/xc_linux_restore.c	Wed Sep 14 12:49:13 2005 +0000
     6.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Sep 14 13:13:10 2005 +0000
     6.3 @@ -421,7 +421,7 @@ int xc_linux_restore(int xc_handle, int 
     6.4              pin[nr_pins].cmd = MMUEXT_PIN_L1_TABLE;
     6.5          else /* pfn_type[i] == (L2TAB|LPINTAB) */
     6.6              pin[nr_pins].cmd = MMUEXT_PIN_L2_TABLE;
     6.7 -        pin[nr_pins].mfn = pfn_to_mfn_table[i];
     6.8 +        pin[nr_pins].arg1.mfn = pfn_to_mfn_table[i];
     6.9          if ( ++nr_pins == MAX_PIN_BATCH )
    6.10          {
    6.11              if ( xc_mmuext_op(xc_handle, pin, nr_pins, dom) < 0 )
     7.1 --- a/tools/libxc/xg_private.c	Wed Sep 14 12:49:13 2005 +0000
     7.2 +++ b/tools/libxc/xg_private.c	Wed Sep 14 13:13:10 2005 +0000
     7.3 @@ -65,7 +65,7 @@ int pin_table(
     7.4      struct mmuext_op op;
     7.5  
     7.6      op.cmd = type;
     7.7 -    op.mfn = mfn;
     7.8 +    op.arg1.mfn = mfn;
     7.9  
    7.10      if ( xc_mmuext_op(xc_handle, &op, 1, dom) < 0 )
    7.11          return 1;
     8.1 --- a/xen/arch/x86/mm.c	Wed Sep 14 12:49:13 2005 +0000
     8.2 +++ b/xen/arch/x86/mm.c	Wed Sep 14 13:13:10 2005 +0000
     8.3 @@ -1659,7 +1659,7 @@ int do_mmuext_op(
     8.4  {
     8.5      struct mmuext_op op;
     8.6      int rc = 0, i = 0, okay, cpu = smp_processor_id();
     8.7 -    unsigned long type, done = 0;
     8.8 +    unsigned long mfn, type, done = 0;
     8.9      struct pfn_info *page;
    8.10      struct vcpu *v = current;
    8.11      struct domain *d = v->domain, *e;
    8.12 @@ -1706,7 +1706,8 @@ int do_mmuext_op(
    8.13          }
    8.14  
    8.15          okay = 1;
    8.16 -        page = &frame_table[op.mfn];
    8.17 +        mfn  = op.arg1.mfn;
    8.18 +        page = &frame_table[mfn];
    8.19  
    8.20          switch ( op.cmd )
    8.21          {
    8.22 @@ -1717,17 +1718,17 @@ int do_mmuext_op(
    8.23              if ( shadow_mode_refcounts(FOREIGNDOM) )
    8.24                  type = PGT_writable_page;
    8.25  
    8.26 -            okay = get_page_and_type_from_pagenr(op.mfn, type, FOREIGNDOM);
    8.27 +            okay = get_page_and_type_from_pagenr(mfn, type, FOREIGNDOM);
    8.28              if ( unlikely(!okay) )
    8.29              {
    8.30 -                MEM_LOG("Error while pinning mfn %lx", op.mfn);
    8.31 +                MEM_LOG("Error while pinning mfn %lx", mfn);
    8.32                  break;
    8.33              }
    8.34              
    8.35              if ( unlikely(test_and_set_bit(_PGT_pinned,
    8.36                                             &page->u.inuse.type_info)) )
    8.37              {
    8.38 -                MEM_LOG("Mfn %lx already pinned", op.mfn);
    8.39 +                MEM_LOG("Mfn %lx already pinned", mfn);
    8.40                  put_page_and_type(page);
    8.41                  okay = 0;
    8.42                  break;
    8.43 @@ -1750,10 +1751,10 @@ int do_mmuext_op(
    8.44              goto pin_page;
    8.45  
    8.46          case MMUEXT_UNPIN_TABLE:
    8.47 -            if ( unlikely(!(okay = get_page_from_pagenr(op.mfn, FOREIGNDOM))) )
    8.48 +            if ( unlikely(!(okay = get_page_from_pagenr(mfn, FOREIGNDOM))) )
    8.49              {
    8.50                  MEM_LOG("Mfn %lx bad domain (dom=%p)",
    8.51 -                        op.mfn, page_get_owner(page));
    8.52 +                        mfn, page_get_owner(page));
    8.53              }
    8.54              else if ( likely(test_and_clear_bit(_PGT_pinned, 
    8.55                                                  &page->u.inuse.type_info)) )
    8.56 @@ -1765,28 +1766,28 @@ int do_mmuext_op(
    8.57              {
    8.58                  okay = 0;
    8.59                  put_page(page);
    8.60 -                MEM_LOG("Mfn %lx not pinned", op.mfn);
    8.61 +                MEM_LOG("Mfn %lx not pinned", mfn);
    8.62              }
    8.63              break;
    8.64  
    8.65          case MMUEXT_NEW_BASEPTR:
    8.66 -            okay = new_guest_cr3(op.mfn);
    8.67 +            okay = new_guest_cr3(mfn);
    8.68              percpu_info[cpu].deferred_ops &= ~DOP_FLUSH_TLB;
    8.69              break;
    8.70          
    8.71  #ifdef __x86_64__
    8.72          case MMUEXT_NEW_USER_BASEPTR:
    8.73              okay = get_page_and_type_from_pagenr(
    8.74 -                op.mfn, PGT_root_page_table, d);
    8.75 +                mfn, PGT_root_page_table, d);
    8.76              if ( unlikely(!okay) )
    8.77              {
    8.78 -                MEM_LOG("Error while installing new mfn %lx", op.mfn);
    8.79 +                MEM_LOG("Error while installing new mfn %lx", mfn);
    8.80              }
    8.81              else
    8.82              {
    8.83                  unsigned long old_mfn =
    8.84                      pagetable_get_pfn(v->arch.guest_table_user);
    8.85 -                v->arch.guest_table_user = mk_pagetable(op.mfn << PAGE_SHIFT);
    8.86 +                v->arch.guest_table_user = mk_pagetable(mfn << PAGE_SHIFT);
    8.87                  if ( old_mfn != 0 )
    8.88                      put_page_and_type(&frame_table[old_mfn]);
    8.89              }
    8.90 @@ -1799,8 +1800,8 @@ int do_mmuext_op(
    8.91      
    8.92          case MMUEXT_INVLPG_LOCAL:
    8.93              if ( shadow_mode_enabled(d) )
    8.94 -                shadow_invlpg(v, op.linear_addr);
    8.95 -            local_flush_tlb_one(op.linear_addr);
    8.96 +                shadow_invlpg(v, op.arg1.linear_addr);
    8.97 +            local_flush_tlb_one(op.arg1.linear_addr);
    8.98              break;
    8.99  
   8.100          case MMUEXT_TLB_FLUSH_MULTI:
   8.101 @@ -1808,7 +1809,7 @@ int do_mmuext_op(
   8.102          {
   8.103              unsigned long vmask;
   8.104              cpumask_t     pmask;
   8.105 -            if ( unlikely(get_user(vmask, (unsigned long *)op.vcpumask)) )
   8.106 +            if ( unlikely(get_user(vmask, (unsigned long *)op.arg2.vcpumask)) )
   8.107              {
   8.108                  okay = 0;
   8.109                  break;
   8.110 @@ -1818,7 +1819,7 @@ int do_mmuext_op(
   8.111              if ( op.cmd == MMUEXT_TLB_FLUSH_MULTI )
   8.112                  flush_tlb_mask(pmask);
   8.113              else
   8.114 -                flush_tlb_one_mask(pmask, op.linear_addr);
   8.115 +                flush_tlb_one_mask(pmask, op.arg1.linear_addr);
   8.116              break;
   8.117          }
   8.118  
   8.119 @@ -1827,7 +1828,7 @@ int do_mmuext_op(
   8.120              break;
   8.121      
   8.122          case MMUEXT_INVLPG_ALL:
   8.123 -            flush_tlb_one_mask(d->cpumask, op.linear_addr);
   8.124 +            flush_tlb_one_mask(d->cpumask, op.arg1.linear_addr);
   8.125              break;
   8.126  
   8.127          case MMUEXT_FLUSH_CACHE:
   8.128 @@ -1852,8 +1853,8 @@ int do_mmuext_op(
   8.129                  break;
   8.130              }
   8.131  
   8.132 -            unsigned long ptr  = op.linear_addr;
   8.133 -            unsigned long ents = op.nr_ents;
   8.134 +            unsigned long ptr  = op.arg1.linear_addr;
   8.135 +            unsigned long ents = op.arg2.nr_ents;
   8.136              if ( ((ptr & (PAGE_SIZE-1)) != 0) || 
   8.137                   (ents > 8192) ||
   8.138                   !array_access_ok(ptr, ents, LDT_ENTRY_SIZE) )
   8.139 @@ -1886,7 +1887,7 @@ int do_mmuext_op(
   8.140              e = percpu_info[cpu].foreign;
   8.141              if ( unlikely(e == NULL) )
   8.142              {
   8.143 -                MEM_LOG("No FOREIGNDOM to reassign mfn %lx to", op.mfn);
   8.144 +                MEM_LOG("No FOREIGNDOM to reassign mfn %lx to", mfn);
   8.145                  okay = 0;
   8.146                  break;
   8.147              }
   8.148 @@ -1919,7 +1920,7 @@ int do_mmuext_op(
   8.149              {
   8.150                  MEM_LOG("Transferee has no reservation headroom (%d,%d), or "
   8.151                          "page is in Xen heap (%lx), or dom is dying (%ld).",
   8.152 -                        e->tot_pages, e->max_pages, op.mfn, e->domain_flags);
   8.153 +                        e->tot_pages, e->max_pages, mfn, e->domain_flags);
   8.154                  okay = 0;
   8.155                  goto reassign_fail;
   8.156              }
     9.1 --- a/xen/include/public/arch-x86_64.h	Wed Sep 14 12:49:13 2005 +0000
     9.2 +++ b/xen/include/public/arch-x86_64.h	Wed Sep 14 13:13:10 2005 +0000
     9.3 @@ -124,30 +124,38 @@ typedef struct trap_info {
     9.4      unsigned long address; /* code offset                                   */
     9.5  } trap_info_t;
     9.6  
     9.7 +#ifdef __GNUC__
     9.8 +/* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
     9.9 +#define __DECL_REG(name) union { u64 r ## name, e ## name; }
    9.10 +#else
    9.11 +/* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
    9.12 +#define __DECL_REG(name) u64 r ## name
    9.13 +#endif
    9.14 +
    9.15  typedef struct cpu_user_regs {
    9.16      u64 r15;
    9.17      u64 r14;
    9.18      u64 r13;
    9.19      u64 r12;
    9.20 -    union { u64 rbp, ebp; };
    9.21 -    union { u64 rbx, ebx; };
    9.22 +    __DECL_REG(bp);
    9.23 +    __DECL_REG(bx);
    9.24      u64 r11;
    9.25      u64 r10;
    9.26      u64 r9;
    9.27      u64 r8;
    9.28 -    union { u64 rax, eax; };
    9.29 -    union { u64 rcx, ecx; };
    9.30 -    union { u64 rdx, edx; };
    9.31 -    union { u64 rsi, esi; };
    9.32 -    union { u64 rdi, edi; };
    9.33 +    __DECL_REG(ax);
    9.34 +    __DECL_REG(cx);
    9.35 +    __DECL_REG(dx);
    9.36 +    __DECL_REG(si);
    9.37 +    __DECL_REG(di);
    9.38      u32 error_code;    /* private */
    9.39      u32 entry_vector;  /* private */
    9.40 -    union { u64 rip, eip; };
    9.41 +    __DECL_REG(ip);
    9.42      u16 cs, _pad0[1];
    9.43      u8  saved_upcall_mask;
    9.44      u8  _pad1[3];
    9.45 -    union { u64 rflags, eflags; };
    9.46 -    union { u64 rsp, esp; };
    9.47 +    __DECL_REG(flags);
    9.48 +    __DECL_REG(sp);
    9.49      u16 ss, _pad2[3];
    9.50      u16 es, _pad3[3];
    9.51      u16 ds, _pad4[3];
    9.52 @@ -155,6 +163,8 @@ typedef struct cpu_user_regs {
    9.53      u16 gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_user. */
    9.54  } cpu_user_regs_t;
    9.55  
    9.56 +#undef __DECL_REG
    9.57 +
    9.58  typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
    9.59  
    9.60  /*
    10.1 --- a/xen/include/public/xen.h	Wed Sep 14 12:49:13 2005 +0000
    10.2 +++ b/xen/include/public/xen.h	Wed Sep 14 13:13:10 2005 +0000
    10.3 @@ -174,13 +174,13 @@ struct mmuext_op {
    10.4          unsigned long mfn;
    10.5          /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
    10.6          unsigned long linear_addr;
    10.7 -    };
    10.8 +    } arg1;
    10.9      union {
   10.10          /* SET_LDT */
   10.11          unsigned int nr_ents;
   10.12          /* TLB_FLUSH_MULTI, INVLPG_MULTI */
   10.13          void *vcpumask;
   10.14 -    };
   10.15 +    } arg2;
   10.16  };
   10.17  #endif
   10.18