From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: Fwd: Debugging "Xen BUG at ... list.h" on ARM Date: Mon, 14 Apr 2014 10:12:10 +0100 Message-ID: <534BA66A.4020503@linaro.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Thomas Leonard , xen-devel@lists.xen.org, Ian Campbell , george.dunlap@citrix.com, Dario Faggioli List-Id: xen-devel@lists.xenproject.org (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-cubi= eboard2.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=92s 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? > > The cfg file is just: > > kernel =3D "/root/paratest.img" > memory =3D 128 > name =3D "paratest" > vcpus =3D 1 > serial=3D"pty" > > When the guest is started, Xen always crashes. Sometimes silently, but > usually writing a stack-trace to the console. I've included a > selection of them in the commit messages, but a typical one looks like > this: hmmm, I've just tried your kernel on midway and Xen didn't crash. Do you have more input? Number of physical CPUs used, state of the VCPU...? > (XEN) Assertion 'svc =3D=3D > CSCHED_VCPU(curr_on_cpu(svc->vcpu->processor))' failed, line 859, file > sche > (XEN) Xen BUG at sched_credit.c:859 I can't find any assert at this line. Did you modify Xen code? > (XEN) CPU1: Unexpected Trap: Undefined Instruction > (XEN) ----[ Xen-4.4.1-pre arm32 debug=3Dy Not tainted ]---- > (XEN) CPU: 1 > (XEN) PC: 002417b4 __bug+0x28/0x44 > (XEN) CPSR: 2000015a MODE:Hypervisor > (XEN) R0: 002656dc R1: 00000000 R2: 3fd2bd80 R3: 2000015a > (XEN) R4: 0000035b R5: 0025d9d0 R6: 40006230 R7: 47fe4be0 > (XEN) R8: 00265e00 R9: 002b1ff0 R10:002e4254 R11:47fd7e9c R12:0= 0000001 > (XEN) HYP: SP: 47fd7e94 LR: 002417b4 > [...] > (XEN) Xen call trace: > (XEN) [<002417b4>] __bug+0x28/0x44 (PC) > (XEN) [<002417b4>] __bug+0x28/0x44 (LR) > (XEN) [<0021bac0>] csched_tick+0x1ac/0x4d4 > (XEN) [<0022d820>] execute_timer+0xcc/0xe0 > (XEN) [<0022d910>] timer_softirq_action+0xdc/0x230 > (XEN) [<00229b88>] __do_softirq+0xf4/0x100 > (XEN) [<00229c20>] do_softirq+0x14/0x18 > (XEN) [<0024f100>] leave_hypervisor_tail+0x50/0x6c > (XEN) [<00251450>] return_to_guest+0xc/0xb8 Regards, -- = Julien Grall