BUG: using smp_processor_id() in preemptible

2009-06-24 Thread Johannes Berg
Hi, I'm trying to run a test environment in kvm (because uml doesn't have lockdep), and am running into the following problems: 1) I get the $subject warning a lot, when starting kvm: [85763.262707] BUG: using smp_processor_id() in preemptible [] code: kvm/13877 [85763.262719] caller is

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Sun, 2009-06-28 at 17:11 +0300, Avi Kivity wrote: > > 1) I get the $subject warning a lot, when starting kvm: > > [85763.262707] BUG: using smp_processor_id() in preemptible [] > > code: kvm/13877 > > [85763.262719] caller is kvm_write_guest_time+0x40/0x220 [kvm] > > [85763.262722] Pid

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 12:08 +0300, Avi Kivity wrote: > >> You can see where it hangs using the monitor 'info registers' and 'x/30i > >> $eip' commands. > >> > > > > not much luck since it doesn't hang at a specific instruction: > > > > You can try mapping these with gdb (in fact, you ca

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 11:54 +0200, Johannes Berg wrote: > On Mon, 2009-06-29 at 12:08 +0300, Avi Kivity wrote: > > > >> You can see where it hangs using the monitor 'info registers' and 'x/30i > > >> $eip' commands. > > >>

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 12:59 +0300, Avi Kivity wrote: > > It's actually panic'ed because it ran out of memory, but didn't print > > that to my vga/console/curses/... > > > > Maybe we give it crappy numa table, try booting with numa disabled. # CONFIG_NUMA is not set > Also make sure you

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 13:04 +0300, Avi Kivity wrote: > On 06/29/2009 01:00 PM, Johannes Berg wrote: > > >> Also make sure you boot with the bios provided by qemu-kvm, not some > >> random qemu. > >> > > > > I, uh, have no idea how to ensur

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 13:00 +0300, Avi Kivity wrote: > On 06/29/2009 12:57 PM, Johannes Berg wrote: > >> It's actually panic'ed because it ran out of memory, but didn't print > >> that to my vga/console/curses/... > >> > > > > And if

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 13:16 +0300, Avi Kivity wrote: > > If I boot with -m 512 I get this: > > root@(none):~# free > > total used free sharedbuffers cached > > Mem:378608 25196 353412 0 1012 8692 > > -/+ buffers/cache:

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 13:25 +0300, Avi Kivity wrote: > > So even my qemu is missing a lot more than you are. But I guess my > > kernel might also be a lot larger. > > > > Aha. Maybe paravirt patching allocates a lot of memory? Otherwise > there should be no difference between qemu-kvm and

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 13:39 +0300, Avi Kivity wrote: > On 06/29/2009 01:32 PM, Johannes Berg wrote: > > > >> Do you really have a 100MB kernel? > >> > > > > Hmm. Maybe? > > > > text data bss dec

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Johannes Berg
On Mon, 2009-06-29 at 14:38 +0300, Avi Kivity wrote: > On 06/29/2009 01:55 PM, Johannes Berg wrote: > > I had MAXSMP configured, which makes it 4096, but if I turn off MAXSMP > > and make NR_CPUS 8, then I get > > text data bss dechex

kvm hangs w/o nolapic

2009-11-20 Thread Johannes Berg
My 2.6.32-rc7 kvm (both guest+host, x86_64) hangs w/o "nolapic" here: while (lapic_cal_loops <= LAPIC_CAL_LOOPS) cpu_relax(); because lapic_cal_loops never changes from -1. Code was last changed by commit 2f04fa888d270951b9e0fe9e641ddd560d77ad1b Author: Yinghai Lu Date: Sun Aug 24 02:0

kvmmmu tracing

2009-11-23 Thread Johannes Berg
Commit f691fe1da7e2715137d21ae5a80bec64db4625db is really broken wrt. the userspace interface for tracing because of the weird KVM_MMU_PAGE_PRINTK macro. Maybe we should have a "unsafe for export" flag for events, if they do strange things like that? As it stands, I can't use trace-cmd on an x86

Re: kvmmmu tracing

2009-11-23 Thread Johannes Berg
On Mon, 2009-11-23 at 09:58 -0500, Steven Rostedt wrote: > On Mon, 2009-11-23 at 12:06 +0100, Johannes Berg wrote: > > Commit f691fe1da7e2715137d21ae5a80bec64db4625db is really broken wrt. > > the userspace interface for tracing because of the weird > > KVM_MMU_PAGE_PRINTK mac

Re: kvm hangs w/o nolapic

2009-11-23 Thread Johannes Berg
On Mon, 2009-11-23 at 17:05 -0200, Marcelo Tosatti wrote: > > QEMU PC emulator version 0.10.50 (qemu-kvm-devel-88), Copyright (c) > > 2003-2008 Fabrice Bellard > Can you please try git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git ? > > There have been a number of HPET emulation fixes. Indeed,

Re: kvmmmu tracing

2009-11-24 Thread Johannes Berg
On Tue, 2009-11-24 at 11:50 +0200, Avi Kivity wrote: > On 11/23/2009 01:06 PM, Johannes Berg wrote: > > Commit f691fe1da7e2715137d21ae5a80bec64db4625db is really broken wrt. > > the userspace interface for tracing because of the weird > > KVM_MMU_PAGE_PRINTK macro. > > &

Re: kvmmmu tracing

2009-11-24 Thread Johannes Berg
On Tue, 2009-11-24 at 12:34 +0200, Avi Kivity wrote: > Um, C can be easily parsed with a C compiler. I don't think you can > expect it to be a plain format string and argument list. Actually, it turns out that it cannot be parsed even with a C compiler: ({ const char *ret = p->buffer + p->len;