Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] [PATCH][RFC] Gdbserver-xen support for HVM Guests... getting

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][RFC] Gdbserver-xen support for HVM Guests... getting further.
From: "Zulauf, John" <john.zulauf@xxxxxxxxx>
Date: Fri, 30 Nov 2007 16:50:23 -0800
Delivery-date: Fri, 30 Nov 2007 16:51:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgztCep6XAJy0OTTqySYR4Ir/K1JA==
Thread-topic: [PATCH][RFC] Gdbserver-xen support for HVM Guests... getting further.
All,

below is a minimal patch that allows me to attach, stepi, x,
disassemble, break with a 64bit HVM guest (2MB pages).  The RFC is for
the 1st fix below, also, others testing/experience trying this patch
would be welcome.  

1st fix: Diasable the gpfn to mfn mapping of to_ma.  This seems to be
the right thing to do (at least as the map_domain_va_* functions are
using it), as xc_map_foreign_range takes gpfn's for HVM domains.  Yet,
the comments in the file indicate that the mapping in to_ma is important
and specifically so for page tables.  Using a small HVM domain with
known page tables, I can verify that the correct pages are *only* loaded
with the to_ma mapping disabled.  Can anyone explain?  Is there some
*other* conditional case in which this would be correct?
 
2nd fix:  2M page calculation -- this is a simple misplacement of
parentheses that was causing the page directory entry to be shifted left
12.

Testing -- able to attach to 64bit HVM domains and info registers,
stepi, break, disassemble, x etc.
Issues Remaining
        cannot ^C to stop a domain  (wait for domain never returns)
        
        must explicitly "set architecture i386:x86_64" in the gdb
session to connect to 64 bit remote targets
        
        attempting to print variable contents or addresses "n" through
hvmloader (built -g) 
        resulted in gdb error messages: 
                dwarf2_read_address: Corrupted DWARF expression


Patch Signed-off by John Zulauf john.zulauf@xxxxxxxxx


Attachment: ptrace_fix.diff
Description: ptrace_fix.diff

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][RFC] Gdbserver-xen support for HVM Guests... getting further., Zulauf, John <=