[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10)
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10) |
Date: |
Fri, 21 Apr 2017 13:22:37 +0530 |
User-agent: |
Notmuch/0.23.5 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-redhat-linux-gnu) |
Richard Henderson <address@hidden> writes:
> On 04/21/2017 12:08 AM, Nikunj A Dadhania wrote:
>> David Gibson <address@hidden> writes:
>>
>>> [ Unknown signature status ]
>>> Hi all,
>>>
>>> I'm afraid I've pulled the MTTCG enablement patches for target/ppc64
>>> out of my ppc-for-2.10 tree, since I discovered it was causing a
>>> repeatable failure on one of the Travis builds.
>>>
>>> Specifically, with both the LL/SC in terms of cmpxchg and
>>> enable-mttcg-by-default patches applied, and qemu build with clang,
>>> then make check will fail with a tcg_abort() in the powernv
>>> boot-serial test.
>>
>> I see that in temp_load(), ts->val_type is ending up being
>> TEMP_VAL_DEAD, and the tcg_abort() is because of that.
>>
>> Following patch gets past this error...
>>
>> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
>> index 4a1f24a..9a4ea5f 100644
>> --- a/target/ppc/translate.c
>> +++ b/target/ppc/translate.c
>> @@ -3169,6 +3169,7 @@ static void gen_conditional_store(DisasContext *ctx,
>> TCGv EA,
>> tcg_gen_brcond_tl(TCG_COND_NE, EA, cpu_reserve, l1);
>>
>> t0 = tcg_temp_new();
>> + tcg_gen_movi_tl(t0, 0);
>> tcg_gen_atomic_cmpxchg_tl(t0, cpu_reserve, cpu_reserve_val,
>> cpu_gpr[reg], ctx->mem_idx,
>> DEF_MEMOP(memop) | MO_ALIGN);
>
> This *shouldn't* change anything. The arugument that you're initializing is
> pure output and is equivalent to
>
> t0 = 0;
> t0 = foo();
>
> What's the test case here?
With David's new branch that has PPC64 MTTCG -
https://github.com/dgibson/qemu/tree/mttcg
$ ./ppc64-softmmu/qemu-system-ppc64 -machine powernv,usb=off -vga none
-nographic
/home/nikunj/work/power/code/qemu/tcg/tcg.c:2017: tcg fatal error
Aborted (core dumped)
$
$ gdb --args ./ppc64-softmmu/qemu-system-ppc64 -machine powernv,usb=off -vga
none -nographic
[...]
(gdb) r
Starting program:
/home/nikunj/work/power/code/qemu/ppc64-softmmu/qemu-system-ppc64 -machine
powernv,usb=off -vga none -nographic
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.24-4.fc25.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff4058700 (LWP 29699)]
[New Thread 0x7fff9e9ff700 (LWP 29700)]
/home/nikunj/work/power/code/qemu/tcg/tcg.c:2017: tcg fatal error
Thread 3 "qemu-system-ppc" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff9e9ff700 (LWP 29700)]
0x00007ffff559691f in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff559691f in raise () from /lib64/libc.so.6
#1 0x00007ffff559851a in abort () from /lib64/libc.so.6
#2 0x00005555557953f1 in temp_load (s=0x5555561a9660 <tcg_ctx>,
ts=0x5555561abaf0 <tcg_ctx+9360>, desired_regs=<optimized out>,
allocated_regs=<optimized out>)
at /home/nikunj/work/power/code/qemu/tcg/tcg.c:2017
#3 0x0000555555790e19 in tcg_reg_alloc_op (s=<optimized out>, args=<optimized
out>, arg_life=<optimized out>, def=<optimized out>, opc=<optimized out>)
at /home/nikunj/work/power/code/qemu/tcg/tcg.c:2225
#4 tcg_gen_code (s=<optimized out>, tb=<optimized out>) at
/home/nikunj/work/power/code/qemu/tcg/tcg.c:2654
#5 0x000055555578bc81 in tb_gen_code (cpu=<optimized out>, pc=<optimized out>,
cs_base=<optimized out>, flags=<optimized out>, cflags=<optimized out>)
at /home/nikunj/work/power/code/qemu/translate-all.c:1323
#6 0x000055555578d99f in tb_find (cpu=0x7ffff7e48010, last_tb=<optimized out>,
tb_exit=<optimized out>) at /home/nikunj/work/power/code/qemu/cpu-exec.c:365
#7 0x000055555578d49a in cpu_exec (cpu=0x7ffff7e48010) at
/home/nikunj/work/power/code/qemu/cpu-exec.c:673
#8 0x00005555557c9c87 in tcg_cpu_exec (cpu=0x7ffff7e48010) at
/home/nikunj/work/power/code/qemu/cpus.c:1260
#9 0x00005555557c9530 in qemu_tcg_cpu_thread_fn (arg=0x7ffff7e48010) at
/home/nikunj/work/power/code/qemu/cpus.c:1463
#10 0x00007ffff592e6ca in start_thread () from /lib64/libpthread.so.0
#11 0x00007ffff5668f7f in clone () from /lib64/libc.so.6
(gdb)
Regards
Nikunj
- [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), David Gibson, 2017/04/18
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Cédric Le Goater, 2017/04/19
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/19
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/21
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Richard Henderson, 2017/04/21
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10),
Nikunj A Dadhania <=
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/21
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Richard Henderson, 2017/04/21
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/24
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/24
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Nikunj A Dadhania, 2017/04/24
- Re: [Qemu-ppc] MTTCG for ppc64 (removed from ppc-for-2.10), Richard Henderson, 2017/04/25