hw/intc/arm_gicv3: Support configurable number of physical priority bits
commit84597ff39484ec171567c7c80061100eb4a6c331
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 12 May 2022 15:14:55 +0000 (12 16:14 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 19 May 2022 15:19:02 +0000 (19 16:19 +0100)
tree311535a3a332177387931e52885a89e32ecf59e6
parent9774c0f7ba6ae2980a291cb53a13661ddaa2f5de
hw/intc/arm_gicv3: Support configurable number of physical priority bits

The GICv3 code has always supported a configurable number of virtual
priority and preemption bits, but our implementation currently
hardcodes the number of physical priority bits at 8.  This is not
what most hardware implementations provide; for instance the
Cortex-A53 provides only 5 bits of physical priority.

Make the number of physical priority/preemption bits driven by fields
in the GICv3CPUState, the way that we already do for virtual
priority/preemption bits.  We set cs->pribits to 8, so there is no
behavioural change in this commit.  A following commit will add the
machinery for CPUs to set this to the correct value for their
implementation.

Note that changing the number of priority bits would be a migration
compatibility break, because the semantics of the icc_apr[][] array
changes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220512151457.3899052-5-peter.maydell@linaro.org
Message-id: 20220506162129.2896966-4-peter.maydell@linaro.org
hw/intc/arm_gicv3_cpuif.c
include/hw/intc/arm_gicv3_common.h