ia64/xen-unstable

changeset 4717:fc628e971b0a

bitkeeper revision 1.1389.1.14 (427343557mBKHXIKNWB3vC3vSFMQ7g)

Fix xc_ptrace for paravirtualized guests.
Signed-off-by: Kip Macy <kmacy@fsmware.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Apr 30 08:35:33 2005 +0000 (2005-04-30)
parents cc205672af7c
children c36d6a98229a
files tools/libxc/xc_ptrace.c
line diff
     1.1 --- a/tools/libxc/xc_ptrace.c	Fri Apr 29 12:54:16 2005 +0000
     1.2 +++ b/tools/libxc/xc_ptrace.c	Sat Apr 30 08:35:33 2005 +0000
     1.3 @@ -181,7 +181,8 @@ map_domain_va(unsigned long domid, int c
     1.4      } 
     1.5      if ((pde = cr3_virt[cpu][vtopdi(va)]) == 0) /* logical address */
     1.6  	goto error_out;
     1.7 -    pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
     1.8 +    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
     1.9 +        pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
    1.10      if (pde != pde_phys[cpu]) 
    1.11      {
    1.12  	pde_phys[cpu] = pde;
    1.13 @@ -194,7 +195,8 @@ map_domain_va(unsigned long domid, int c
    1.14      }
    1.15      if ((page = pde_virt[cpu][vtopti(va)]) == 0) /* logical address */
    1.16  	goto error_out;
    1.17 -    page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
    1.18 +    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
    1.19 +        page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
    1.20      if (page != page_phys[cpu] || perm != prev_perm[cpu]) 
    1.21      {
    1.22  	page_phys[cpu] = page;