summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic-v3.c
diff options
context:
space:
mode:
authorAndre Przywara2016-08-08 17:45:43 +0200
committerChristoffer Dall2016-08-15 23:00:21 +0200
commitc7735769d5dd79afb07254532fabd9ccbd85b1fa (patch)
tree8cd49bfeaf6429512e5a52cfe1fa1f65c6cc2acc /virt/kvm/arm/vgic/vgic-v3.c
parentKVM: arm64: vgic-its: Make updates to propbaser/pendbaser atomic (diff)
downloadkernel-qcow2-linux-c7735769d5dd79afb07254532fabd9ccbd85b1fa.tar.gz
kernel-qcow2-linux-c7735769d5dd79afb07254532fabd9ccbd85b1fa.tar.xz
kernel-qcow2-linux-c7735769d5dd79afb07254532fabd9ccbd85b1fa.zip
KVM: arm64: ITS: move ITS registration into first VCPU run
Currently we register an ITS device upon userland issuing the CTLR_INIT ioctl to mark initialization of the ITS as done. This deviates from the initialization sequence of the existing GIC devices and does not play well with the way QEMU handles things. To be more in line with what we are used to, register the ITS(es) just before the first VCPU is about to run, so in the map_resources() call. This involves iterating through the list of KVM devices and map each ITS that we find. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-v3.c')
-rw-r--r--virt/kvm/arm/vgic/vgic-v3.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c
index 0506543df38a..9f0dae397d9c 100644
--- a/virt/kvm/arm/vgic/vgic-v3.c
+++ b/virt/kvm/arm/vgic/vgic-v3.c
@@ -289,6 +289,14 @@ int vgic_v3_map_resources(struct kvm *kvm)
goto out;
}
+ if (vgic_has_its(kvm)) {
+ ret = vgic_register_its_iodevs(kvm);
+ if (ret) {
+ kvm_err("Unable to register VGIC ITS MMIO regions\n");
+ goto out;
+ }
+ }
+
dist->ready = true;
out: