KVM: arm/arm64: Check vcpu redist base before registering an iodev
commitc011f4ea106b94e5499358b62d8c2d74f7e184f9
authorEric Auger <eric.auger@redhat.com>
Tue, 22 May 2018 07:55:14 +0000 (22 09:55 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 25 May 2018 11:29:27 +0000 (25 12:29 +0100)
treea4b656fb03fe9d7059a1c51a11118d14ea112d2c
parent5ec17fbac6713be82b90f54d5a31251803fd8de5
KVM: arm/arm64: Check vcpu redist base before registering an iodev

As we are going to register several redist regions,
vgic_register_all_redist_iodevs() may be called several times. We need
to register a redist_iodev for a given vcpu only once. So let's
check if the base address has already been set. Initialize this latter
in kvm_vgic_vcpu_init().

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-init.c
virt/kvm/arm/vgic/vgic-mmio-v3.c