On Thu, 2026-11-05 at 16:02 +0000, Peter Maydell wrote: > On Fri, 23 Oct 2026 at 03:07, Alistair Francis > <[email protected]> wrote: > > > > On Thu, 2026-10-22 at 21:42 +0100, Peter Maydell wrote: > > > The riscv aplic interrupt controller has various configurable > > > properties for things like num-harts and num-irqs, which have > > > architectural upper limits. > > > > > > Currently these are checked in riscv_aplic_create(), by assert(). > > > QOM devices should check this kind of thing in their realize > > > method, > > > and fail realize for out of range values (which in this case will > > > cause riscv_aplic_create() to make QEMU exit with an error, since > > > it > > > uses &error_fatal). This isn't a problem currently as no SoC > > > creates > > > and configures the TYPE_RISCV_APLIC device itself, but it avoids > > > one > > > for the future. > > > > > > Move the checks to the realize method. This requires slight > > > adjustments in some cases because: > > > * property num-irqs is set to num_sources + 1 > > > * property iprio-mask is set to (1U << iprio_bits) - 1 > > > > > > Signed-off-by: Peter Maydell <[email protected]> > > > > Reviewed-by: Alistair Francis <[email protected]>
Thanks! Applied to riscv-to-apply.next > > Thanks; do you plan to queue this patch for 11.2 ? Sorry, I reviewed it, but this slipped through the cracks and didn't get applied. It's in my tree now, but I wasn't planning on another PR for 11.2 Alistair > > -- PMM
