Re: [PATCH] target/riscv/kvm: Fix the group bit setting of AIA

2024-08-25 Thread Alistair Francis
On Wed, Aug 21, 2024 at 5:51 PM Andrew Jones wrote: > > Just as the hart bit setting of the AIA should be calculated as > ceil(log2(max_hart_id + 1)) the group bit setting should be > calculated as ceil(log2(max_group_id + 1)). The hart bits are > implemented by passing max_hart_id to find_last_bi

Re: [PATCH] target/riscv/kvm: Fix the group bit setting of AIA

2024-08-22 Thread Daniel Henrique Barboza
On 8/21/24 4:50 AM, Andrew Jones wrote: Just as the hart bit setting of the AIA should be calculated as ceil(log2(max_hart_id + 1)) the group bit setting should be calculated as ceil(log2(max_group_id + 1)). The hart bits are implemented by passing max_hart_id to find_last_bit() and adding one

[PATCH] target/riscv/kvm: Fix the group bit setting of AIA

2024-08-21 Thread Andrew Jones
Just as the hart bit setting of the AIA should be calculated as ceil(log2(max_hart_id + 1)) the group bit setting should be calculated as ceil(log2(max_group_id + 1)). The hart bits are implemented by passing max_hart_id to find_last_bit() and adding one to the result. Do the same for the group bit