OSDN Git Service

KVM: arm64: Enable access to sanitized CPU features at EL2
authorQuentin Perret <qperret@google.com>
Fri, 19 Mar 2021 10:01:21 +0000 (10:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Mar 2021 12:01:20 +0000 (12:01 +0000)
commit7a440cc78392c3caf805ef0afc7ead031e4d0830
tree519090f45eec37e78f243ab5f44b2d46469b0a3a
parent8e17c66249e9ea08b44879c7af0315e70a83316c
KVM: arm64: Enable access to sanitized CPU features at EL2

Introduce the infrastructure in KVM enabling to copy CPU feature
registers into EL2-owned data-structures, to allow reading sanitised
values directly at EL2 in nVHE.

Given that only a subset of these features are being read by the
hypervisor, the ones that need to be copied are to be listed under
<asm/kvm_cpufeature.h> together with the name of the nVHE variable that
will hold the copy. This introduces only the infrastructure enabling
this copy. The first users will follow shortly.

Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-14-qperret@google.com
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/kvm_cpufeature.h [new file with mode: 0644]
arch/arm64/include/asm/kvm_host.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kvm/sys_regs.c