Commit def1aaf9 authored by Quentin Perret's avatar Quentin Perret Committed by Marc Zyngier

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.
Acked-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-35-qperret@google.com
parent 8942a237
...@@ -20,5 +20,7 @@ ...@@ -20,5 +20,7 @@
#endif #endif
DECLARE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0); DECLARE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0);
DECLARE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr0_el1);
DECLARE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr1_el1);
#endif #endif
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* Copies of the host's CPU features registers holding sanitized values. * Copies of the host's CPU features registers holding sanitized values.
*/ */
DEFINE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0); DEFINE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0);
DEFINE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr0_el1);
DEFINE_KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr1_el1);
/* /*
* nVHE copy of data structures tracking available CPU cores. * nVHE copy of data structures tracking available CPU cores.
......
...@@ -2784,6 +2784,8 @@ struct __ftr_reg_copy_entry { ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment