diff options
author | Andre Przywara <andre.przywara@arm.com> | 2014-06-03 10:26:03 +0200 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2015-01-20 18:25:32 +0100 |
commit | b5d84ff600a244b655bd4f657f5350f29b0ce611 (patch) | |
tree | dfbb1d876f6f4254f99c741170b886cc6a0d928a /virt/kvm/arm/vgic-v2.c | |
parent | 6d52f35af10cf24d59b43f3fd8c938ad23cab543 (diff) | |
download | op-kernel-dev-b5d84ff600a244b655bd4f657f5350f29b0ce611.zip op-kernel-dev-b5d84ff600a244b655bd4f657f5350f29b0ce611.tar.gz |
arm/arm64: KVM: enable kernel side of GICv3 emulation
With all the necessary GICv3 emulation code in place, we can now
connect the code to the GICv3 backend in the kernel.
The LR register handling is different depending on the emulated GIC
model, so provide different implementations for each.
Also allow non-v2-compatible GICv3 implementations (which don't
provide MMIO regions for the virtual CPU interface in the DT), but
restrict those hosts to support GICv3 guests only.
If the device tree provides a GICv2 compatible GICV resource entry,
but that one is faulty, just disable the GICv2 emulation and let the
user use at least the GICv3 emulation for guests.
To provide proper support for the legacy KVM_CREATE_IRQCHIP ioctl,
note virtual GICv2 compatibility in struct vgic_params and use it
on creating a VGICv2.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic-v2.c')
-rw-r--r-- | virt/kvm/arm/vgic-v2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c index e8b82b28..a0a7b5d 100644 --- a/virt/kvm/arm/vgic-v2.c +++ b/virt/kvm/arm/vgic-v2.c @@ -229,6 +229,7 @@ int vgic_v2_probe(struct device_node *vgic_node, goto out_unmap; } + vgic->can_emulate_gicv2 = true; kvm_register_device_ops(&kvm_arm_vgic_v2_ops, KVM_DEV_TYPE_ARM_VGIC_V2); vgic->vcpu_base = vcpu_res.start; |