WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Update map_pages_to_xen() to avoid a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Update map_pages_to_xen() to avoid arithmetic based on
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 15:45:44 -0800
Delivery-date: Mon, 26 Feb 2007 15:46:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172507255 0
# Node ID 0070b18869f7ac1ad5514186eff001be9cdccf44
# Parent  9e5e94942045ac09a4d3e4aa87ef49e226b79d56
x86: Update map_pages_to_xen() to avoid arithmetic based on
uninitialised frame_table variable.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 9e5e94942045 -r 0070b18869f7 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Feb 26 16:25:17 2007 +0000
+++ b/xen/arch/x86/mm.c Mon Feb 26 16:27:35 2007 +0000
@@ -3401,7 +3401,7 @@ int map_pages_to_xen(
             {
                 local_flush_tlb_pge();
                 if ( !(l2e_get_flags(ol2e) & _PAGE_PSE) )
-                    free_xen_pagetable(page_to_virt(l2e_get_page(ol2e)));
+                    free_xen_pagetable(mfn_to_virt(l2e_get_pfn(ol2e)));
             }
 
             virt    += 1UL << L2_PAGETABLE_SHIFT;
@@ -3415,8 +3415,8 @@ int map_pages_to_xen(
             {
                 pl1e = alloc_xen_pagetable();
                 clear_page(pl1e);
-                l2e_write(pl2e, l2e_from_page(virt_to_page(pl1e),
-                                              __PAGE_HYPERVISOR));
+                l2e_write(pl2e, l2e_from_pfn(virt_to_mfn(pl1e),
+                                             __PAGE_HYPERVISOR));
             }
             else if ( l2e_get_flags(*pl2e) & _PAGE_PSE )
             {
@@ -3425,8 +3425,8 @@ int map_pages_to_xen(
                     l1e_write(&pl1e[i],
                               l1e_from_pfn(l2e_get_pfn(*pl2e) + i,
                                            l2e_get_flags(*pl2e) & ~_PAGE_PSE));
-                l2e_write(pl2e, l2e_from_page(virt_to_page(pl1e),
-                                              __PAGE_HYPERVISOR));
+                l2e_write(pl2e, l2e_from_pfn(virt_to_mfn(pl1e),
+                                             __PAGE_HYPERVISOR));
                 local_flush_tlb_pge();
             }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Update map_pages_to_xen() to avoid arithmetic based on, Xen patchbot-unstable <=