[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix bug.



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID c7f883aaedb076e26577d21ab9d262dd24eb30d6
# Parent  c316e464f7c283cccda50bc885df22e3a13bb943

Fix bug.

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r c316e464f7c2 -r c7f883aaedb0 
linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c
--- a/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c        Wed Jul 20 
17:44:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c        Wed Jul 20 
19:45:05 2005
@@ -193,7 +193,7 @@
                                __pte(0), 0);
     }
 
-    mcl[nr_pages-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
+    mcl[nr_pages-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
         BUG();
 }
@@ -651,7 +651,7 @@
     {
        MULTI_update_va_mapping_otherdomain(
            mcl+i, MMAP_VADDR(pending_idx, i),
-           pfn_pte_ma(buffer_mach >> PAGE_SHIFT, remap_prot),
+           pfn_pte_ma((buffer_mach + offset) >> PAGE_SHIFT, remap_prot),
            0, up->domid);
         
         phys_to_machine_mapping[__pa(MMAP_VADDR(pending_idx, i))>>PAGE_SHIFT] =
diff -r c316e464f7c2 -r c7f883aaedb0 
linux-2.6-xen-sparse/include/asm-xen/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h Wed Jul 20 17:44:29 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h Wed Jul 20 19:45:05 2005
@@ -141,6 +141,14 @@
 
 #include <asm/hypercall.h>
 
+#if defined(CONFIG_X86_64)
+#define MULTI_UVMFLAGS_INDEX 2
+#define MULTI_UVMDOMID_INDEX 3
+#else
+#define MULTI_UVMFLAGS_INDEX 3
+#define MULTI_UVMDOMID_INDEX 4
+#endif
+
 static inline void
 MULTI_update_va_mapping(
     multicall_entry_t *mcl, unsigned long va,
diff -r c316e464f7c2 -r c7f883aaedb0 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Wed Jul 20 
17:44:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Wed Jul 20 
19:45:05 2005
@@ -271,7 +271,7 @@
     mcl->args[3] = DOMID_SELF;
     mcl++;
 
-    mcl[-3].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
+    mcl[-3].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     if ( unlikely(HYPERVISOR_multicall(rx_mcl, mcl - rx_mcl) != 0) )
         BUG();
 
@@ -428,7 +428,7 @@
         mcl++;     
     }
 
-    mcl[-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
+    mcl[-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     if ( unlikely(HYPERVISOR_multicall(tx_mcl, mcl - tx_mcl) != 0) )
         BUG();
 
@@ -571,6 +571,7 @@
            mcl, MMAP_VADDR(pending_idx),
            pfn_pte_ma(txreq.addr >> PAGE_SHIFT, PAGE_KERNEL),
            0, netif->domid);
+
         mcl++;
 
         memcpy(&pending_tx_info[pending_idx].req, &txreq, sizeof(txreq));
diff -r c316e464f7c2 -r c7f883aaedb0 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Wed Jul 20 
17:44:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Wed Jul 20 
19:45:05 2005
@@ -145,7 +145,7 @@
                                __pte(0), 0);
     }
 
-    mcl[nr_pages-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
+    mcl[nr_pages-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
     if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
         BUG();
 #endif
@@ -550,7 +550,7 @@
            0, blkif->domid);
 #ifdef CONFIG_XEN_BLKDEV_TAP_BE
         if ( blkif->is_blktap )
-            mcl[i].args[3] = ID_TO_DOM(req->id);
+            mcl[i].args[MULTI_UVMDOMID_INDEX] = ID_TO_DOM(req->id);
 #endif
         phys_to_machine_mapping[__pa(MMAP_VADDR(pending_idx, i))>>PAGE_SHIFT] =
             FOREIGN_FRAME(seg[i].buf >> PAGE_SHIFT);
diff -r c316e464f7c2 -r c7f883aaedb0 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Jul 20 
17:44:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Jul 20 
19:45:05 2005
@@ -400,7 +400,7 @@
     }
 
     /* After all PTEs have been zapped we blow away stale TLB entries. */
-    rx_mcl[i-1].args[2] = UVMF_TLB_FLUSH|UVMF_ALL;
+    rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
 
     /* Give away a batch of pages. */
     rx_mcl[i].op = __HYPERVISOR_dom_mem_op;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.