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)
commit50896de4be7e08fc47f857f6e0c0e9ab2654b941
tree7752015b517f3b0d9115894f9e872e058e2555ba
parent4c6903a0f9d76be8a907d8238a5e86c829c8954d
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