]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic-new: vgic_init: implement map_resources
authorEric Auger <eric.auger@linaro.org>
Mon, 21 Dec 2015 14:04:42 +0000 (15:04 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Fri, 20 May 2016 13:40:07 +0000 (15:40 +0200)
commit27fbdaaeae83b57d3c95c6f4a0678d572564be58
treea04cc19ffafb2067309337f6dba14032e34da403
parent9eca0faf522005c4614bb1e6704ebe8aaca6f171
KVM: arm/arm64: vgic-new: vgic_init: implement map_resources

map_resources is the last initialization step. It is executed on
first VCPU run. At that stage the code checks that userspace has provided
the base addresses for the relevant VGIC regions, which depend on the
type of VGIC that is exposed to the guest.  Also we check if the two
regions overlap.
If the checks succeeded, we register the respective register frames with
the kvm_io_bus framework.

If we emulate a GICv2, the function also forces vgic_init execution if
it has not been executed yet. Also we map the virtual GIC CPU interface
onto the guest's CPU interface.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
include/kvm/vgic/vgic.h
virt/kvm/arm/vgic/vgic-init.c
virt/kvm/arm/vgic/vgic-v2.c
virt/kvm/arm/vgic/vgic-v3.c
virt/kvm/arm/vgic/vgic.h