diff options
author | Eric Auger <eric.auger@linaro.org> | 2015-12-02 12:30:13 +0300 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-05-20 16:40:07 +0300 |
commit | f7b6985cc3d0f0f6f35990301d80d858c148e10c (patch) | |
tree | e4cf74e3ba323fce1d659a4117c4bdfdf7e34212 /virt/kvm/arm/vgic/vgic-v2.c | |
parent | b0442ee227e826afc4df16cdfb8bd6eef6a8f425 (diff) | |
download | linux-f7b6985cc3d0f0f6f35990301d80d858c148e10c.tar.xz |
KVM: arm/arm64: vgic-new: Add vgic_v2/v3_enable
Enable the VGIC operation by properly initialising the registers
in the hypervisor GIC 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>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-v2.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-v2.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c index 1fe031b7ba43..8ad42c217770 100644 --- a/virt/kvm/arm/vgic/vgic-v2.c +++ b/virt/kvm/arm/vgic/vgic-v2.c @@ -206,9 +206,18 @@ void vgic_v2_get_vmcr(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcrp) GICH_VMCR_PRIMASK_SHIFT; } -/* not yet implemented */ void vgic_v2_enable(struct kvm_vcpu *vcpu) { + /* + * By forcing VMCR to zero, the GIC will restore the binary + * points to their reset values. Anything else resets to zero + * anyway. + */ + vcpu->arch.vgic_cpu.vgic_v2.vgic_vmcr = 0; + vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr = ~0; + + /* Get the show on the road... */ + vcpu->arch.vgic_cpu.vgic_v2.vgic_hcr = GICH_HCR_EN; } /* check for overlapping regions and for regions crossing the end of memory */ |