Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-15 Thread Richard Henderson
On 4/14/24 15:48, M Bazz wrote: I noticed that cpu_mmu_index() would have returned MMU_USER_IDX if the supervisor bit hadn't happened to be set (not sure if this execution path can occur for lda). No, it cannot. Note that this check is gone in your patch. Correct. Since 'lda' has already c

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-14 Thread M Bazz
Hi Henry, I want to thank you for every chance I get to learn from you. Each email excites me. On Sun, Apr 14, 2024 at 1:20 PM Richard Henderson wrote: > The "current" permission, as computed by > > > -case ASI_KERNELTXT: /* Supervisor code access */ > > -oi = make_memop_idx(memop, c

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-14 Thread Richard Henderson
On 4/13/24 18:54, M Bazz wrote: This thought just came to me. `lda` is a privileged instruction. It has to run in supervisor mode. So, I'm struggling to understand how the kernel permission was wrong. Isn't that the right permission for this instruction? The "current" permission, as computed b

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-13 Thread M Bazz
Hi Richard, On Thu, Apr 11, 2024 at 10:16 PM Richard Henderson wrote: > > On 4/11/24 18:15, M Bazz wrote: > > diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c > > index e581bb42ac..4f87e44a93 100644 > > --- a/target/sparc/ldst_helper.c > > +++ b/target/sparc/ldst_helper.c > >

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-11 Thread Richard Henderson
On 4/11/24 18:15, M Bazz wrote: On Thu, Apr 11, 2024, 5:55 PM Richard Henderson wrote: On 4/11/24 14:29, M Bazz wrote: fixes a longstanding bug which causes a "Nonparity Synchronous Error" kernel panic while using a debugger on Solaris / SunOS systems. The panic would occur on the first attem

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-11 Thread M Bazz
On Thu, Apr 11, 2024, 5:55 PM Richard Henderson wrote: > > On 4/11/24 14:29, M Bazz wrote: > > fixes a longstanding bug which causes a "Nonparity Synchronous Error" > > kernel panic while using a debugger on Solaris / SunOS systems. The panic > > would occur on the first attempt to single-step the

Re: [PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-11 Thread Richard Henderson
On 4/11/24 14:29, M Bazz wrote: fixes a longstanding bug which causes a "Nonparity Synchronous Error" kernel panic while using a debugger on Solaris / SunOS systems. The panic would occur on the first attempt to single-step the process. The problem stems from an lda instruction on ASI_USERTXT (8

[PATCH] target/sparc: resolve ASI_USERTXT correctly

2024-04-11 Thread M Bazz
fixes a longstanding bug which causes a "Nonparity Synchronous Error" kernel panic while using a debugger on Solaris / SunOS systems. The panic would occur on the first attempt to single-step the process. The problem stems from an lda instruction on ASI_USERTXT (8). This asi was not being resolved