Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-05 Thread Richard Henderson
On 10/4/24 07:24, Richard Henderson wrote: I was hoping for a reorg of the target hooks that could allow the target to see misalignment and permission check simultaneously, then the target chooses the order in which the two faults are presented.  Given how complicated tlb_fill is though, I don't

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-04 Thread Richard Henderson
On 10/2/24 08:35, Alex Bennée wrote: Helge Deller writes: When the emulated CPU reads or writes to a memory location a) for which no read/write permissions exists, *and* b) the access happens unaligned (non-natural alignment), then the CPU should either - trigger a permission fault, or - trigg

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-03 Thread Richard Henderson
On 10/2/24 08:47, Peter Maydell wrote: There's also something curious going on here -- this patch says "we check alignment before permissions, and that's wrong on PARISC". But there's a comment in target/arm/ptw.c that says "we check permissions before alignment, and that's wrong on Arm":

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-02 Thread Helge Deller
On 10/2/24 17:47, Peter Maydell wrote: On Wed, 2 Oct 2024 at 16:35, Alex Bennée wrote: Helge Deller writes: When the emulated CPU reads or writes to a memory location a) for which no read/write permissions exists, *and* b) the access happens unaligned (non-natural alignment), then the CPU s

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-02 Thread Alex Bennée
Peter Maydell writes: > On Wed, 2 Oct 2024 at 16:35, Alex Bennée wrote: >> >> Helge Deller writes: >> >> > When the emulated CPU reads or writes to a memory location >> > a) for which no read/write permissions exists, *and* >> > b) the access happens unaligned (non-natural alignment), >> > then

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-02 Thread Peter Maydell
On Wed, 2 Oct 2024 at 16:35, Alex Bennée wrote: > > Helge Deller writes: > > > When the emulated CPU reads or writes to a memory location > > a) for which no read/write permissions exists, *and* > > b) the access happens unaligned (non-natural alignment), > > then the CPU should either > > - trig

Re: {PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-02 Thread Alex Bennée
Helge Deller writes: > When the emulated CPU reads or writes to a memory location > a) for which no read/write permissions exists, *and* > b) the access happens unaligned (non-natural alignment), > then the CPU should either > - trigger a permission fault, or > - trigger an unalign access fault.

{PATCH] accel/tcg: Fix CPU specific unaligned behaviour

2024-10-01 Thread Helge Deller
When the emulated CPU reads or writes to a memory location a) for which no read/write permissions exists, *and* b) the access happens unaligned (non-natural alignment), then the CPU should either - trigger a permission fault, or - trigger an unalign access fault. In the current code the alignment