From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 4 of 4] Add a trace hypercall to allow tracing from dom0 or domU Date: Mon, 18 Jul 2011 12:17:36 +0100 Message-ID: <1310987856.3401.23.camel@elijah> References: <20110718085611.GA18276@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110718085611.GA18276@whitby.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: George Dunlap , Olaf Hering , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2011-07-18 at 09:56 +0100, Tim Deegan wrote: > Hi, > > At 17:38 +0200 on 15 Jul (1310751488), Olaf Hering wrote: > > diff -r 6e4aef7b5051 -r f72dcd1b8bbd xen/arch/x86/x86_32/entry.S > > --- a/xen/arch/x86/x86_32/entry.S > > +++ b/xen/arch/x86/x86_32/entry.S > > @@ -699,6 +699,7 @@ ENTRY(hypercall_table) > > .long do_domctl > > .long do_kexec_op > > .long do_tmem_op > > + .long do_xentrace_op > > .rept __HYPERVISOR_arch_0-((.-hypercall_table)/4) > > .long do_ni_hypercall > > .endr > > @@ -747,6 +748,7 @@ ENTRY(hypercall_args_table) > > .byte 1 /* do_domctl */ > > .byte 2 /* do_kexec_op */ > > .byte 1 /* do_tmem_op */ > > + .byte 0 /* do_xentrace_op */ > > .rept __HYPERVISOR_arch_0-(.-hypercall_args_table) > > .byte 0 /* do_ni_hypercall */ > > .endr > > diff -r 6e4aef7b5051 -r f72dcd1b8bbd xen/arch/x86/x86_64/entry.S > > --- a/xen/arch/x86/x86_64/entry.S > > +++ b/xen/arch/x86/x86_64/entry.S > > @@ -694,6 +694,7 @@ ENTRY(hypercall_table) > > .quad do_domctl > > .quad do_kexec_op > > .quad do_tmem_op > > + .quad do_xentrace_op > > .rept __HYPERVISOR_arch_0-((.-hypercall_table)/8) > > .quad do_ni_hypercall > > .endr > > @@ -742,6 +743,7 @@ ENTRY(hypercall_args_table) > > .byte 1 /* do_domctl */ > > .byte 2 /* do_kexec */ > > .byte 1 /* do_tmem_op */ > > + .byte 0 /* do_xentrace_op */ > > .rept __HYPERVISOR_arch_0-(.-hypercall_args_table) > > .byte 0 /* do_ni_hypercall */ > > .endr > > You need to do the same in x86/x86_64/compat/entry.S for 32-on-64 guests > to be able to call it too. > > Also, can you add some comments somewhere (say, public/trace.h) to say > exactly what the new hypercall does and how to use it? A patch to > docs/src/interface.tex would be great too, even if the rest of that doc > is quite out of date. > > George, is it worth trying to merge this into the existing HVMOP that > does the same thing? I'm not sure what you mean by "merging this into the existing HVMOP". Do you mean just having dom0 (or whoever) call HVMOP_trace instead of making a separate hypercall? -George