summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/sys_regs.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-01-21 11:55:17 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2014-03-03 02:15:21 +0100
commit2072d29c46b73e39b3c6c56c6027af77086f45fd (patch)
tree9c4bbaef5d8fdd56aab396aa46670763271ec3ea /arch/arm64/kvm/sys_regs.h
parentarm64: KVM: force cache clean on page fault when caches are off (diff)
downloadlinux-2072d29c46b73e39b3c6c56c6027af77086f45fd.tar.xz
linux-2072d29c46b73e39b3c6c56c6027af77086f45fd.zip
arm64: KVM: allows discrimination of AArch32 sysreg access
The current handling of AArch32 trapping is slightly less than perfect, as it is not possible (from a handler point of view) to distinguish it from an AArch64 access, nor to tell a 32bit from a 64bit access either. Fix this by introducing two additional flags: - is_aarch32: true if the access was made in AArch32 mode - is_32bit: true if is_aarch32 == true and a MCR/MRC instruction was used to perform the access (as opposed to MCRR/MRRC). This allows a handler to cover all the possible conditions in which a system register gets trapped. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.h')
-rw-r--r--arch/arm64/kvm/sys_regs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index d50d3722998e..d411e251412c 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -30,6 +30,8 @@ struct sys_reg_params {
u8 Op2;
u8 Rt;
bool is_write;
+ bool is_aarch32;
+ bool is_32bit; /* Only valid if is_aarch32 is true */
};
struct sys_reg_desc {