Hi, Iam trying to print some debug messages, from a hypercall function do_domctl by introducing some printk statemetnts. But nothing is getting into the log or the terminal. After exploring the code it seems like we cant directly use printk, because the guest checks the ''console I/O ring buffer after receving an event for the same from hypervisor '' . I chekced the functions of drivers/char/console.c and it has the funciton printk which is does generate the event for console I/O but the console.h does''nt include the prototype. So my question is how can i use it from domctl.c I have been stuck on this for a week now, so please give me some hints on this. Thanks, Sandesh -- View this message in context: http://www.nabble.com/Printing-debug-message-from-hypervisor-tp17749116p17749116.html Sent from the Xen - Dev mailing list archive at Nabble.com. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Miłoś
2008-Jun-10 11:26 UTC
Re: [Xen-devel] Printing debug message from hypervisor
>> Which log are you looking at? Does ''xm dmesg'' show anything more? > dmesg dose''nt contain any of my messages!!!I did really mean: xm dmesg> >> >>> code it seems like we cant directly use printk, because the guest >>> checks the >>> ''console I/O ring buffer after receving an event for the same from >>> hypervisor '' . I chekced the functions of drivers/char/console.c >>> and it has >>> the funciton printk which is does generate the event for console I/ >>> O but the >>> console.h >> >> printk prototype is in lib.h (include/xen/lib.h) > >> Are you able to see _any_ output from the hypervisor at all? I don''t >> think printk in do_domctl will be any different. > I get only the messages from xend and from xc_lib but none of the > hypervisor printks'' are getting printed. > Atleast i dont know where they are getting printed?? Is it in the > xenstore..i think not!!!Xen can be configured to output it''s messages on the serial line, and it also puts it in a buffer (console ring) for Dom0''s attention, xm dmesg should print all the hypervisors output. Cheers Gr(z)egor(z)> > >> Cheers >> Gr(z)egor(z) >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Miłoś
2008-Jun-10 13:52 UTC
Re: [Xen-devel] Printing debug message from hypervisor
>> I did really mean: >> xm dmesg > ok xm dmesg is showing the stuff. > thanks for the info. > Does this mean that the printk''s print it to the xenstore??I don''t think it is stored in xenstore itself, but yes, it is buffered in Dom0.>>> >> Xen can be configured to output it''s messages on the serial line, and >> it also puts it in a buffer (console ring) for Dom0''s attention, xm >> dmesg should print all the hypervisors output. > how to enable this??? > by default it does''nt print it on the serial console.add the following command line options to your xen configuration (bootloader config): com1=115200,8n1 console=com1,tty Cheers Gr(z)egor(z) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Miłoś
2008-Jun-11 08:50 UTC
Re: [Xen-devel] Printing debug message from hypervisor
>>>> >> add the following command line options to your xen configuration >> (bootloader config): >> com1=115200,8n1 console=com1,tty > as part of the hypervisor/dom0 boot option right??As part of the hypervisor boot option. If you are using grub, your config is likely to look something like: title Xen kernel xen.gz dom0_mem=512M module vmlinuz ro root=/dev/sda1 console=ttyS0 Change it to: kernel xen.gz dom0_mem=512M com1=<baud-rate>,8n1 console=com1,vga module vmlinuz ro root=/dev/sda1 console=ttyS0 (NOTE: I believe ''vga'' is required, instead of ''tty'')> >> >> Cheers >> Gr(z)egor(z) >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> Hi grzegorz, > I have one more issue. I want to export do_domctl function for > debugging. I did EXPORT_SYMBOL(do_domctl) its not happening. Any idea > about this.Xen doesn''t use modular architecture and consequently EXPORT_SYMBOL macro is a no-op (see: include/xen/config.h). You just need to add do_domctl definition to a header file. Or define it wherever you need with ''extern''. Cheers Gr(z)egor(z)> > Sorry to bother you again and again. > > Thanks very much. > Sandesh > > On Tue, 2008-06-10 at 14:52 +0100, Grzegorz Miłoś wrote: >>>> I did really mean: >>>> xm dmesg >>> ok xm dmesg is showing the stuff. >>> thanks for the info. >>> Does this mean that the printk''s print it to the xenstore?? >> >> I don''t think it is stored in xenstore itself, but yes, it is >> buffered >> in Dom0. >>>>> >>>> Xen can be configured to output it''s messages on the serial line, >>>> and >>>> it also puts it in a buffer (console ring) for Dom0''s attention, xm >>>> dmesg should print all the hypervisors output. >>> how to enable this??? >>> by default it does''nt print it on the serial console. >> >> add the following command line options to your xen configuration >> (bootloader config): >> com1=115200,8n1 console=com1,tty >> >> Cheers >> Gr(z)egor(z) > > > Please do not print this email unless it is absolutely necessary. > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of > the addressee(s) and may contain proprietary, confidential or > privileged information. If you are not the intended recipient, you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately and destroy all copies of this message > and any attachments. > > WARNING: Computer viruses can be transmitted via email. The > recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > www.wipro.com_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Miłoś
2008-Jun-11 09:53 UTC
Re: [Xen-devel] Re: Exporting symbols from hypervisor
>>> Hi grzegorz, >>> I have one more issue. I want to export do_domctl function for >>> debugging. I did EXPORT_SYMBOL(do_domctl) its not happening. Any >>> idea >>> about this. >> >> Xen doesn''t use modular architecture and consequently EXPORT_SYMBOL >> macro is a no-op (see: include/xen/config.h). > But i seen it being used in xen/common/string.c and in other ia-64 > specific src files. And those exported symbols are visible in > System.map. Is it that during compilation of those files different > header files are included?System.map lists symbols for _Linux_ not Xen. So for example ''strlcpy'' is defined in xen/common/strings.c, but also in linux-2.6.18-xen.hg/ lib/string.c. It is the second definition that makes it into System.map.> >> You just need to add >> do_domctl definition to a header file. Or define it wherever you need >> with ''extern''. > no acutally i need to debug do_domctl instruction by instruction using > kdb, and kdb dosent recognize the it, so i thought of exporting it.I''ve never used kdb to debug Xen. Are you using http://xenbits.xensource.com/ext/debuggers.hg? Cheers Gr(z)egor(z) BTW: Can you reply to the list, not me personally? It''d make it easier for me to reply.> >> >> Cheers >> Gr(z)egor(z) >>> >>> Sorry to bother you again and again. >>> >>> Thanks very much. >>> Sandesh >>> >>> On Tue, 2008-06-10 at 14:52 +0100, Grzegorz Miłoś wrote: >>>>>> I did really mean: >>>>>> xm dmesg >>>>> ok xm dmesg is showing the stuff. >>>>> thanks for the info. >>>>> Does this mean that the printk''s print it to the xenstore?? >>>> >>>> I don''t think it is stored in xenstore itself, but yes, it is >>>> buffered >>>> in Dom0. >>>>>>> >>>>>> Xen can be configured to output it''s messages on the serial line, >>>>>> and >>>>>> it also puts it in a buffer (console ring) for Dom0''s >>>>>> attention, xm >>>>>> dmesg should print all the hypervisors output. >>>>> how to enable this??? >>>>> by default it does''nt print it on the serial console. >>>> >>>> add the following command line options to your xen configuration >>>> (bootloader config): >>>> com1=115200,8n1 console=com1,tty >>>> >>>> Cheers >>>> Gr(z)egor(z) >>> >>> >>> Please do not print this email unless it is absolutely necessary. >>> >>> The information contained in this electronic message and any >>> attachments to this message are intended for the exclusive use of >>> the addressee(s) and may contain proprietary, confidential or >>> privileged information. If you are not the intended recipient, you >>> should not disseminate, distribute or copy this e-mail. Please >>> notify the sender immediately and destroy all copies of this message >>> and any attachments. >>> >>> WARNING: Computer viruses can be transmitted via email. The >>> recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> www.wipro.com >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > > Please do not print this email unless it is absolutely necessary. > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of > the addressee(s) and may contain proprietary, confidential or > privileged information. If you are not the intended recipient, you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately and destroy all copies of this message > and any attachments. > > WARNING: Computer viruses can be transmitted via email. The > recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > www.wipro.com_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Miłoś
2008-Jun-11 10:24 UTC
Re: [Xen-devel] Re: Exporting symbols from hypervisor
>>>>> >>>> You just need to add >>>> do_domctl definition to a header file. Or define it wherever you >>>> need >>>> with ''extern''. >>> no acutally i need to debug do_domctl instruction by instruction >>> using >>> kdb, and kdb dosent recognize the it, so i thought of exporting it. >> >> I''ve never used kdb to debug Xen. Are you using http://xenbits.xensource.com/ext/debuggers.hg? > no...!! is it the debugger present under tools/debugger/gdb?? but i > guess its only to debug domU kernels. Will it allow me to break at > hypercall functions like do_domctl??No it will not. It''s not for debugging the hypervisor. Cheers Gr(z)egor(z)> > >> >> Cheers >> Gr(z)egor(z) >> >> BTW: Can you reply to the list, not me personally? It''d make it >> easier >> for me to reply. >>> >>>> >>>> Cheers >>>> Gr(z)egor(z) >>>>> >>>>> Sorry to bother you again and again. >>>>> >>>>> Thanks very much. >>>>> Sandesh >>>>> >>>>> On Tue, 2008-06-10 at 14:52 +0100, Grzegorz Miłoś wrote: >>>>>>>> I did really mean: >>>>>>>> xm dmesg >>>>>>> ok xm dmesg is showing the stuff. >>>>>>> thanks for the info. >>>>>>> Does this mean that the printk''s print it to the xenstore?? >>>>>> >>>>>> I don''t think it is stored in xenstore itself, but yes, it is >>>>>> buffered >>>>>> in Dom0. >>>>>>>>> >>>>>>>> Xen can be configured to output it''s messages on the serial >>>>>>>> line, >>>>>>>> and >>>>>>>> it also puts it in a buffer (console ring) for Dom0''s >>>>>>>> attention, xm >>>>>>>> dmesg should print all the hypervisors output. >>>>>>> how to enable this??? >>>>>>> by default it does''nt print it on the serial console. >>>>>> >>>>>> add the following command line options to your xen configuration >>>>>> (bootloader config): >>>>>> com1=115200,8n1 console=com1,tty >>>>>> >>>>>> Cheers >>>>>> Gr(z)egor(z) >>>>> >>>>> >>>>> Please do not print this email unless it is absolutely necessary. >>>>> >>>>> The information contained in this electronic message and any >>>>> attachments to this message are intended for the exclusive use of >>>>> the addressee(s) and may contain proprietary, confidential or >>>>> privileged information. If you are not the intended recipient, you >>>>> should not disseminate, distribute or copy this e-mail. Please >>>>> notify the sender immediately and destroy all copies of this >>>>> message >>>>> and any attachments. >>>>> >>>>> WARNING: Computer viruses can be transmitted via email. The >>>>> recipient should check this email and any attachments for the >>>>> presence of viruses. The company accepts no liability for any >>>>> damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> www.wipro.com >>>> >>>> >>>> _______________________________________________ >>>> Xen-devel mailing list >>>> Xen-devel@lists.xensource.com >>>> http://lists.xensource.com/xen-devel >>> >>> >>> Please do not print this email unless it is absolutely necessary. >>> >>> The information contained in this electronic message and any >>> attachments to this message are intended for the exclusive use of >>> the addressee(s) and may contain proprietary, confidential or >>> privileged information. If you are not the intended recipient, you >>> should not disseminate, distribute or copy this e-mail. Please >>> notify the sender immediately and destroy all copies of this message >>> and any attachments. >>> >>> WARNING: Computer viruses can be transmitted via email. The >>> recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> www.wipro.com >> > > > Please do not print this email unless it is absolutely necessary. > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of > the addressee(s) and may contain proprietary, confidential or > privileged information. If you are not the intended recipient, you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately and destroy all copies of this message > and any attachments. > > WARNING: Computer viruses can be transmitted via email. The > recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > www.wipro.com_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2008-06-11 at 11:24 +0100, Grzegorz Miłoś wrote:> >>>>> > >>>> You just need to add > >>>> do_domctl definition to a header file. Or define it wherever you > >>>> need > >>>> with ''extern''. > >>> no acutally i need to debug do_domctl instruction by instruction > >>> using > >>> kdb, and kdb dosent recognize the it, so i thought of exporting it. > >> > >> I''ve never used kdb to debug Xen. Are you using http://xenbits.xensource.com/ext/debuggers.hg?this is only for 64bit hypervisor!!! its not compiling on 32bit machine. Is there any way i can get it working for 32bit?> > no...!! is it the debugger present under tools/debugger/gdb?? but i > > guess its only to debug domU kernels. Will it allow me to break at > > hypercall functions like do_domctl?? > > No it will not. It''s not for debugging the hypervisor.> > Cheers > Gr(z)egor(z) > > > > > > >> > >> Cheers > >> Gr(z)egor(z) > >> > >> BTW: Can you reply to the list, not me personally? It''d make it > >> easier > >> for me to reply. > >>> > >>>> > >>>> Cheers > >>>> Gr(z)egor(z) > >>>>> > >>>>> Sorry to bother you again and again. > >>>>> > >>>>> Thanks very much. > >>>>> Sandesh > >>>>> > >>>>> On Tue, 2008-06-10 at 14:52 +0100, Grzegorz Miłoś wrote: > >>>>>>>> I did really mean: > >>>>>>>> xm dmesg > >>>>>>> ok xm dmesg is showing the stuff. > >>>>>>> thanks for the info. > >>>>>>> Does this mean that the printk''s print it to the xenstore?? > >>>>>> > >>>>>> I don''t think it is stored in xenstore itself, but yes, it is > >>>>>> buffered > >>>>>> in Dom0. > >>>>>>>>> > >>>>>>>> Xen can be configured to output it''s messages on the serial > >>>>>>>> line, > >>>>>>>> and > >>>>>>>> it also puts it in a buffer (console ring) for Dom0''s > >>>>>>>> attention, xm > >>>>>>>> dmesg should print all the hypervisors output. > >>>>>>> how to enable this??? > >>>>>>> by default it does''nt print it on the serial console. > >>>>>> > >>>>>> add the following command line options to your xen configuration > >>>>>> (bootloader config): > >>>>>> com1=115200,8n1 console=com1,tty > >>>>>> > >>>>>> Cheers > >>>>>> Gr(z)egor(z) > >>>>> > >>>>> > >>>>> Please do not print this email unless it is absolutely necessary. > >>>>> > >>>>> The information contained in this electronic message and any > >>>>> attachments to this message are intended for the exclusive use of > >>>>> the addressee(s) and may contain proprietary, confidential or > >>>>> privileged information. If you are not the intended recipient, you > >>>>> should not disseminate, distribute or copy this e-mail. Please > >>>>> notify the sender immediately and destroy all copies of this > >>>>> message > >>>>> and any attachments. > >>>>> > >>>>> WARNING: Computer viruses can be transmitted via email. The > >>>>> recipient should check this email and any attachments for the > >>>>> presence of viruses. The company accepts no liability for any > >>>>> damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> www.wipro.com > >>>> > >>>> > >>>> _______________________________________________ > >>>> Xen-devel mailing list > >>>> Xen-devel@lists.xensource.com > >>>> http://lists.xensource.com/xen-devel > >>> > >>> > >>> Please do not print this email unless it is absolutely necessary. > >>> > >>> The information contained in this electronic message and any > >>> attachments to this message are intended for the exclusive use of > >>> the addressee(s) and may contain proprietary, confidential or > >>> privileged information. If you are not the intended recipient, you > >>> should not disseminate, distribute or copy this e-mail. Please > >>> notify the sender immediately and destroy all copies of this message > >>> and any attachments. > >>> > >>> WARNING: Computer viruses can be transmitted via email. The > >>> recipient should check this email and any attachments for the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> www.wipro.com > >> > > > > > > Please do not print this email unless it is absolutely necessary. > > > > The information contained in this electronic message and any > > attachments to this message are intended for the exclusive use of > > the addressee(s) and may contain proprietary, confidential or > > privileged information. If you are not the intended recipient, you > > should not disseminate, distribute or copy this e-mail. Please > > notify the sender immediately and destroy all copies of this message > > and any attachments. > > > > WARNING: Computer viruses can be transmitted via email. The > > recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > www.wipro.com >Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel