Re: [PATCH] linux-user: Fixed cpu restore with pc 0 on SIGBUS

2024-01-14 Thread Robbin Ehn
he PC is > > So we should probably have a > > Fixes: f4e1168198 ("linux-user: Split out host_sig{segv,bus}_handler") You are correct. > > > never set. Thus cpu_loop_exit_restore is called with a zero PC and > > we immediate get a SIGSEGV. > > > &

[PATCH] linux-user: Fixed cpu restore with pc 0 on SIGBUS

2024-01-12 Thread Robbin Ehn
Commit f4e1168198 (linux-user: Split out host_sig{segv,bus}_handler) introduced a bug, when returning from host_sigbus_handler the PC is never set. Thus cpu_loop_exit_restore is called with a zero PC and we immediate get a SIGSEGV. Signed-off-by: Robbin Ehn --- linux-user/signal.c | 5 +++-- 1

[PATCH] linux-user/riscv: Add new extensions to hwprobe

2023-08-28 Thread Robbin Ehn
This patch adds the new extensions in linux 6.5 to the hwprobe syscall. And fixes RVC check to OR with correct value. The previous variable contains 0 therefore it did work. Signed-off-by: Robbin Ehn --- linux-user/syscall.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion

Re: [PATCH] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-27 Thread Robbin Ehn
On Fri, 2023-06-23 at 12:24 +1000, Alistair Francis wrote: > On Mon, Jun 19, 2023 at 6:25 PM Robbin Ehn wrote: > > > > This patch adds the new syscall for the > > "RISC-V Hardware Probing Interface" > > (https://docs.kernel.org/riscv/hwprobe.html).

[PATCH] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-19 Thread Robbin Ehn
This patch adds the new syscall for the "RISC-V Hardware Probing Interface" (https://docs.kernel.org/riscv/hwprobe.html). Reviewed-by: Palmer Dabbelt Signed-off-by: Robbin Ehn --- v1->v2: Moved to syscall.c v2->v3: Separate function, get/put user v3->patch --- linux-user/r

Re: [RFC v3] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-19 Thread Robbin Ehn
On Thu, 2023-06-15 at 10:12 -0700, Palmer Dabbelt wrote: > On Thu, 08 Jun 2023 00:55:22 PDT (-0700), r...@rivosinc.com wrote: > > This patch adds the new syscall for the > > "RISC-V Hardware Probing Interface" > > (https://docs.kernel.org/riscv/hwprobe.html). >

[RFC v3] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-08 Thread Robbin Ehn
This patch adds the new syscall for the "RISC-V Hardware Probing Interface" (https://docs.kernel.org/riscv/hwprobe.html). Signed-off-by: Robbin Ehn --- v1->v2: Moved to syscall.c v2->v3: Separate function, get/put user --- linux-user/riscv/syscall32_nr.h | 1 + linux-user/risc

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-05 Thread Robbin Ehn
On Fri, 2023-06-02 at 20:00 -0700, Richard Henderson wrote: > On 6/2/23 08:07, Andrew Jones wrote: > > On Fri, Jun 02, 2023 at 04:39:20PM +0200, Robbin Ehn wrote: > > > On Fri, 2023-06-02 at 16:02 +0200, Andrew Jones wrote: > > > > On Fri, Jun 02, 2023 at 11:4

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-05 Thread Robbin Ehn
On Fri, 2023-06-02 at 19:57 -0700, Richard Henderson wrote: > > > +case RISCV_HWPROBE_KEY_CPUPERF_0: > > +pair->value = RISCV_HWPROBE_MISALIGNED_UNKNOWN; > > Is that really what you want to expose here? FAST is always going to be > true, in that > handling the unaligned

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-02 Thread Robbin Ehn
On Fri, 2023-06-02 at 16:02 +0200, Andrew Jones wrote: > On Fri, Jun 02, 2023 at 11:41:11AM +0200, Robbin Ehn wrote: > > This patch adds the new syscall for the > > "RISC-V Hardware Probing Interface" > > (https://docs.kernel.org/riscv/hwprobe.html). >

[RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-02 Thread Robbin Ehn
This patch adds the new syscall for the "RISC-V Hardware Probing Interface" (https://docs.kernel.org/riscv/hwprobe.html). Signed-off-by: Robbin Ehn --- v1->v2: Moved to syscall.c --- linux-user/riscv/syscall32_nr.h | 1 + linux-user/riscv/syscall64_nr.h | 1 + linux-u

Re: [RFC] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-02 Thread Robbin Ehn
On Thu, 2023-06-01 at 08:15 -0700, Richard Henderson wrote: > On 6/1/23 05:27, Robbin Ehn wrote: > > This patch adds the new syscall for the > > "RISC-V Hardware Probing Interface" > > (https://docs.kernel.org/riscv/hwprobe.html). > > > > Signed-off-by:

[RFC] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-01 Thread Robbin Ehn
This patch adds the new syscall for the "RISC-V Hardware Probing Interface" (https://docs.kernel.org/riscv/hwprobe.html). Signed-off-by: Robbin Ehn --- linux-headers/asm-riscv/unistd.h | 9 +++ linux-user/riscv/cpu_loop.c | 119 ++- linux-