Message ID | 20240318111636.10613-3-sebott@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: arm64: emulation for CTR_EL0 | expand |
On Mon, 18 Mar 2024 11:16:34 +0000, Sebastian Ott <sebott@redhat.com> wrote: > > Ensure that guest access to the CTR_EL0 register is trapped > independent of cpu errata. > > Signed-off-by: Sebastian Ott <sebott@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.
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; if (vcpu_el1_is_32bit(vcpu)) vcpu->arch.hcr_el2 &= ~HCR_RW;
Ensure that guest access to the CTR_EL0 register is trapped independent of cpu errata. Signed-off-by: Sebastian Ott <sebott@redhat.com> --- arch/arm64/include/asm/kvm_emulate.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)