summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/sys_regs.h
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-10-29 17:09:12 +0000
committerMarc Zyngier <maz@kernel.org>2020-11-10 11:22:51 +0000
commit6ed6750f2b6d4a51f27615f3323d1850449299e3 (patch)
tree7f0b17fa3bac1f3ad07339bac3f627d5493876f7 /arch/arm64/kvm/sys_regs.h
parent4ff3fc316d78daa2ed6de2f13616fb33a2926d8e (diff)
KVM: arm64: Add AArch32 mapping annotation
In order to deal with the few AArch32 system registers that map to only a particular half of their AArch64 counterpart (such as DFAR and IFAR being colocated in FAR_EL1), let's add an optional annotation to the sysreg descriptor structure, indicating whether a register maps to the upper or lower 32bits of a register. Nothing is using these annotation yet. Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.h')
-rw-r--r--arch/arm64/kvm/sys_regs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index 5a6fc30f5989..259864c3c76b 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -27,6 +27,12 @@ struct sys_reg_desc {
/* Sysreg string for debug */
const char *name;
+ enum {
+ AA32_ZEROHIGH,
+ AA32_LO,
+ AA32_HI,
+ } aarch32_map;
+
/* MRS/MSR instruction which accesses it. */
u8 Op0;
u8 Op1;
@@ -153,6 +159,7 @@ const struct sys_reg_desc *find_reg_by_id(u64 id,
const struct sys_reg_desc table[],
unsigned int num);
+#define AA32(_x) .aarch32_map = AA32_##_x
#define Op0(_x) .Op0 = _x
#define Op1(_x) .Op1 = _x
#define CRn(_x) .CRn = _x