Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Peter Maydell
On Tue, 30 May 2023 at 16:09, Richard Henderson wrote: > > On 5/30/23 07:48, Peter Maydell wrote: > > On Tue, 30 May 2023 at 15:29, Richard Henderson > > wrote: > >> > >> On 5/30/23 07:06, Peter Maydell wrote: > This is about falling through to the cmpxchg below: if !PAGE_WRITE_ORG, >

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Richard Henderson
On 5/30/23 07:48, Peter Maydell wrote: On Tue, 30 May 2023 at 15:29, Richard Henderson wrote: On 5/30/23 07:06, Peter Maydell wrote: This is about falling through to the cmpxchg below: if !PAGE_WRITE_ORG, then the page is really not writable, we will SIGSEGV, and handle_sigsegv_accerr_write

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Peter Maydell
On Tue, 30 May 2023 at 15:29, Richard Henderson wrote: > > On 5/30/23 07:06, Peter Maydell wrote: > >> This is about falling through to the cmpxchg below: if !PAGE_WRITE_ORG, > >> then the page is > >> really not writable, we will SIGSEGV, and handle_sigsegv_accerr_write will > >> kill the proce

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Richard Henderson
On 5/30/23 07:06, Peter Maydell wrote: This is about falling through to the cmpxchg below: if !PAGE_WRITE_ORG, then the page is really not writable, we will SIGSEGV, and handle_sigsegv_accerr_write will kill the process. Right, but if !PAGE_WRITE_ORG then that implies also !PAGE_WRITE, so we

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Peter Maydell
On Tue, 30 May 2023 at 14:58, Richard Henderson wrote: > > On 5/30/23 06:44, Peter Maydell wrote: > > On Fri, 26 May 2023 at 01:24, Richard Henderson > > wrote: > >> > >> PAGE_WRITE is current writability, as modified by TB protection; > >> PAGE_WRITE_ORG is the original page writability. > >> >

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Richard Henderson
On 5/30/23 06:44, Peter Maydell wrote: On Fri, 26 May 2023 at 01:24, Richard Henderson wrote: PAGE_WRITE is current writability, as modified by TB protection; PAGE_WRITE_ORG is the original page writability. Fixes: cdfac37be0d ("accel/tcg: Honor atomicity of loads") Signed-off-by: Richard Hen

Re: [PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 01:24, Richard Henderson wrote: > > PAGE_WRITE is current writability, as modified by TB protection; > PAGE_WRITE_ORG is the original page writability. > > Fixes: cdfac37be0d ("accel/tcg: Honor atomicity of loads") > Signed-off-by: Richard Henderson > --- > accel/tcg/ldst_

[PATCH v4 02/16] accel/tcg: Fix check for page writeability in load_atomic16_or_exit

2023-05-25 Thread Richard Henderson
PAGE_WRITE is current writability, as modified by TB protection; PAGE_WRITE_ORG is the original page writability. Fixes: cdfac37be0d ("accel/tcg: Honor atomicity of loads") Signed-off-by: Richard Henderson --- accel/tcg/ldst_atomicity.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)