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

Re: [Xen-devel] Xen on ARM: Force register dump from guest.



On 5 June 2013 20:35, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Wed, 2013-06-05 at 20:18 +0200, Sander Bogaert wrote:
>> On 5 June 2013 17:11, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
>> > On Wed, 2013-06-05 at 16:36 +0200, Sander Bogaert wrote:
>> >> Hi,
>> >>
>> >> I'm working on some kind of microOS for Xen on ARM a bit like miniOS
>> >> but with less features. I'm having totally random crashes after make
>> >> use of variadic arguments ( using newlib ).
>> >>
>> >> To debug this I'd really need a way to force a register dump from the
>> >> guest, is there a good way to do this? I don't think any of the
>> >> available hypercalls has that ability?
>> >
>> > Sounds like you want "xenctx" which is in tools/xentrace/
>>
>> I doesn't show any output when invoked. Is it supposed to work for Xen
>> on ARM?
>
> Yes, although you will need a new enough tree, where new enough means
> at least 66425df7ce61, from mid-April

As you may have read I'm having an issue with the latest Xen / linux
kernel at the moment. I haven't been able to find a working
combination of commits in both trees yet to get this functionallity in
and I was smart enough not to write down the hashes of the working
setup I do have :-)

>>  It's also not really what I need, some hypercall or other
>> break that crashes the domain and does a show_execution_state() is
>> more like it.
>
> Well, such a thing would be trivial to write, but checkout do_debug_trap
> in xen/arch/arm/traps.c, you probably want "hvc #0xffff" in your code.

This seems perfect! I'l try using these traps.

>> My application crashes whenever I use variadic arguments,
>
> crashes how, segfault or something else?

It's not as much an application as my "micro" OS :) The crashes are
totally random but it's always the domain that crashes. Sometimes a
translation fault, sometimes some "unexpected hypervisor trap" ending
up in SVC or even IRQ mode ( which shouldn't even be enabled on domain
boot?! ).

Maybe it's related to the segfaulting Julien mailed about because it
always seems to be on CPU 1 according to Xen's crash dump and maybe
when it just works and doesn't crash it's scheduled on CPU 0? I
haven't done enough testing to be sure this behavior is consistent.

> Where did your stdargs.h come from? I'd have thought the compiler
> provided stuff ought to be reasonably robust assuming your application
> isn't buggy.

I'm using newlib for now.

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


 


Rackspace

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