Files
linux/arch
Marc Zyngier 9b8948cb0e UPSTREAM: KVM: arm64: vgic-v3: Consistently populate ID_AA64PFR0_EL1.GIC
When adding support for the slightly wonky Apple M1, we had to
populate ID_AA64PFR0_EL1.GIC==1 to present something to the guest,
as the HW itself doesn't advertise the feature.

However, we gated this on the in-kernel irqchip being created.
This causes some trouble for QEMU, which snapshots the state of
the registers before creating a virtual GIC, and then tries to
restore these registers once the GIC has been created.  Obviously,
between the two stages, ID_AA64PFR0_EL1.GIC has changed value,
and the write fails.

The fix is to actually emulate the HW, and always populate the
field if the HW is capable of it.

Bug: 254441685
Fixes: 562e530fd7 ("KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3")
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Oliver Upton <oupton@google.com>
Link: https://lore.kernel.org/r/20220503211424.3375263-1-maz@kernel.org
(cherry picked from commit 5163373af1)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I8126f08ac61896bb5b2982257ad3ecc7d1a1a423
2022-11-25 13:39:08 +00:00
..
2022-01-20 09:35:27 +01:00
2021-11-26 10:39:19 +01:00
2022-03-15 13:57:31 +01:00
2022-01-27 10:54:06 +01:00
2022-03-18 12:17:14 +01:00
2022-01-29 09:07:58 +01:00