Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-23 Thread Deepak Gupta
On Sat, Jan 20, 2024 at 11:14 PM Alexey Baturo wrote: > > Hi, > > Having the feature to run binaries with pointer masking on qemu-user is > really nice, but I see this patch series as an initial support. > Obviously there'll be more patches and fixes for pointer masking as soon as > arch tests a

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-20 Thread Alexey Baturo
Hi, Having the feature to run binaries with pointer masking on qemu-user is really nice, but I see this patch series as an initial support. Obviously there'll be more patches and fixes for pointer masking as soon as arch tests are ready. I suggest supporting qemu-user in the next patches, but make

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-19 Thread Richard Henderson
On 1/19/24 09:40, Deepak Gupta wrote: On Thu, Jan 18, 2024 at 12:50 PM Richard Henderson wrote: At some point pointer masking will be in hardware, and the kernel will gain support for it, and there will likely be a prctl() added for it. At the point the kernel finalizes the API, you will be

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Deepak Gupta
On Thu, Jan 18, 2024 at 12:50 PM Richard Henderson wrote: > > On 1/19/24 04:21, Deepak Gupta wrote: > > On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo > > wrote: > >> > >> From: Alexey Baturo > >> > >> Signed-off-by: Alexey Baturo > >> --- > > > >> + > >> +bool riscv_cpu_virt_mem_enabled(CPURISC

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Richard Henderson
On 1/19/24 04:21, Deepak Gupta wrote: On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo wrote: From: Alexey Baturo Signed-off-by: Alexey Baturo --- + +bool riscv_cpu_virt_mem_enabled(CPURISCVState *env) +{ +bool virt_mem_en = false; +#ifndef CONFIG_USER_ONLY +int satp_mode = 0; +i

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Deepak Gupta
On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo wrote: > > From: Alexey Baturo > > Signed-off-by: Alexey Baturo > --- > + > +bool riscv_cpu_virt_mem_enabled(CPURISCVState *env) > +{ > +bool virt_mem_en = false; > +#ifndef CONFIG_USER_ONLY > +int satp_mode = 0; > +int priv_mode = cpu_ad

[PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-09 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 4 +++ target/riscv/cpu_helper.c | 58 +++ 2 files changed, 62 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index c9bed5c9fc..1c8979c1c8 100644 --- a/targ