From: Thomas Huth <thuth@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: agraf@suse.de, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, blauwirbel@gmail.com, qemu-ppc@nongnu.org,
Artyom Tarasenko <atar4qemu@gmail.com>,
Richard Henderson <rth@twiddle.net>
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 [thread overview]
Message-ID: <57639D5D.7000303@redhat.com> (raw)
In-Reply-To: <20160617060718.GC19581@voom.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 4336 bytes --]
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 <armbru@redhat.com>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-06-17 6:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 13:57 [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully Thomas Huth
2016-06-15 3:10 ` David Gibson
2016-06-17 6:07 ` David Gibson
2016-06-17 6:49 ` Thomas Huth [this message]
2016-06-17 11:27 ` Mark Cave-Ayland
2016-06-17 11:36 ` Artyom Tarasenko
2016-06-17 12:44 ` Mark Cave-Ayland
2016-06-17 12:57 ` Artyom Tarasenko
2016-06-17 13:56 ` Mark Cave-Ayland
2016-06-19 15:26 ` Artyom Tarasenko
2016-06-19 17:28 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57639D5D.7000303@redhat.com \
--to=thuth@redhat.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=atar4qemu@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).