qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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