ia64/xen-unstable

changeset 13403:3f419d160647

Fix xc_ptrace() for PAE.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Fri Jan 12 14:33:36 2007 +0000 (2007-01-12)
parents 3b4ddf62f657
children 7ad205a162a8
files tools/libxc/xc_ptrace.c
line diff
     1.1 --- a/tools/libxc/xc_ptrace.c	Fri Jan 12 14:32:41 2007 +0000
     1.2 +++ b/tools/libxc/xc_ptrace.c	Fri Jan 12 14:33:36 2007 +0000
     1.3 @@ -166,14 +166,11 @@ static unsigned long           *page_arr
     1.4   * tables.
     1.5   *
     1.6   */
     1.7 -static unsigned long
     1.8 -to_ma(int cpu,
     1.9 -      unsigned long in_addr)
    1.10 +static uint64_t
    1.11 +to_ma(int cpu, uint64_t maddr)
    1.12  {
    1.13 -    unsigned long maddr = in_addr;
    1.14 -
    1.15      if ( current_is_hvm && paging_enabled(&ctxt[cpu]) )
    1.16 -        maddr = page_array[maddr >> PAGE_SHIFT] << PAGE_SHIFT;
    1.17 +        maddr = (uint64_t)page_array[maddr >> PAGE_SHIFT] << PAGE_SHIFT;
    1.18      return maddr;
    1.19  }
    1.20  
    1.21 @@ -225,7 +222,8 @@ map_domain_va_pae(
    1.22      void *guest_va,
    1.23      int perm)
    1.24  {
    1.25 -    unsigned long l3e, l2e, l1e, l2p, l1p, p, va = (unsigned long)guest_va;
    1.26 +    uint64_t l3e, l2e, l1e, l2p, l1p, p;
    1.27 +    unsigned long va = (unsigned long)guest_va;
    1.28      uint64_t *l3, *l2, *l1;
    1.29      static void *v[MAX_VIRT_CPUS];
    1.30  
    1.31 @@ -380,12 +378,12 @@ map_domain_va(
    1.32  
    1.33      if (!paging_enabled(&ctxt[cpu])) {
    1.34          static void * v;
    1.35 -        unsigned long page;
    1.36 +        uint64_t page;
    1.37  
    1.38          if ( v != NULL )
    1.39              munmap(v, PAGE_SIZE);
    1.40  
    1.41 -        page = to_ma(cpu, page_array[va >> PAGE_SHIFT]);
    1.42 +        page = to_ma(cpu, va);
    1.43  
    1.44          v = xc_map_foreign_range( xc_handle, current_domid, PAGE_SIZE,
    1.45                  perm, page >> PAGE_SHIFT);