[PATCH V2 3/4] irqchip/riscv-imsic: Move nr_guest_files to per-HART local config

Thomas Gleixner tglx at kernel.org
Tue May 5 13:12:00 PDT 2026


On Sat, Apr 25 2026 at 00:59, guoren at kernel.org wrote:
> From: "Guo Ren (Alibaba DAMO Academy)" <guoren at kernel.org>
>
> With the recent KVM AIA per-HART HGEI conversion, the global
> nr_guest_files is no longer appropriate. Different HARTs in
> heterogeneous SoCs may have different numbers of guest interrupt
> files.
>
> Move `nr_guest_files` from `struct imsic_global_config` to
> `struct imsic_local_config`, and compute it per-CPU in
> imsic_setup_state() based on the actual MMIO guest file region size.
>
> Update the related comment to reflect that KVM now uses the
> per-HART value.
>
> This eliminates the last global assumption about guest files and
> completes the per-HART conversion series for RISC-V AIA/IMSIC.
>
> Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren at kernel.org>

Assuming this goes through the risc-v tree:

Acked-by: Thomas Gleixner <tglx at kernel.org>



More information about the kvm-riscv mailing list