[PATCH 2/4] KVM: arm64: ensure guest access to CTR_EL0 is trapped
Marc Zyngier
maz at kernel.org
Mon Mar 18 04:47:14 PDT 2024
On Mon, 18 Mar 2024 11:16:34 +0000,
Sebastian Ott <sebott at redhat.com> wrote:
>
> Ensure that guest access to the CTR_EL0 register is trapped
> independent of cpu errata.
>
> Signed-off-by: Sebastian Ott <sebott at redhat.com>
> ---
> arch/arm64/include/asm/kvm_emulate.h | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
> index b804fe832184..daaaf7664219 100644
> --- a/arch/arm64/include/asm/kvm_emulate.h
> +++ b/arch/arm64/include/asm/kvm_emulate.h
> @@ -91,12 +91,7 @@ static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu)
> vcpu->arch.hcr_el2 |= HCR_TVM;
> }
>
> - if (cpus_have_final_cap(ARM64_HAS_EVT) &&
> - !cpus_have_final_cap(ARM64_MISMATCHED_CACHE_TYPE))
> - vcpu->arch.hcr_el2 |= HCR_TID4;
> - else
> - vcpu->arch.hcr_el2 |= HCR_TID2;
> -
> + vcpu->arch.hcr_el2 |= HCR_TID2;
NAK. This is a huge performance sync. You should only revert to this
when absolutely necessary.
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list