]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: vgic-v2: Take the lock when writing into GICD_CTLR
authorJulien Grall <julien.grall@linaro.org>
Mon, 16 Feb 2015 14:50:52 +0000 (14:50 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 19 Feb 2015 16:56:01 +0000 (16:56 +0000)
This register is shared between every vCPUs and the lock was already
taken for read.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/vgic-v2.c

index 84790279c9dcc7fbafb5b38a8005df5fff326f65..42c64119e364586c362058a4bea95d7a9d6ccdfe 100644 (file)
@@ -284,7 +284,10 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, mmio_info_t *info)
     case GICD_CTLR:
         if ( dabt.size != DABT_WORD ) goto bad_width;
         /* Ignore all but the enable bit */
+        vgic_lock(v);
         v->domain->arch.vgic.ctlr = (*r) & GICD_CTL_ENABLE;
+        vgic_unlock(v);
+
         return 1;
 
     /* R/O -- write ignored */