hw/intc: riscv_aplic: Skip reset for KVM irqchip
The emulated APLIC state arrays are only allocated when QEMU handles the interrupt controller state itself. With KVM AIA/APLIC-IMSIC, the interrupt controller state is owned by the KVM in-kernel irqchip, so these emulated state arrays are not allocated. The APLIC reset handler still clears those arrays unconditionally. This makes qemu_system_reset(), which runs during machine creation, dereference NULL pointers with -machine virt,aia=aplic-imsic and KVM. Skip the emulated APLIC reset path when the interrupt controller is handled by KVM. The emulated path is unchanged for TCG and for configurations that use QEMU emulation. Fixes: 99bfcd329a ("hw/intc: riscv_aplic: Add reset API to APLIC") Reviewed-by: Nutty Liu <nutty.liu@hotmail.com> Signed-off-by: Qingwei Hu <qingwei.hu@bytedance.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260615131925.3019370-2-qingwei.hu@bytedance.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>