[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only
Date: Thu, 29 Jul 2021 08:14:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/29/21 2:46 AM, Richard Henderson wrote:
> This began with Peter wanting a cpu_ldst.h interface that can handle
> alignment info for Arm M-profile system mode, which will also compile
> for user-only without ifdefs.  This is patch 32.
> Once I had that interface, I thought I might as well enforce the
> requested alignment in user-only.  There are plenty of cases where
> we ought to have been doing that for quite a while.  This took rather
> more work than I imagined to start.
> So far only x86 host has been fully converted to handle unaligned
> operations in user-only mode.  I'll get to the others later.  But
> the added testcase is fairly broad, and caught lots of bugs and/or
> missing code between target/ and linux-user/.
> Notes:
>   * For target/i386 we have no way to signal SIGBUS from user-only.
>     In theory we could go through do_unaligned_access in system mode,
>     via #AC.  But we don't even implement that control in tcg, probably
>     because no one ever sets it.  The cmpxchg16b insn requires alignment,
>     but raises #GP, which maps to SIGSEGV.
>   * For target/s390x we have no way to signal SIGBUS from user-only.
>     The atomic operations raise PGM_SPECIFICATION, which the linux
>     kernel maps to SIGILL.
>   * I think target/hexagon should be setting TARGET_ALIGNED_ONLY=y.
>     In the meantime, all memory accesses are allowed to be unaligned.

Now I better understand what you tried to explain me last with
TCGCPUOps. Since Claudio was also involved, Cc'ing him (not asking
for a review, just in case he wants to follow up).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]