From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Sharma Subject: [PATCH][VT][4/4] Changing phys_to_machine_mapping[] is not implemented on VMX domains Date: Thu, 11 Aug 2005 15:00:53 -0700 Message-ID: <20050811220053.GA19889@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Changing phys_to_machine_mapping[] is not implemented on VMX domains Make it CONFIG_XEN only for now. Signed-off-by: Arun Sharma --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Aug 10 23:09:53 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Aug 10 16:59:36 2005 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -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);