All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon.oss@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Christophe Lyon <christophe.lyon@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode
Date: Wed, 15 Sep 2021 11:57:31 +0200	[thread overview]
Message-ID: <CAKhMtSJ7dsK=fZoj5fP2fHa0-93KuJgf-iSXp0MjkGOSOrQDew@mail.gmail.com> (raw)
In-Reply-To: <20210914120725.24992-1-peter.maydell@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

Hi Peter,

Thanks for the prompt patches!

On Tue, Sep 14, 2021 at 2:08 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> This patchset fixes https://gitlab.com/qemu-project/qemu/-/issues/613
> which is a bug where we weren't setting FPSCR.LTPSIZE correctly
> out of reset for the user-mode emulator. The effect is that
> when using an M-profile CPU with the low-overhead-branch or MVE
> extensions (ie the Cortex-M55) with the linux-user QEMU the 'LE'
> instruction would take a UserFault and MVE instructions would
> be incorrectly predicated.
>
> This is the result of some over-exuberant ifdeffery in the
> arm_cpu_reset() function. Patch 1 fixes that so that most of
> the M-profile-specific reset handling is not ifdeffed, and
> when we're in user mode we specifically set the FPU state up
> cleanly. Patches 2 and 3 are just follow-on tidyup.
>
> Christophe, if you are in a position to test this series with:
>  M55 (has Security, MVE and LOB)
>  M33 (has Security extension but not MVE/LOB)
>  M7 or M4 (no Security, but does have FPU)
> that would be ideal. I don't really have much in the way of
> test cases for usermode to hand, so it's possible that I
> forgot something in the init of the FPU state that might break
> one of those combinations. (It does fix the test case attached
> to the bug report.)
>

I ran the GCC testsuite with these configurations, and found no regression
compared to qemu-6.0, thanks.

In the M55 case, this also enabled many more tests, which is great!

Christophe


> thanks
> -- PMM
>
> Peter Maydell (3):
>   target/arm: Don't skip M-profile reset entirely in user mode
>   target/arm: Always clear exclusive monitor on reset
>   target/arm: Consolidate ifdef blocks in reset
>
>  target/arm/cpu.c | 39 ++++++++++++++++++++++++++++-----------
>  1 file changed, 28 insertions(+), 11 deletions(-)
>
> --
> 2.20.1
>
>
>

[-- Attachment #2: Type: text/html, Size: 2660 bytes --]

      parent reply	other threads:[~2021-09-15  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 12:07 [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode Peter Maydell
2021-09-14 12:07 ` [PATCH 1/3] target/arm: Don't skip M-profile reset entirely in user mode Peter Maydell
2021-09-14 12:07 ` [PATCH 2/3] target/arm: Always clear exclusive monitor on reset Peter Maydell
2021-09-14 12:07 ` [PATCH 3/3] target/arm: Consolidate ifdef blocks in reset Peter Maydell
2021-09-14 13:10 ` [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode Richard Henderson
2021-09-15  9:57 ` Christophe Lyon [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='CAKhMtSJ7dsK=fZoj5fP2fHa0-93KuJgf-iSXp0MjkGOSOrQDew@mail.gmail.com' \
    --to=christophe.lyon.oss@gmail.com \
    --cc=christophe.lyon@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.