[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 35/38] cputlb: use cpu_tcg_sched_work for tlb_flus
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [RFC 35/38] cputlb: use cpu_tcg_sched_work for tlb_flush_all |
Date: |
Tue, 1 Sep 2015 15:38:28 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Sep 01, 2015 at 17:10:30 +0100, Alex Bennée wrote:
>
> Emilio G. Cota <address@hidden> writes:
>
> > Signed-off-by: Emilio G. Cota <address@hidden>
> > ---
> > cputlb.c | 41 +++++++++++------------------------------
> > 1 file changed, 11 insertions(+), 30 deletions(-)
>
> I bisected my Jessie boot failure to this commit. Before it boots up
> fine, here it just hangs before the kernel starts init.
>
> 17:05 address@hidden/x86_64 [qemu.git/bisect:???]
> >./arm-softmmu/qemu-system-arm -machine virt -cpu cortex-a15 -machine
> type=virt -display none -serial telnet:127.0.0.1:4444 -monitor stdio
> -smp 4 -m 4096 -kernel ../images/aarch32-current-linux-kernel-only.img
> --append "console=ttyAMA0 root=/dev/vda1" -drive
> file=../images/jessie-arm32.qcow2,id=myblock,index=0,if=none -device
> virtio-b
> lk-device,drive=myblock -netdev user,id=unet,hostfwd=tcp::2222-:22
> -device virtio-net-device,netdev=unet -D /tmp/qemu.log -d un
> imp -name debug-threads=on
>
> See people.linaro.org/~alex.bennee/images
Thanks for testing!
I can replicate it; what's happening is that tlb_flush_all calls
cpu_loop_exit(), then re-enters the cpu loop, performs the
job while other CPUs are asleep(i.e. __tlb_flush_all in this case),
but then when it continues execution it loads the same instruction
(say a TLBIALLIS) again. So we end up with the same CPU calling
tlb_flush_all in an infinite loop.
A possible way to fix this is to finish the TB right after the
helper and then add a flag in cpu_sched_work to not call
cpu_exit_loop, raising an exit interrupt instead.
(Note that cpu_exit_loop is still necessary when doing work
out-of-band wrt to execution, e.g. we *want* to come back
to the same PC when doing a tb_flush.)
I've tried doing this but I can't see an obvious place to insert
the call to tcg_gen_exit_tb()--I see the calls to the TLB helpers
are embedded in structs that I presume are called by some generic
helper code. A little bit of help here would be appreciated, I'm
not very familiar with target-arm.
Thanks,
Emilio