[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
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:

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.


Xen-users mailing list



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