Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-05-15 Thread Richard Henderson
On 5/14/25 22:33, Daniel Henrique Barboza wrote: Richard, On 4/25/25 12:23 PM, Richard Henderson wrote: Do not examine a random host return address, but properly compute the next pc for the guest cpu. Fixes: f18637cd611 ("RISC-V: Add misa runtime write support") Signed-off-by: Richard Henderso

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-05-14 Thread Daniel Henrique Barboza
Richard, On 4/25/25 12:23 PM, Richard Henderson wrote: Do not examine a random host return address, but properly compute the next pc for the guest cpu. Fixes: f18637cd611 ("RISC-V: Add misa runtime write support") Signed-off-by: Richard Henderson --- target/riscv/csr.c | 22 +

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-30 Thread Alistair Francis
On Wed, Apr 30, 2025 at 12:34 AM Richard Henderson wrote: > > On 4/25/25 08:23, Richard Henderson wrote: > > -if ((val & RVC) && (GETPC() & ~3) != 0) { > > +/* Suppress 'C' if next instruction is not aligned. */ > > +if ((val & RVC) && (get_next_pc(env, ra) & ~3) != 0) { > > Bah. I pr

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-29 Thread Richard Henderson
On 4/25/25 08:23, Richard Henderson wrote: -if ((val & RVC) && (GETPC() & ~3) != 0) { +/* Suppress 'C' if next instruction is not aligned. */ +if ((val & RVC) && (get_next_pc(env, ra) & ~3) != 0) { Bah. I preserved a second bug here: not "& ~3" but "& 3". r~

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-28 Thread Alistair Francis
On Sat, Apr 26, 2025 at 1:26 AM Richard Henderson wrote: > > Do not examine a random host return address, but > properly compute the next pc for the guest cpu. > > Fixes: f18637cd611 ("RISC-V: Add misa runtime write support") > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Ali

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-25 Thread Philippe Mathieu-Daudé
On 25/4/25 17:23, Richard Henderson wrote: Do not examine a random host return address, but properly compute the next pc for the guest cpu. Fixes: f18637cd611 ("RISC-V: Add misa runtime write support") Signed-off-by: Richard Henderson --- target/riscv/csr.c | 22 +- 1 fil

[PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-25 Thread Richard Henderson
Do not examine a random host return address, but properly compute the next pc for the guest cpu. Fixes: f18637cd611 ("RISC-V: Add misa runtime write support") Signed-off-by: Richard Henderson --- target/riscv/csr.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) di