]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic: Always initialize the group of private IRQs
authorChristoffer Dall <christoffer.dall@arm.com>
Thu, 10 Jan 2019 14:33:52 +0000 (15:33 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Thu, 7 Feb 2019 11:44:47 +0000 (11:44 +0000)
commitc406cca21a4f13134a666c5c0b1ee5ef017041fc
treeda83d4d0e109e1a50589bba27dda08564b6b35e0
parent8d575c38c686de2e782a25dd0d000229ed962585
KVM: arm/arm64: vgic: Always initialize the group of private IRQs

We currently initialize the group of private IRQs during
kvm_vgic_vcpu_init, and the value of the group depends on the GIC model
we are emulating.  However, CPUs created before creating (and
initializing) the VGIC might end up with the wrong group if the VGIC
is created as GICv3 later.

Since we have no enforced ordering of creating the VGIC and creating
VCPUs, we can end up with part the VCPUs being properly intialized and
the remaining incorrectly initialized.  That also means that we have no
single place to do the per-cpu data structure initialization which
depends on knowing the emulated GIC model (which is only the group
field).

This patch removes the incorrect comment from kvm_vgic_vcpu_init and
initializes the group of all previously created VCPUs's private
interrupts in vgic_init in addition to the existing initialization in
kvm_vgic_vcpu_init.

Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-init.c