[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking wheth
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully |
Date: |
Fri, 17 Jun 2016 08:49:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 17.06.2016 08:07, David Gibson wrote:
> On Wed, Jun 15, 2016 at 01:10:18PM +1000, David Gibson wrote:
>> On Tue, Jun 14, 2016 at 03:57:56PM +0200, Thomas Huth wrote:
>>> Since the mac99 and g3beige PowerPC machines recently broke without
>>> being noticed, it would be good to have a tester for "make check"
>>> that detects such issues immediately. A simple way to test the firmware
>>> of these machines is to use the "-prom-env" parameter of QEMU. This
>>> parameter can be used to put some Forth code into the 'boot-command'
>>> firmware variable which then can signal success to the tester by
>>> writing a magic value to a known memory location. And since some of the
>>> Sparc machines are also using OpenBIOS, they are now tested with this
>>> prom-env-tester, too.
>>>
>>> Reviewed-by: Markus Armbruster <address@hidden>
>>> Signed-off-by: Thomas Huth <address@hidden>
>>> ---
>>> v2: Removed unnecessary include statements (as suggested by Markus)
>>
>> Beautiful, I've applied this to ppc-for-2.7, assuming I don't get an
>> objection to taking this through my tree.
>
> Ugh.. turns out this fails on sparc64 target on a 32-bit x86 host.
> Specifically it trips the tcg_abort() at the end of tcg_reg_alloc()
> (tcg/tcg.c).
Looks like the test is already doing its job well ;-)
> I'm reasonably confident this is a pre-existing bug, just triggered by
> this test, but in the interests of getting this up and running on the
> platforms where it is working, I've disabled the testcase on sparc64
> for now.
Ok, makes sense to disable this for now. I also just compiled the QEMU
sources with -m32, and for me it is also failing when I run QEMU
manually without the test-wrapper - but it's triggering a segfault
here instead:
$ gdb --args sparc64-softmmu/qemu-system-sparc64 -nographic
[...]
(gdb) r
Starting program: qemu-build32/sparc64-softmmu/qemu-system-sparc64 -nographic
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf7a82b40 (LWP 4860)]
[New Thread 0xf4beab40 (LWP 4861)]
OpenBIOS for Sparc64
Inconsistency for register %eax:
reg state:
_frame: %esp
env: %ebp
regwptr: %edx
xcc: 76892(%ebp)
asi: 76896(%ebp)
fprs: 77188(%ebp)
softint: 77380(%ebp)
cc_op: 116(%ebp)
psr: 128(%ebp)
gsr_1: 77220(%ebp)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf4beab40 (LWP 4861)]
0x5698cd4b in pstrcpy (buf=0xf4be9dcc "gsr_1", buf_size=64, str=0x1 <Address
0x1 out of bounds>)
at qemu/util/cutils.c:50
50 c = *str++;
Missing separate debuginfos, use: debuginfo-install glib2-2.42.2-5.el7.i686
glibc-2.17-106.el7_2.6.i686 libgcc-4.8.5-4.el7.i686 libstdc++-4.8.5-4.el7.i686
pixman-0.32.6-3.el7.i686 zlib-1.2.7-15.el7.i686
(gdb) bt
#0 0x5698cd4b in pstrcpy (buf=0xf4be9dcc "gsr_1", buf_size=64, str=0x1
<Address 0x1 out of bounds>)
at qemu/util/cutils.c:50
#1 0x5660e916 in tcg_get_arg_str_ptr (s=0x56c6bba0 <tcg_ctx>, buf=0xf4be9dcc
"gsr_1", buf_size=64,
ts=0x56c6be60 <tcg_ctx+704>) at qemu/tcg/tcg.c:939
#2 0x5660ea08 in tcg_get_arg_str_idx (s=0x56c6bba0 <tcg_ctx>, buf=0xf4be9dcc
"gsr_1", buf_size=64, idx=10)
at qemu/tcg/tcg.c:952
#3 0x56610389 in dump_regs (s=0x56c6bba0 <tcg_ctx>) at qemu/tcg/tcg.c:1598
#4 0x56610632 in check_regs (s=0x56c6bba0 <tcg_ctx>) at qemu/tcg/tcg.c:1654
#5 0x56612731 in tcg_gen_code (s=0x56c6bba0 <tcg_ctx>, tb=0xf4bf83b4) at
qemu/tcg/tcg.c:2458
#6 0x56605ef0 in tb_gen_code (cpu=0x570ccde0, pc=4291974856,
cs_base=4291974860, flags=7, cflags=0)
at qemu/translate-all.c:1214
#7 0x56607e6e in tb_find_slow (cpu=0x570ccde0, pc=4291974856,
cs_base=4291974860, flags=7)
at qemu/cpu-exec.c:310
#8 0x56607fe8 in tb_find_fast (cpu=0x570ccde0, last_tb=0xf4bea084, tb_exit=1)
at qemu/cpu-exec.c:339
#9 0x5660880c in cpu_sparc_exec (cpu=0x570ccde0) at qemu/cpu-exec.c:625
#10 0x5663be6b in tcg_cpu_exec (cpu=0x570ccde0) at qemu/cpus.c:1541
#11 0x5663bf76 in tcg_exec_all () at qemu/cpus.c:1574
#12 0x5663b27b in qemu_tcg_cpu_thread_fn (arg=0x570ccde0) at qemu/cpus.c:1171
#13 0xf7c4ab2c in start_thread () from /lib/libpthread.so.0
#14 0xf7b7d77e in clone () from /lib/libc.so.6
Thomas
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Thomas Huth, 2016/06/14
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, David Gibson, 2016/06/14
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, David Gibson, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully,
Thomas Huth <=
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Mark Cave-Ayland, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Artyom Tarasenko, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Mark Cave-Ayland, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Artyom Tarasenko, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Mark Cave-Ayland, 2016/06/17
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Artyom Tarasenko, 2016/06/19
- Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully, Richard Henderson, 2016/06/19