[PATCH v2 0/4] linux/sparc: more get/set_context fixes

Peter Maydell posted 4 patches 3 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201106152738.26026-1-peter.maydell@linaro.org
Maintainers: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Laurent Vivier <laurent@vivier.eu>, Artyom Tarasenko <atar4qemu@gmail.com>
target/sparc/cpu.h          | 28 +++++++++---
linux-user/sparc/signal.c   | 87 ++++++++++++++++++++-----------------
target/sparc/int64_helper.c |  5 +--
3 files changed, 71 insertions(+), 49 deletions(-)
[PATCH v2 0/4] linux/sparc: more get/set_context fixes
Posted by Peter Maydell 3 years, 5 months ago
Based-on: 20201105212314.9628-1-peter.maydell@linaro.org
("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs")

This series fixes a few more issues with our sparc linux-user
sparc64_get_context() and sparc64_set_context() implementation:
 * we weren't handling FPU regs correctly, and also the way
   we coded the handling triggered Coverity warnings
 * some stray pointless error checks
 * we shouldn't restore %g7 in set_context
 * we weren't saving and restoring tstate correctly

My main aim here was to deal with the Coverity errors, but
the rest are things I noticed while I was working on the
code or which had fixme comments, and I figured I'd fix
them while the code was fresh in my mind.

thanks
-- PMM

Peter Maydell (4):
  linux-user/sparc: Correct sparc64_get/set_context() FPU handling
  linux-user/sparc: Remove unneeded checks of 'err' from
    sparc64_get_context()
  linux-user/sparc: Don't restore %g7 in sparc64_set_context()
  linux-user/sparc: Handle tstate in sparc64_get/set_context()

 target/sparc/cpu.h          | 28 +++++++++---
 linux-user/sparc/signal.c   | 87 ++++++++++++++++++++-----------------
 target/sparc/int64_helper.c |  5 +--
 3 files changed, 71 insertions(+), 49 deletions(-)

-- 
2.20.1


Re: [PATCH v2 0/4] linux/sparc: more get/set_context fixes
Posted by Peter Maydell 3 years, 5 months ago
On Fri, 6 Nov 2020 at 15:27, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Based-on: 20201105212314.9628-1-peter.maydell@linaro.org
> ("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs")
>
> This series fixes a few more issues with our sparc linux-user
> sparc64_get_context() and sparc64_set_context() implementation:
>  * we weren't handling FPU regs correctly, and also the way
>    we coded the handling triggered Coverity warnings
>  * some stray pointless error checks
>  * we shouldn't restore %g7 in set_context
>  * we weren't saving and restoring tstate correctly

The 'v2' in the subject tag is wrong, incidentally; this is
the first version of this series :-)

-- PMM