• C
    KVM: arm/arm64: vgic: Always initialize the group of private IRQs · 50066f85
    Christoffer Dall 提交于
    [ Upstream commit ab2d5eb03dbb7b37a1c6356686fb48626ab0c93e ]
    
    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: NChristoffer Dall <christoffer.dall@arm.com>
    Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    50066f85
vgic-init.c 13.8 KB