Re: [PATCH] KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits

2020-12-08 Thread Denis V. Lunev
On 12/3/20 6:15 PM, Paolo Bonzini wrote: > Until commit e7c587da1252 ("x86/speculation: Use synthetic bits for > IBRS/IBPB/STIBP", > 2018-05-17), KVM was testing both Intel and AMD CPUID bits before allowing the > guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD. Testing only Intel >

Re: [PATCH] KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits

2020-12-06 Thread Paolo Bonzini
On 04/12/20 18:12, Sean Christopherson wrote: Assuming that's the case, adding helpers in cpuid.h to detect guest support for SPEC_CTRL (and maybe for PRED_CMD?) would be helpful. It'd reduce duplicate code and document that KVM allows cross-vendor emulation. The condition for SPEC_CTRL

Re: [PATCH] KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits

2020-12-04 Thread Sean Christopherson
On Thu, Dec 03, 2020, Paolo Bonzini wrote: > Until commit e7c587da1252 ("x86/speculation: Use synthetic bits for > IBRS/IBPB/STIBP", > 2018-05-17), KVM was testing both Intel and AMD CPUID bits before allowing the > guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD. Testing only Intel >

[PATCH] KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits

2020-12-03 Thread Paolo Bonzini
Until commit e7c587da1252 ("x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP", 2018-05-17), KVM was testing both Intel and AMD CPUID bits before allowing the guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD. Testing only Intel bits on VMX processors, or only AMD bits on SVM