ia64/xen-unstable

changeset 5834:c7f883aaedb0

Fix bug.

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Wed Jul 20 19:45:05 2005 +0000 (2005-07-20)
parents c316e464f7c2
children dd3dbd7c82e0
files linux-2.6-xen-sparse/drivers/xen/Makefile linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/include/asm-xen/hypervisor.h
line diff
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Wed Jul 20 17:44:29 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Wed Jul 20 19:45:05 2005 +0000
     2.3 @@ -145,7 +145,7 @@ static void fast_flush_area(int idx, int
     2.4  				__pte(0), 0);
     2.5      }
     2.6  
     2.7 -    mcl[nr_pages-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
     2.8 +    mcl[nr_pages-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     2.9      if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
    2.10          BUG();
    2.11  #endif
    2.12 @@ -550,7 +550,7 @@ static void dispatch_rw_block_io(blkif_t
    2.13  	    0, blkif->domid);
    2.14  #ifdef CONFIG_XEN_BLKDEV_TAP_BE
    2.15          if ( blkif->is_blktap )
    2.16 -            mcl[i].args[3] = ID_TO_DOM(req->id);
    2.17 +            mcl[i].args[MULTI_UVMDOMID_INDEX] = ID_TO_DOM(req->id);
    2.18  #endif
    2.19          phys_to_machine_mapping[__pa(MMAP_VADDR(pending_idx, i))>>PAGE_SHIFT] =
    2.20              FOREIGN_FRAME(seg[i].buf >> PAGE_SHIFT);
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Wed Jul 20 17:44:29 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Wed Jul 20 19:45:05 2005 +0000
     3.3 @@ -271,7 +271,7 @@ static void net_rx_action(unsigned long 
     3.4      mcl->args[3] = DOMID_SELF;
     3.5      mcl++;
     3.6  
     3.7 -    mcl[-3].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
     3.8 +    mcl[-3].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     3.9      if ( unlikely(HYPERVISOR_multicall(rx_mcl, mcl - rx_mcl) != 0) )
    3.10          BUG();
    3.11  
    3.12 @@ -428,7 +428,7 @@ static void net_tx_action(unsigned long 
    3.13          mcl++;     
    3.14      }
    3.15  
    3.16 -    mcl[-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
    3.17 +    mcl[-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
    3.18      if ( unlikely(HYPERVISOR_multicall(tx_mcl, mcl - tx_mcl) != 0) )
    3.19          BUG();
    3.20  
    3.21 @@ -571,6 +571,7 @@ static void net_tx_action(unsigned long 
    3.22  	    mcl, MMAP_VADDR(pending_idx),
    3.23  	    pfn_pte_ma(txreq.addr >> PAGE_SHIFT, PAGE_KERNEL),
    3.24  	    0, netif->domid);
    3.25 +
    3.26          mcl++;
    3.27  
    3.28          memcpy(&pending_tx_info[pending_idx].req, &txreq, sizeof(txreq));
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Wed Jul 20 17:44:29 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Wed Jul 20 19:45:05 2005 +0000
     4.3 @@ -400,7 +400,7 @@ static void network_alloc_rx_buffers(str
     4.4      }
     4.5  
     4.6      /* After all PTEs have been zapped we blow away stale TLB entries. */
     4.7 -    rx_mcl[i-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
     4.8 +    rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     4.9  
    4.10      /* Give away a batch of pages. */
    4.11      rx_mcl[i].op = __HYPERVISOR_dom_mem_op;
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c	Wed Jul 20 17:44:29 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c	Wed Jul 20 19:45:05 2005 +0000
     5.3 @@ -193,7 +193,7 @@ static void fast_flush_area(int idx, int
     5.4  				__pte(0), 0);
     5.5      }
     5.6  
     5.7 -    mcl[nr_pages-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
     5.8 +    mcl[nr_pages-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     5.9      if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
    5.10          BUG();
    5.11  }
    5.12 @@ -651,7 +651,7 @@ static void dispatch_usb_io(usbif_priv_t
    5.13      {
    5.14  	MULTI_update_va_mapping_otherdomain(
    5.15  	    mcl+i, MMAP_VADDR(pending_idx, i),
    5.16 -	    pfn_pte_ma(buffer_mach >> PAGE_SHIFT, remap_prot),
    5.17 +	    pfn_pte_ma((buffer_mach + offset) >> PAGE_SHIFT, remap_prot),
    5.18  	    0, up->domid);
    5.19          
    5.20          phys_to_machine_mapping[__pa(MMAP_VADDR(pending_idx, i))>>PAGE_SHIFT] =
     6.1 --- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Wed Jul 20 17:44:29 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Wed Jul 20 19:45:05 2005 +0000
     6.3 @@ -141,6 +141,14 @@ unsigned long allocate_empty_lowmem_regi
     6.4  
     6.5  #include <asm/hypercall.h>
     6.6  
     6.7 +#if defined(CONFIG_X86_64)
     6.8 +#define MULTI_UVMFLAGS_INDEX 2
     6.9 +#define MULTI_UVMDOMID_INDEX 3
    6.10 +#else
    6.11 +#define MULTI_UVMFLAGS_INDEX 3
    6.12 +#define MULTI_UVMDOMID_INDEX 4
    6.13 +#endif
    6.14 +
    6.15  static inline void
    6.16  MULTI_update_va_mapping(
    6.17      multicall_entry_t *mcl, unsigned long va,