Re: [PATCH] KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF

2019-09-27 Thread Paolo Bonzini
On 27/09/19 17:55, Borislav Petkov wrote: > I'd move that logic with the if (boot_cpu_has(X86_BUG_L1TF)) check inside > vmx_setup_l1d_flush() so that I have this: > > if (!boot_cpu_has_bug(X86_BUG_L1TF)) { > l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED; >

Re: [PATCH] KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF

2019-09-27 Thread Paolo Bonzini
On 26/08/19 21:30, Waiman Long wrote: > The l1tf_vmx_mitigation is only set to VMENTER_L1D_FLUSH_NOT_REQUIRED > when the ARCH_CAPABILITIES MSR indicates that L1D flush is not required. > However, if the CPU is not affected by L1TF, l1tf_vmx_mitigation will > still be set to VMENTER_L1D_FLUSH_AUTO.

Re: [PATCH] KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF

2019-09-27 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 01:29:28PM -0400, Waiman Long wrote: > On 8/26/19 3:30 PM, Waiman Long wrote: > > The l1tf_vmx_mitigation is only set to VMENTER_L1D_FLUSH_NOT_REQUIRED > > when the ARCH_CAPABILITIES MSR indicates that L1D flush is not required. > > However, if the CPU is not affected by

Re: [PATCH] KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF

2019-09-26 Thread Waiman Long
On 8/26/19 3:30 PM, Waiman Long wrote: > The l1tf_vmx_mitigation is only set to VMENTER_L1D_FLUSH_NOT_REQUIRED > when the ARCH_CAPABILITIES MSR indicates that L1D flush is not required. > However, if the CPU is not affected by L1TF, l1tf_vmx_mitigation will > still be set to

[PATCH] KVM: VMX: Set VMENTER_L1D_FLUSH_NOT_REQUIRED if !X86_BUG_L1TF

2019-08-26 Thread Waiman Long
The l1tf_vmx_mitigation is only set to VMENTER_L1D_FLUSH_NOT_REQUIRED when the ARCH_CAPABILITIES MSR indicates that L1D flush is not required. However, if the CPU is not affected by L1TF, l1tf_vmx_mitigation will still be set to VMENTER_L1D_FLUSH_AUTO. This is certainly not the best option for a