Fwd: Early pl011 console for debugging KVM for ARM port

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

 



Hi.

This past week I had to fix a bug in the load/store multiple emulation
code and also introduce support for all access permission checks when
traversing the guest page tables, including the Domain Access Control
settings used on ARM.

This has gotten me through start_kernel and through the first couple
of context switches between the kernel threads. I eventually end up in
init() -> do_basic_setup() -> do_initcalls(), where the system crashes
on a guest NULL pointer exception.

Due to the linker magic with init calls, it's hard to reason about
where this bug occurs. (I should say that I strongly expect it to be a
bug, since I am guessing that no logic can be based on a NULL pointer
fault this early in the kernel). I have sent an e-mail (forwarded
below) to the linux-arm mailing list to see if I could get any advice
on getting the UART serial console up at this point.

Otherwise I think I am left with disassembling the guest kernel and
matching the address for the NULL pointer error, and hopefully it will
be somewhere meaningful and not in some general utility function.

If anyone has any other input on how to proceed, it will (as always)
be fantastic.

Best,
Christoffer


---------- Forwarded message ----------
From: Christoffer Dall <cd2436 at columbia.edu>
Date: Wed, Dec 16, 2009 at 8:25 PM
Subject: Early pl011 console for debugging KVM for ARM port
To: linux-arm-kernel at lists.infradead.org


Hi everyone.

I am working on a port of KVM for arm (http://android.chazy.dk) and I
am somewhat stuck. I encounter a crash somewhere in do_initcalls(),
but I do not have console at this point, as my only console is the
pl011 uart device. Not having the console makes it quite hard to track
down the bugs (an effort I do by placing asm("swi 0xMAGIC") at various
locations) for now.

Does anyone know how to enable such a console earlier? I tried simply
calling pl011_init() before the initcalls loop, but I eventually hit a
NULL pointer exception inside
list_add_tail(&kobj->entry,&kobj->kset->list); called from
kobject_add(...) in lib/kobject.c. I can gather it's the
kobj->kset->list.prev, which is NULL.

As far as I understand, these structures should have been initialized
at this point. Can anyone confirm?

Any help is greatly appreciated!


Thanks,
Christoffer Dall


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux