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

Re: [Xen-devel] Fwd: Debugging "Xen BUG at ... list.h" on ARM



On 14 April 2014 10:43, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Mon, 2014-04-14 at 10:30 +0100, Thomas Leonard wrote:
>> On 14 April 2014 10:12, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>> > (Adding a couple of people in cc)
>> >
>> > On 14/04/14 09:02, Thomas Leonard wrote:
>> >>
>> >> Hi all,
>> >
>> >
>> > Hello,
>> >
>> >
>> >> I'm new to Xen, and trying to get the arm32 port of Mini-OS working on
>> >> a Cubieboard2. I have the board running an Ubuntu Dom0 and an Ubuntu
>> >> guest happily, and I've written up the instructions for that here:
>> >>
>> >>
>> >> https://github.com/talex5/mirage-www/blob/master/tmpl/wiki/xen-on-cubieboard2.md
>> >>
>> >> However, while trying to get a Mini-OS domU guest working I can now
>> >> reliably crash the hypervisor. No doubt this is a bug in my guest
>> >> code, but I assume it shouldn't be possible for a buggy guest to take
>> >> down Xen itself.
>> >>
>> >> Here's a simplified version of my code which shows the problem:
>> >>
>> >>    https://github.com/talex5/xen-paratest
>> >>
>> >> I'm building Xen from the stable-4.4 Git branch (03eb51340), compiled
>> >> with debug on.
>> >>
>> >> The code is rather simple: it's just trying to initialise the data
>> >> cache, as described in the "ARM Cortex-A Series Programmerâs Guide".
>> >> I'm not actually sure whether this is necessary for a paravirtualised
>> >> guest, but I was getting some odd problems which looked cache related,
>> >> so I added this code in the hope of fixing that.
>> >
>> >
>> > Does it crash if you remove your cache code?
>>
>> No, it just produces the wrong output in that case.
>>
>> For background: I was making a hypervisor call to write out a string,
>> then modifying a second string, then make a call to write that (both
>> using HYPERVISOR_console_io).
>>
>> Xen printed the second string with its first part containing the old
>> text and the second part containing the new text. It looked like the
>> old part was the bytes on the same cache line as the first string I
>> printed, and I was trying to debug that.
>
> Has your guest enabled caching (SCTLR.C)? This is required by the
> hypercall ABI. See
> http://xenbits.xen.org/docs/unstable/hypercall/arm/include,public,arch-arm.h.html#incontents_arm_abi

Here's my attempt to set up the translation table and enable caching:

https://github.com/talex5/xen-paratest/tree/cache-problem

It prints:

(d11) 012
(d11) ....++++++++++++++++++++++

The second line should be all "+"s.

> (the hypervisor still shouldn't crash though)
>
> Ian.



-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
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®.