]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: always expose VIRT_SSBD to guests
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Aug 2019 07:17:31 +0000 (09:17 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Aug 2019 08:09:07 +0000 (10:09 +0200)
commit51706c4c185954b9a149c57e2012e40d6ef4d134
tree7752015b517f3b0d9115894f9e872e058e2555ba
parent35aeb4869d6c6f4af7a784b6cf7f8a31fe128edc
KVM: x86: always expose VIRT_SSBD to guests

Even though it is preferrable to use SPEC_CTRL (represented by
X86_FEATURE_AMD_SSBD) instead of VIRT_SPEC, VIRT_SPEC is always
supported anyway because otherwise it would be impossible to
migrate from old to new CPUs.  Make this apparent in the
result of KVM_GET_SUPPORTED_CPUID as well.

However, we need to hide the bit on Intel processors, so move
the setting to svm_set_supported_cpuid.

Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c