]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: KVM: allows discrimination of AArch32 sysreg access
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 21 Jan 2014 10:55:17 +0000 (10:55 +0000)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 09:15:02 +0000 (11:15 +0200)
commitfc8ec36d4ae7b701fa473cb7686dc0afee71c050
treec41f8cf270215b5607e8ee093d6d770b3a006a8d
parent8462018ebdfe8d208cb05a10a16ae74337d01ca9
arm64: KVM: allows discrimination of AArch32 sysreg access

commit 2072d29c46b73e39b3c6c56c6027af77086f45fd upstream.

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>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.h