]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: synthesize CPUID leaf 0x80000021h if useful
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Oct 2021 21:19:27 +0000 (17:19 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Mar 2022 13:28:40 +0000 (09:28 -0400)
commitf7cb9809520ff152e307b7d21fa2bee6fb32373c
tree33d043f4b69c2f90ef04fbb0ad4656be75cb6848
parent9899d19faf96557b4e551e54c4f5233bcf80ac0b
KVM: x86: synthesize CPUID leaf 0x80000021h if useful

Guests X86_BUG_NULL_SEG if and only if the host has them.  Use the info
from static_cpu_has_bug to form the 0x80000021 CPUID leaf that was
defined for Zen3.  Userspace can then set the bit even on older CPUs
that do not have the bug, such as Zen2.

Do the same for X86_FEATURE_LFENCE_RDTSC as well, since various processors
have had very different ways of detecting it and not all of them are
available to userspace.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c