]> xenbits.xensource.com Git - xen.git/commitdiff
ARM: new VGIC: Add vgic_v2_enable
authorAndre Przywara <andre.przywara@linaro.org>
Wed, 7 Feb 2018 14:53:03 +0000 (14:53 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 29 Mar 2018 17:37:03 +0000 (10:37 -0700)
Enable the VGIC operation by properly initialising the registers
in the hypervisor GIC interface.

This is based on Linux commit f7b6985cc3d0, written by Eric Auger.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic/vgic-v2.c
xen/arch/arm/vgic/vgic.h

index 4ad018e90497ff132cbe74bf19679805bd230447..e4141eaf26391667425681dc5f035fee824f1a03 100644 (file)
@@ -249,6 +249,12 @@ void vgic_v2_populate_lr(struct vcpu *vcpu, struct vgic_irq *irq, int lr)
     gic_hw_ops->write_lr(lr, &lr_val);
 }
 
+void vgic_v2_enable(struct vcpu *vcpu)
+{
+    /* Get the show on the road... */
+    gic_hw_ops->update_hcr_status(GICH_HCR_EN, true);
+}
+
 /*
  * Local variables:
  * mode: C
index 4ed1ef683ac084f736f962c869715001807d480d..76b50fe81278fa9c0874a086f10b62ba2966cec6 100644 (file)
@@ -66,6 +66,7 @@ void vgic_sync_hardware_irq(struct domain *d,
 void vgic_v2_fold_lr_state(struct vcpu *vcpu);
 void vgic_v2_populate_lr(struct vcpu *vcpu, struct vgic_irq *irq, int lr);
 void vgic_v2_set_underflow(struct vcpu *vcpu);
+void vgic_v2_enable(struct vcpu *vcpu);
 int vgic_register_dist_iodev(struct domain *d, gfn_t dist_base_fn,
                              enum vgic_type);