summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic.h
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2017-01-09 16:27:07 +0100
committerChristoffer Dall <cdall@linaro.org>2017-05-08 14:38:45 +0200
commit57a9a117154c93539e33161dd318e6aeb8c04efa (patch)
tree9eee9632b944fa6456714fa3305fba6f00070c98 /virt/kvm/arm/vgic/vgic.h
parentdceff7025851405412e1a180ddd0cf79c7cbc1d8 (diff)
downloadlinux-57a9a117154c93539e33161dd318e6aeb8c04efa.tar.bz2
KVM: arm64: vgic-its: Device table save/restore
This patch saves the device table entries into guest RAM. Both flat table and 2 stage tables are supported. DeviceId indexing is used. For each device listed in the device table, we also save the translation table using the vgic_its_save/restore_itt routines. Those functions will be implemented in a subsequent patch. On restore, devices are re-allocated and their itt are re-built. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.h')
-rw-r--r--virt/kvm/arm/vgic/vgic.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic.h b/virt/kvm/arm/vgic/vgic.h
index 757de7a2bdc3..f35e993883dc 100644
--- a/virt/kvm/arm/vgic/vgic.h
+++ b/virt/kvm/arm/vgic/vgic.h
@@ -81,6 +81,16 @@
#define KVM_ITS_CTE_VALID_MASK BIT_ULL(63)
#define KVM_ITS_CTE_RDBASE_SHIFT 16
#define KVM_ITS_CTE_ICID_MASK GENMASK_ULL(15, 0)
+#define KVM_ITS_DTE_VALID_SHIFT 63
+#define KVM_ITS_DTE_VALID_MASK BIT_ULL(63)
+#define KVM_ITS_DTE_NEXT_SHIFT 49
+#define KVM_ITS_DTE_NEXT_MASK GENMASK_ULL(62, 49)
+#define KVM_ITS_DTE_ITTADDR_SHIFT 5
+#define KVM_ITS_DTE_ITTADDR_MASK GENMASK_ULL(48, 5)
+#define KVM_ITS_DTE_SIZE_MASK GENMASK_ULL(4, 0)
+#define KVM_ITS_L1E_VALID_MASK BIT_ULL(63)
+/* we only support 64 kB translation table page size */
+#define KVM_ITS_L1E_ADDR_MASK GENMASK_ULL(51, 16)
static inline bool irq_is_pending(struct vgic_irq *irq)
{