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-devel

[Xen-devel] resend Fwd: xc_ptrace fix

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] resend Fwd: xc_ptrace fix
From: Kip Macy <kip.macy@xxxxxxxxx>
Date: Fri, 29 Apr 2005 17:04:32 -0700
Delivery-date: Sat, 30 Apr 2005 00:04:34 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ihs5GkhH5NNvuePHqnWrZ5HT+OTtnXS+Q/ZkmHX3cRQzng10IgdZHHjxaGaZSDo/sOrt9TWyXMSR3zDfx3ZtzEttmeh5hGuoDgJcuqMiTT2SVs11Hi26RcU1+2i0J3CKLTXyCAMtrcK76dBZacVqcN7AD/OyuQ0VzxpON3G2QGQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b1fa291705042819082aa11463@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <b1fa291705042819082aa11463@xxxxxxxxxxxxxx>
Reply-to: Kip Macy <kip.macy@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Please apply.  Paravirtualized guest debugging does not work without
this change.

---------- Forwarded message ----------
From: Kip Macy <kip.macy@xxxxxxxxx>
Date: Apr 28, 2005 7:08 PM
Subject: xc_ptrace fix
To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>


Make work for paravirtualized guest

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/04/28 15:22:26-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx
#   Fix xc_ptrace
#   Signed-off-by: Kip Macy <kmacy@xxxxxxxxxxx>
#
# BitKeeper/etc/logging_ok
#   2005/04/28 15:22:26-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +1 -0
#   Logging to logging@xxxxxxxxxxxxxxx accepted
#
# tools/libxc/xc_ptrace.c
#   2005/04/28 15:22:15-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +4 -2
#   don't reference page_array in the paravirtualized case
#
diff -Nru a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   2005-04-27 19:11:24 -07:00
+++ b/tools/libxc/xc_ptrace.c   2005-04-27 19:11:24 -07:00
@@ -181,7 +181,8 @@
     }
     if ((pde = cr3_virt[cpu][vtopdi(va)]) == 0) /* logical address */
        goto error_out;
-    pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
+    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
+       pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
     if (pde != pde_phys[cpu])
     {
        pde_phys[cpu] = pde;
@@ -194,7 +195,8 @@
     }
     if ((page = pde_virt[cpu][vtopti(va)]) == 0) /* logical address */
        goto error_out;
-    page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
+    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
+       page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
     if (page != page_phys[cpu] || perm != prev_perm[cpu])
     {
        page_phys[cpu] = page;

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

<Prev in Thread] Current Thread [Next in Thread>