Kamble, Nitin A
2006-Mar-28 04:11 UTC
[Xen-devel] [PATCH] enable modifying of registers from gdb
Hi Keir, Ian, There were couple of bugs in the my friday''s patch to enable 64bit gdb debugging. I have fixed them in this patch. Also cleaned up the code for map_domain_va_XX codet. Other than that, now this patch also enables setting of registers from the gdb. Please comment or Apply. Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Mar-28 07:36 UTC
[Xen-devel] Re: [PATCH] enable modifying of registers from gdb
On 28 Mar 2006, at 05:11, Kamble, Nitin A wrote:> There were couple of bugs in the my friday’s patch to enable 64bit > gdb debugging. I have fixed them in this patch. Also cleaned up the > code for map_domain_va_XX codet. Other than that, now this patch also > enables setting of registers from the gdb. Please comment or Apply.You forgot to attach the patch. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kamble, Nitin A
2006-Mar-29 02:56 UTC
RE: [Xen-devel] [PATCH] enable modifying of registers from gdb
Hi Keir, Ian, I have updated the code with more fixes/changes in the patch and also cleaned up the map_domain_va code further. Now gdb is able to get guest memory correctly in various guest modes. For all these combinations of guests ... * 32bit guest on 32bit xen * 64bit guest on 64bit xen * 32bit guest on 64bit xen ... gdb is able to access the guest memory properly in these modes: * Paging disabled kernel * Paging enabled kernel * Real mode * User process memory * 2M kernel pages on 64bit guest * 4K user pages on 64bit guest Also the setting of registers works for all the combinations. Diffstat of the patch: tools/libxc/xc_ptrace.c | 383 ++++++++++++++++++++++++--------------------- tools/libxc/xc_ptrace.h | 6 xen/arch/x86/hvm/vmx/vmx.c | 47 +++++ xen/common/domain.c | 17 + 4 files changed, 274 insertions(+), 179 deletions(-) Please Comment or Apply. Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> Thanks & Regards, Nitin ----------------------------------------------------------------------------------- Open Source Technology Center, Intel Corp ________________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Kamble, Nitin A Sent: Monday, March 27, 2006 8:12 PM To: Keir.Fraser@cl.cam.ac.uk; Mallick, Asit K Cc: xen-devel@lists.xensource.com Subject: [Xen-devel] [PATCH] enable modifying of registers from gdb Hi Keir, Ian, There were couple of bugs in the my friday''s patch to enable 64bit gdb debugging. I have fixed them in this patch. Also cleaned up the code for map_domain_va_XX codet. Other than that, now this patch also enables setting of registers from the gdb. Please comment or Apply. Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> Thanks & Regards, Nitin ----------------------------------------------------------------------------------- Open Source Technology Center, Intel Corp _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Mar-29 13:08 UTC
Re: [Xen-devel] [PATCH] enable modifying of registers from gdb
On 29 Mar 2006, at 03:56, Kamble, Nitin A wrote:> I have updated the code with more fixes/changes in the patch and > also cleaned up the map_domain_va code further. Now gdb is able to get > guest memory correctly in various guest modes.Nitin, Most of the patch looks fine, except for your changes to setvcpucontext in domain.c. I think you should get rid of hvm_modify_guest_state() entirely (deleting both svm and vmx implementations) and replace the call to it in arch_set_info_guest() with a call to hvm_load_cpu_guest_regs(). I would then expect that your patch in domain.c is unnecessary: it should work for you to call arch_set_info_guest() regardless of whether DOMF_debugging is set. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kamble, Nitin A
2006-Mar-29 19:34 UTC
RE: [Xen-devel] [PATCH] enable modifying of registers from gdb
Hi Keir, Here is a new updated patch with the changes as you suggested. Patch diffstat: tools/libxc/xc_ptrace.c | 383 ++++++++++++++++++++----------------- tools/libxc/xc_ptrace.h | 6 xen/arch/x86/domain.c | 2 xen/arch/x86/hvm/svm/svm.c | 7 xen/arch/x86/hvm/svm/vmcb.c | 17 - xen/arch/x86/hvm/vmx/vmcs.c | 26 -- xen/arch/x86/hvm/vmx/vmx.c | 54 ++++- xen/common/domain.c | 1 xen/include/asm-x86/hvm/hvm.h | 8 xen/include/asm-x86/hvm/svm/svm.h | 1 xen/include/asm-x86/hvm/vmx/vmcs.h | 2 11 files changed, 261 insertions(+), 246 deletions(-) Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp>-----Original Message----- >From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >Sent: Wednesday, March 29, 2006 5:08 AM >To: Kamble, Nitin A >Cc: xen-devel@lists.xensource.com; Ian Pratt >Subject: Re: [Xen-devel] [PATCH] enable modifying of registers from gdb > > >On 29 Mar 2006, at 03:56, Kamble, Nitin A wrote: > >> I have updated the code with more fixes/changes in the patch and >> also cleaned up the map_domain_va code further. Now gdb is able toget>> guest memory correctly in various guest modes. > >Nitin, > >Most of the patch looks fine, except for your changes to setvcpucontext >in domain.c. > >I think you should get rid of hvm_modify_guest_state() entirely >(deleting both svm and vmx implementations) and replace the call to it >in arch_set_info_guest() with a call to hvm_load_cpu_guest_regs(). > >I would then expect that your patch in domain.c is unnecessary: it >should work for you to call arch_set_info_guest() regardless of whether >DOMF_debugging is set. > > -- Keir_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel