From: Laurent Vivier <laurent@vivier.eu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org
Cc: Giuseppe Musacchio <thatlemon@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs
Date: Tue, 10 Nov 2020 14:01:05 +0100 [thread overview]
Message-ID: <49766a02-f5a4-0cec-aaf6-70c27d0be9ee@vivier.eu> (raw)
In-Reply-To: <21cd093c-404b-cd9c-2b61-fe1c0957d7f4@ilande.co.uk>
Le 10/11/2020 à 13:56, Mark Cave-Ayland a écrit :
> On 05/11/2020 21:23, Peter Maydell wrote:
>
>> This set of patches fixes bugs which were preventing the
>> Debian sparc64 /bin/bash from running:
>> * the target_ucontext structure put the registers in the
>> wrong place (missing alignment specifier, mostly)
>> * the set_context and get_context traps weren't saving fp
>> and i7, which meant that guest code that did a longjmp would
>> crash shortly afterwards (SPARC64 uses these traps to
>> implement setjmp/longjmp)
>> * we were trying to stuff a 64-bit PC into a uint32_t in
>> sigreturn, which caused a SEGV on return from a signal handler
>>
>> Review very much desired in particular from anybody who understands
>> SPARC register windows and how we handle them in linux-user for
>> patch 2! The other patches are straightforward.
>>
>> This patchset is sufficient that I can at least chroot into
>> a Debian sparc64 chroot and run basic commands like 'ls' from
>> the shell prompt (together with Giuseppe Musacchio's patch that
>> fixes the stack_t struct).
>>
>> There are clearly a bunch of other bugs in sparc signal handling
>> (starting with the fact that rt_frame support is simply not
>> implemented, but there are also some XXX/FIXME comments about TSTATE
>> save/restore in set/get_context and about the FPU state in the signal
>> frame code). There's also a Coverity issue about accessing off the
>> end of the sregs[] array in the target_mc_fpu struct -- the error is
>> actually harmless (we're accessing into the space in the union for
>> dregs[16..31] which is what we want to be doing) but I'll probably
>> put together a patch to make Coverity happier.
>
> Thanks Peter! This has been broken for a very long time indeed. Once
> this is merged I should probably look at getting a test environment set up.
+1
With these patches,
on sparc, debootstrap (wheezy) has some issues but after some hacks
around the packages I've been able to build and run LTP.
on sparc64, debootstrap (sid) seems to work well but after that there
are some issues with apt (URI error)
Thanks,
Laurent
prev parent reply other threads:[~2020-11-10 13:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 21:23 [PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs Peter Maydell
2020-11-05 21:23 ` [PATCH for-5.2 1/3] linux-user/sparc: Fix errors in target_ucontext structures Peter Maydell
2020-11-05 22:15 ` Richard Henderson
2020-11-05 23:36 ` Peter Maydell
2020-11-10 6:53 ` Laurent Vivier
2020-11-10 9:02 ` LemonBoy
2020-11-10 9:41 ` Laurent Vivier
2020-11-05 21:23 ` [PATCH for-5.2 2/3] linux-user/sparc: Correct set/get_context handling of fp and i7 Peter Maydell
2020-11-05 22:22 ` Richard Henderson
2020-11-10 6:53 ` Laurent Vivier
2020-11-05 21:23 ` [PATCH for-5.2 3/3] linux-user/sparc: Don't zero high half of PC, NPC, PSR in sigreturn Peter Maydell
2020-11-05 22:23 ` Richard Henderson
2020-11-10 6:55 ` Laurent Vivier
2020-11-10 12:56 ` [PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs Mark Cave-Ayland
2020-11-10 13:01 ` Laurent Vivier [this message]
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=49766a02-f5a4-0cec-aaf6-70c27d0be9ee@vivier.eu \
--to=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thatlemon@gmail.com \
/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).