arm/arm64: KVM: Don't allow creating VCPUs after vgic_initialized
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 9 Dec 2014 13:33:45 +0000 (14:33 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Sat, 13 Dec 2014 13:17:10 +0000 (14:17 +0100)
commit716139df2517fbc3f2306dbe8eba0fa88dca0189
tree5c0a965f16c129f7b31c7404e78b908a184cd4e9
parent1f57be289571d514b9412da2af25a64a81b8dd89
arm/arm64: KVM: Don't allow creating VCPUs after vgic_initialized

When the vgic initializes its internal state it does so based on the
number of VCPUs available at the time.  If we allow KVM to create more
VCPUs after the VGIC has been initialized, we are likely to error out in
unfortunate ways later, perform buffer overflows etc.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/arm.c