KVM: arm64: Restore GICv2-on-GICv3 functionality
authorMarc Zyngier <maz@kernel.org>
Wed, 7 Jun 2023 14:38:44 +0000 (15:38 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 7 Jun 2023 15:38:25 +0000 (16:38 +0100)
commit1caa71a7a600f7781ce05ef1e84701c459653663
tree792606cd47251d79e7568a6131c2e6a4384af9ed
parent0c2f9acf6ae74118385f7a7d48f4b2d93637b628
KVM: arm64: Restore GICv2-on-GICv3 functionality

When reworking the vgic locking, the vgic distributor registration
got simplified, which was a very good cleanup. But just a tad too
radical, as we now register the *native* vgic only, ignoring the
GICv2-on-GICv3 that allows pre-historic VMs (or so I thought)
to run.

As it turns out, QEMU still defaults to GICv2 in some cases, and
this breaks Nathan's setup!

Fix it by propagating the *requested* vgic type rather than the
host's version.

Fixes: 59112e9c390b ("KVM: arm64: vgic: Fix a circular locking issue")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
link: https://lore.kernel.org/r/20230606221525.GA2269598@dev-arch.thelio-3990X
arch/arm64/kvm/vgic/vgic-init.c