mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
KVM: arm64: selftests: Alias EL1 registers to EL2 counterparts
FEAT_VHE has the somewhat nice property of implicitly redirecting EL1 register aliases to their corresponding EL2 representations when E2H=1. Unfortunately, there's no such abstraction for userspace and EL2 registers are always accessed by their canonical encoding. Introduce a helper that applies EL2 redirections to sysregs and use aggressive inlining to catch misuse at compile time. Go a little past the architectural definition for ease of use for test authors (e.g. the stack pointer). Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
committed by
Marc Zyngier
parent
8911c7dbc6
commit
1c9604ba23
@@ -63,6 +63,9 @@ struct kvm_vcpu {
|
||||
struct kvm_run *run;
|
||||
#ifdef __x86_64__
|
||||
struct kvm_cpuid2 *cpuid;
|
||||
#endif
|
||||
#ifdef __aarch64__
|
||||
struct kvm_vcpu_init init;
|
||||
#endif
|
||||
struct kvm_binary_stats stats;
|
||||
struct kvm_dirty_gfn *dirty_gfns;
|
||||
|
||||
Reference in New Issue
Block a user