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-3.1-testing] xc ptrace: Fix a couple of bugs in pag

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] xc ptrace: Fix a couple of bugs in page-table walking.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Dec 2007 03:10:50 -0800
Delivery-date: Mon, 10 Dec 2007 03:30:28 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196962567 0
# Node ID 4d260fce3a7d50d7e082549fa2cdcdbcc069b6ab
# Parent  b4331a2778bcbc421db82cbf256fb83f6c733c66
xc ptrace: Fix a couple of bugs in page-table walking.
Signed-off-by: John Zulauf <john.zulauf@xxxxxxxxx>
xen-unstable changeset:   16544:d7a0a73e5dca64466843a420a3975ecf665d4762
xen-unstable date:        Thu Dec 06 11:29:18 2007 +0000
---
 tools/libxc/xc_ptrace.c |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff -r b4331a2778bc -r 4d260fce3a7d tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   Thu Dec 06 17:35:41 2007 +0000
+++ b/tools/libxc/xc_ptrace.c   Thu Dec 06 17:36:07 2007 +0000
@@ -156,21 +156,8 @@ static long      nr_pages = 0;
 static long      nr_pages = 0;
 static uint64_t *page_array = NULL;
 
-
-/*
- * Translates physical addresses to machine addresses for HVM
- * guests. For paravirtual domains the function will just return the
- * given address.
- *
- * This function should be used when reading page directories/page
- * tables.
- *
- */
-static uint64_t
-to_ma(int cpu, uint64_t maddr)
-{
-    if ( current_is_hvm && paging_enabled(&ctxt[cpu]) )
-        maddr = page_array[maddr >> PAGE_SHIFT] << PAGE_SHIFT;
+static uint64_t to_ma(int cpu, uint64_t maddr)
+{
     return maddr;
 }
 
@@ -310,7 +297,7 @@ map_domain_va_64(
         return NULL;
     l1p = to_ma(cpu, l2e);
     if (l2e & 0x80)  { /* 2M pages */
-        p = to_ma(cpu, (l1p + l1_table_offset(va)) << PAGE_SHIFT);
+        p = to_ma(cpu, l1p + (l1_table_offset(va) << PAGE_SHIFT));
     } else { /* 4K pages */
         l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, 
PROT_READ, l1p >> PAGE_SHIFT);
         if ( l1 == NULL )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] xc ptrace: Fix a couple of bugs in page-table walking., Xen patchbot-3.1-testing <=