[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: |
Claudio Fontana |
|
Subject: |
Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only |
|
Date: |
Thu, 29 Jul 2021 16:01:40 +0200 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 7/29/21 8:14 AM, Philippe Mathieu-Daudé wrote:
> 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).
>
Thanks, what I understand from glancing through the thread is that
at the time we made handling of unaligned access a sysmmu-only TCGCPUOps,
while this series corrects that and implements unaligned accesses for user-only,
so seems good to me.
Ciao,
Claudio
- Re: [PATCH for-6.2 38/43] target/arm: Use cpu_*_mmu instead of helper_*_mmu, (continued)
- [PATCH for-6.2 39/43] tcg: Move helper_*_mmu decls to tcg/tcg-ldst.h, Richard Henderson, 2021/07/28
- [PATCH for-6.2 35/43] target/mips: Use 8-byte memory ops for msa load/store, Richard Henderson, 2021/07/28
- [PATCH for-6.2 37/43] target/sparc: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/07/28
- [PATCH for-6.2 40/43] linux-user/alpha: Remove TARGET_ALIGNED_ONLY, Richard Henderson, 2021/07/28
- [PATCH for-6.2 41/43] tcg: Add helper_unaligned_mmu for user-only sigbus, Richard Henderson, 2021/07/28
- [PATCH for-6.2 43/43] tests/tcg/multiarch: Add sigbus.c, Richard Henderson, 2021/07/28
- [PATCH for-6.2 42/43] tcg/i386: Support raising sigbus for user-only, Richard Henderson, 2021/07/28
- Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only, Philippe Mathieu-Daudé, 2021/07/29
- Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only,
Claudio Fontana <=