hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4
authorZenghui Yu <yuzenghui@huawei.com>
Fri, 12 Aug 2022 02:20:18 +0000 (10:20 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Aug 2022 10:25:18 +0000 (11:25 +0100)
commite1f045780ba60bc511b5acb168b32a6a41148d73
treedde3439f2c5b18584931193d8cd18e6e098b07d3
parent6a54ac2a9737057dc19aa584d823a3011717423b
hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4

With the introduction of the new TCG GICv4, build_madt() is badly broken
as we do not present any GIC Redistributor structure in MADT for GICv4
guests, so that they have no idea about where the Redistributor
register frames are. This fixes a Linux guest crash at boot time with
ACPI enabled and '-machine gic-version=4'.

While at it, let's convert the remaining hard coded gic_version into
enumeration VIRT_GIC_VERSION_2 for consistency.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Message-id: 20220812022018.1069-1-yuzenghui@huawei.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt-acpi-build.c