]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: vgic-v3: Correctly implement read into GICR_NSACR
authorJulien Grall <julien.grall@linaro.org>
Mon, 16 Feb 2015 14:50:45 +0000 (14:50 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 19 Feb 2015 16:55:28 +0000 (16:55 +0000)
The 32-bit register GICR_NSACR is RAZ/WI on non-secure state. Therefore
we should not inject a data abort to the guest.

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

index 11459723aff44937dc00596dfa3d38223e698b70..2c1471774baa1fdf3dc7e892ec94e3936c8894f8 100644 (file)
@@ -530,8 +530,9 @@ static int vgic_v3_rdistr_sgi_mmio_read(struct vcpu *v, mmio_info_t *info,
         vgic_unlock_rank(v, rank, flags);
         return 1;
     case GICR_NSACR:
-        if ( dabt.size != DABT_WORD ) goto bad_width;
-        return 1;
+        /* We do not implement security extensions for guests, read zero */
+        goto read_as_zero_32;
+
     default:
         printk(XENLOG_G_ERR
                "%pv: vGICR: SGI: read r%d offset %#08x\n not found",