[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How to dump DomU debug infos -- Stack-trace / earlyprintk



On Fri, 2015-12-18 at 01:55 +0000, Tom Ting[äéå] wrote:
> Hi All
> Â
> I am currently working on DomU kernel with some passthrough-drivers /
> hacking based on ARM A53 platform.
> There are some time that the DomU kernel is ruined too early before
> xenconsole could connect to start emit error log.
> I will need the whole stack dump / earlyprintk log to check what is going
> on at boot time.
> Here are my questions and I will really appreciate if someone could help
> :)
> Â
> 1. Is earlyprintk works on DomU??

No, I'm afraid not. There was some discussion about earlycon at one point,
but I don't recall any patches.

I did find
https://github.com/enclustra-bsp/xilinx-linux/commit/0dd1a95882e75362626ed97df44754e24a3be305
though (from the S-o-b and URL I'm guessing it was used on ARM).

It doesn't seem to have ever been submitted upstream. If you try this and
it works then I (and others) would appreciate it very much if you would
clean it up and submit upstream (probably check with the author first)

>  I tried to add following config but it doesnât seems to work.
> extra = "earlyprintk=xenboot console=hvc0 debug"
> Â
> 2. Is there existing console logging system for DomU, recording all the
> console log (basically kernel) to Dom0 file system?

If you have a hypervisor built with debug=y then domU is permitted to
useÂ__HYPERVISOR_console_io to dump things to it. There have been postings
of patches to hack such a thing into printk, usually using xen_raw_printk
from Linux.

Oh, I seem to have even thrown it into git at some point:
http://xenbits.xen.org/gitweb/?p=people/ianc/linux.git;a=commitdiff;h=476bff35f03de10392826672cfd0d9e2c40ea7eb;hp=19583ca584d6f574384e17fe7613dfaeadcdc4a6

that's a very old commit, so might need some adjusting, hopefully it gives
you the idea.

If you are having trouble really early on in boot (i.e. pre-printk) then
with a debug hypervisor you can also issue various hvc #0xff?? instructions
from the guest to dump bits of debug. See
xen/arch/arm/traps.c:do_debug_trap for the things you can cause to happen
using different immediate values.
Â
> 3. I use the tool xenctx, trying to dump vcpu info for checking error
> status. But it seems stack dump isnât working which I would like
> to use it for checking the call-trace for finding out the point DomU is
> getting trouble.

I'm not sure if this is a bug or an as yet unimplemented feature. In either
case patches welcome.

Ian.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.