Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Paolo Bonzini
On Tue, May 20, 2025 at 1:33 PM Daniel Henrique Barboza wrote: > > In general a lot (if not all) of the profile code should be moved out > > of tcg-cpu.c and into riscv_cpu_class_base_init(). I didn't do that > > because I didn't want to balloon an already-large series, but it's a > > pretty obvi

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Paolo Bonzini
On 5/19/25 14:07, Björn Töpel wrote: When realizing the cpus, the first cpu calls riscv_cpu_add_profiles() all profiles are disabled, whereas for the other cpu calls to riscv_cpu_add_profiles() have some profiles enabled. Having some profiles enabled, will issue a call to cpu_set_profile() that w

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Daniel Henrique Barboza
On 5/20/25 7:53 AM, Paolo Bonzini wrote: On 5/19/25 14:07, Björn Töpel wrote: When realizing the cpus, the first cpu calls riscv_cpu_add_profiles() all profiles are disabled, whereas for the other cpu calls to riscv_cpu_add_profiles() have some profiles enabled. Having some profiles enabled,

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Andrew Jones
On Tue, May 20, 2025 at 07:50:15AM -0300, Daniel Henrique Barboza wrote: > > > On 5/20/25 4:50 AM, Andrew Jones wrote: > > On Mon, May 19, 2025 at 02:15:05PM -0300, Daniel Henrique Barboza wrote: > > > > > > > > > On 5/19/25 1:35 PM, Andrew Jones wrote: > > > > On Mon, May 19, 2025 at 09:48:14A

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Daniel Henrique Barboza
On 5/20/25 4:50 AM, Andrew Jones wrote: On Mon, May 19, 2025 at 02:15:05PM -0300, Daniel Henrique Barboza wrote: On 5/19/25 1:35 PM, Andrew Jones wrote: On Mon, May 19, 2025 at 09:48:14AM -0300, Daniel Henrique Barboza wrote: On 5/16/25 9:23 AM, Alexandre Ghiti wrote: The satp mode is

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-20 Thread Andrew Jones
On Mon, May 19, 2025 at 02:15:05PM -0300, Daniel Henrique Barboza wrote: > > > On 5/19/25 1:35 PM, Andrew Jones wrote: > > On Mon, May 19, 2025 at 09:48:14AM -0300, Daniel Henrique Barboza wrote: > > > > > > > > > On 5/16/25 9:23 AM, Alexandre Ghiti wrote: > > > > The satp mode is set using the

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-19 Thread Daniel Henrique Barboza
On 5/19/25 1:35 PM, Andrew Jones wrote: On Mon, May 19, 2025 at 09:48:14AM -0300, Daniel Henrique Barboza wrote: On 5/16/25 9:23 AM, Alexandre Ghiti wrote: The satp mode is set using the svXX properties, but that actually restricts the satp mode to the minimum required by the profile and p

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-19 Thread Andrew Jones
On Mon, May 19, 2025 at 09:48:14AM -0300, Daniel Henrique Barboza wrote: > > > On 5/16/25 9:23 AM, Alexandre Ghiti wrote: > > The satp mode is set using the svXX properties, but that actually > > restricts the satp mode to the minimum required by the profile and > > prevents the use of higher sat

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-19 Thread Daniel Henrique Barboza
On 5/19/25 9:07 AM, Björn Töpel wrote: Alexandre Ghiti writes: The satp mode is set using the svXX properties, but that actually restricts the satp mode to the minimum required by the profile and prevents the use of higher satp modes. Fix this by not setting any svXX property and allow all

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-19 Thread Daniel Henrique Barboza
On 5/16/25 9:23 AM, Alexandre Ghiti wrote: The satp mode is set using the svXX properties, but that actually restricts the satp mode to the minimum required by the profile and prevents the use of higher satp modes. For rva23s64, in "Optional Extensions" we'll find: https://github.com/riscv/

Re: [PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-19 Thread Björn Töpel
Alexandre Ghiti writes: > The satp mode is set using the svXX properties, but that actually > restricts the satp mode to the minimum required by the profile and > prevents the use of higher satp modes. > > Fix this by not setting any svXX property and allow all satp mode to be > supported. I fig

[PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-16 Thread Alexandre Ghiti
The satp mode is set using the svXX properties, but that actually restricts the satp mode to the minimum required by the profile and prevents the use of higher satp modes. Fix this by not setting any svXX property and allow all satp mode to be supported. Signed-off-by: Alexandre Ghiti --- targe