Skip to contentSkip to conversation

Changing phys_to_machine_mapping[] is not implemented on VMX domains

PATCH New Arun Sharma 1 participant 1 message Aug 11, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Changing phys_to_machine_mapping[] is not implemented on VMX domains

Changing phys_to_machine_mapping[] is not implemented on VMX domains

Make it CONFIG_XEN only for now.

linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +6 -0
@@ -49,6 +49,7 @@
 #include <asm/uaccess.h>
 #include <asm-xen/evtchn.h>
 #include <asm-xen/ctrl_if.h>
+#include <asm-xen/xen-public/grant_table.h>
 #include <asm-xen/xen-public/io/netif.h>
 #include <asm-xen/balloon.h>
 #include <asm/page.h>
@@ -444,9 +445,11 @@
 #endif
         rx_pfn_array[i] = virt_to_machine(skb->head) >> PAGE_SHIFT;
 
+#ifdef CONFIG_XEN
 	/* Remove this page from pseudo phys map before passing back to Xen. */
 	phys_to_machine_mapping[__pa(skb->head) >> PAGE_SHIFT] 
 	    = INVALID_P2M_ENTRY;
+#endif
 
 	MULTI_update_va_mapping(rx_mcl+i, (unsigned long)skb->head,
 				__pte(0), 0);
@@ -678,12 +681,15 @@
 #endif
         mcl++;
 
+#ifdef CONFIG_XEN
         phys_to_machine_mapping[__pa(skb->head) >> PAGE_SHIFT] = 
 #ifdef CONFIG_XEN_NETDEV_GRANT_RX
             mfn;
 #else
             rx->addr >> PAGE_SHIFT;
 #endif
+#endif
+
 #ifdef GRANT_DEBUG
         printk(KERN_ALERT "#### rx_poll     enqueue vdata=%08x mfn=%08x ref=%04x\n",
                skb->data, mfn, ref);