@@ -381,6 +381,11 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
}
#endif
+static bool has_at_speculate(const struct arm_cpu_capabilities *entry)
+{
+ return true;
+}
+
#define MIDR_RANGE(model, min, max) \
.matches = is_affected_midr_range, \
.midr_model = model, \
@@ -495,6 +500,11 @@ static const struct arm_cpu_capabilities arm_errata[] = {
.capability = ARM64_WORKAROUND_AT_SPECULATE,
MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
},
+ {
+ .desc = "AT speculate",
+ .capability = ARM64_WORKAROUND_AT_SPECULATE,
+ .matches = has_at_speculate,
+ },
{},
};
@@ -124,6 +124,8 @@ void p2m_restore_state(struct vcpu *n)
if ( is_idle_vcpu(n) )
return;
+ ASSERT(READ_SYSREG64(VTTBR_EL2) == (generate_vttbr(INVALID_VMID, empty_root_mfn)));
+
WRITE_SYSREG(n->arch.sctlr, SCTLR_EL1);
WRITE_SYSREG(n->arch.hcr_el2, HCR_EL2);
Signed-off-by: Julien Grall <julien.grall@arm.com> --- xen/arch/arm/cpuerrata.c | 10 ++++++++++ xen/arch/arm/p2m.c | 2 ++ 2 files changed, 12 insertions(+)