]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
arch: arm: vgic-v3: fix GICD_ISACTIVER range
authorPeng Fan <peng.fan@nxp.com>
Thu, 5 Dec 2019 00:31:25 +0000 (16:31 -0800)
committerStefano Stabellini <sstabellini@xilinx.com>
Wed, 18 Dec 2019 19:16:19 +0000 (11:16 -0800)
The end should be GICD_ISACTIVERN not GICD_ISACTIVER,
and also print a warning for the unhandled read.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
xen/arch/arm/vgic-v3.c

index 422b94f902e9602d8ea4088739a23e3fed09e8b1..a15b9f64418a138d67071083b15c1324a67d2782 100644 (file)
@@ -706,7 +706,10 @@ static int __vgic_v3_distr_common_mmio_read(const char *name, struct vcpu *v,
         goto read_as_zero;
 
     /* Read the active status of an IRQ via GICD/GICR is not supported */
-    case VRANGE32(GICD_ISACTIVER, GICD_ISACTIVER):
+    case VRANGE32(GICD_ISACTIVER, GICD_ISACTIVERN):
+        printk(XENLOG_G_ERR "%pv: vGICD: unhandled read from ISACTIVER%d\n",
+               v, (reg - GICD_ISACTIVER) / 4);
+        goto read_as_zero;
     case VRANGE32(GICD_ICACTIVER, GICD_ICACTIVERN):
         goto read_as_zero;