qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, imp@bsdimp.com, Laurent@vivier.eu
Subject: Re: [PATCH v6 02/16] linux-user/host/ppc64: Use r11 for signal_pending address
Date: Mon, 29 Nov 2021 15:30:03 +0100	[thread overview]
Message-ID: <72a69c85-8a99-bf06-8baf-f6dbf8f49ada@linaro.org> (raw)
In-Reply-To: <CAFEAcA-x6Q_mXbFLzr=7ALGkqijj=gM5DRu_TRMAkFSm8XiZGQ@mail.gmail.com>

On 11/29/21 12:01 PM, Peter Maydell wrote:
> On Tue, 23 Nov 2021 at 17:40, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> We don't need a register that can live across the syscall;
>> we only need a register that can live until the syscall.
> 
> What about the case where:
>   * we execute the sc instruction (r11 trashed)
>   * the syscall is one that from the host kernel point of
>     view is restartable
>   * the kernel arranges to restart the syscall by rewinding the
>     PC to point to the start of the 'sc' instruction
>   * our rewind_if_in_safe_syscall() rewinds PC further to
>     point at safe_syscall_start
>   * we want to use r11 again, but it was trashed in step 1
> ?
> 
> Put another way, this patch is effectively a revert of
> commit 5d9f3ea081721, which was a fix to an observed bug.

Whoops.  I forgot about that (a mere 3 years ago).

r~


  reply	other threads:[~2021-11-29 14:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 17:37 [PATCH for-7.0 v6 00/16] linux-user: simplify safe signal handling Richard Henderson
2021-11-23 17:37 ` [PATCH v6 01/16] linux-user: Untabify all safe-syscall.inc.S Richard Henderson
2021-11-25 10:17   ` Warner Losh
2021-11-23 17:37 ` [PATCH v6 02/16] linux-user/host/ppc64: Use r11 for signal_pending address Richard Henderson
2021-11-29 11:01   ` Peter Maydell
2021-11-29 14:30     ` Richard Henderson [this message]
2021-11-23 17:37 ` [PATCH v6 03/16] linux-user: Move syscall error detection into safe_syscall_base Richard Henderson
2021-11-25 10:25   ` Warner Losh
2021-11-23 17:37 ` [PATCH v6 04/16] linux-user/host/mips: Add safe-syscall.inc.S Richard Henderson
2021-11-25 10:22   ` Warner Losh
2021-11-29 16:40   ` Peter Maydell
2021-11-29 16:51     ` Richard Henderson
2021-11-23 17:37 ` [PATCH v6 05/16] linux-user/host/sparc64: " Richard Henderson
2021-11-23 17:37 ` [PATCH v6 06/16] linux-user: Remove HAVE_SAFE_SYSCALL and hostdep.h Richard Henderson
2021-11-23 17:37 ` [PATCH v6 07/16] linux-user: Rename TARGET_ERESTARTSYS to QEMU_ERESTARTSYS Richard Henderson
2021-11-23 17:37 ` [PATCH v6 08/16] bsd-user: " Richard Henderson
2021-11-23 17:37 ` [PATCH v6 09/16] linux-user: Rename TARGET_QEMU_ESIGRETURN to QEMU_ESIGRETURN Richard Henderson
2021-11-23 17:37 ` [PATCH v6 10/16] linux-user: Create special-errno.h Richard Henderson
2021-11-23 17:37 ` [PATCH v6 11/16] bsd-user: " Richard Henderson
2021-11-23 17:37 ` [PATCH v6 12/16] common-user: Move safe-syscall.* from linux-user Richard Henderson
2021-11-23 17:37 ` [PATCH v6 13/16] common-user: Adjust system call return on FreeBSD Richard Henderson
2021-11-23 17:37 ` [PATCH v6 14/16] linux-user: Move thunk.c from top-level Richard Henderson
2021-11-23 17:37 ` [PATCH v6 15/16] meson: Move linux_user_ss to linux-user/ Richard Henderson
2021-11-23 17:37 ` [PATCH v6 16/16] meson: Move bsd_user_ss to bsd-user/ 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=72a69c85-8a99-bf06-8baf-f6dbf8f49ada@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=Laurent@vivier.eu \
    --cc=imp@bsdimp.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).