aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqchip
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2017-03-23 15:14:00 +0100
committerChristoffer Dall <cdall@linaro.org>2017-05-08 14:35:16 +0200
commitab01c6bdacc43c41c6b326889f4358f5afc38bf9 (patch)
treee56e3df3084d1cdf41a475259c0456719c7af954 /include/linux/irqchip
parentKVM: arm64: vgic-its: Introduce migration ABI infrastructure (diff)
downloadlinux-dev-ab01c6bdacc43c41c6b326889f4358f5afc38bf9.tar.xz
linux-dev-ab01c6bdacc43c41c6b326889f4358f5afc38bf9.zip
KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr
The GITS_IIDR revision field is used to encode the migration ABI revision. So we need to restore it to check the table layout is readable by the destination. By writing the IIDR, userspace thus forces the ABI revision to be used and this must be less than or equal to the max revision KVM supports. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'include/linux/irqchip')
-rw-r--r--include/linux/irqchip/arm-gic-v3.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 81ebe437ccc3..2eaea308f003 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -242,6 +242,11 @@
#define GITS_TYPER_PTA (1UL << 19)
#define GITS_TYPER_HWCOLLCNT_SHIFT 24
+#define GITS_IIDR_REV_SHIFT 12
+#define GITS_IIDR_REV_MASK (0xf << GITS_IIDR_REV_SHIFT)
+#define GITS_IIDR_REV(r) (((r) >> GITS_IIDR_REV_SHIFT) & 0xf)
+#define GITS_IIDR_PRODUCTID_SHIFT 24
+
#define GITS_CBASER_VALID (1ULL << 63)
#define GITS_CBASER_SHAREABILITY_SHIFT (10)
#define GITS_CBASER_INNER_CACHEABILITY_SHIFT (59)