FROMLIST: KVM: arm64: Provide sanitized mmfr* registers at EL2

We will need to read sanitized values of mmfr{0,1}_el1 at EL2 soon, so
add them to the list of copied variables.

Signed-off-by: Quentin Perret <qperret@google.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210315143536.214621-33-qperret@google.com
Bug: 178098380
Change-Id: I42837ca1490b24291edd251385bd883c3ee1d601
This commit is contained in:
Quentin Perret
2021-03-15 14:35:32 +00:00
parent 0af83133e3
commit 5a128f0626
2 changed files with 4 additions and 0 deletions

View File

@@ -15,3 +15,5 @@
#endif #endif
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0); KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0);
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr0_el1);
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr1_el1);

View File

@@ -2784,6 +2784,8 @@ struct __ftr_reg_copy_entry {
struct arm64_ftr_reg *dst; struct arm64_ftr_reg *dst;
} hyp_ftr_regs[] __initdata = { } hyp_ftr_regs[] __initdata = {
CPU_FTR_REG_HYP_COPY(SYS_CTR_EL0, arm64_ftr_reg_ctrel0), CPU_FTR_REG_HYP_COPY(SYS_CTR_EL0, arm64_ftr_reg_ctrel0),
CPU_FTR_REG_HYP_COPY(SYS_ID_AA64MMFR0_EL1, arm64_ftr_reg_id_aa64mmfr0_el1),
CPU_FTR_REG_HYP_COPY(SYS_ID_AA64MMFR1_EL1, arm64_ftr_reg_id_aa64mmfr1_el1),
}; };
void __init setup_kvm_el2_caps(void) void __init setup_kvm_el2_caps(void)