]> www.infradead.org Git - users/dwmw2/linux.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>
Wed, 9 Mar 2022 16:52:20 +0000 (11:52 -0500)
commitce41d078aaa9cf15cbbb4a42878cc6160d76525e
tree740da26f350dd2b9379036a6459fda9a3de1cc52
parent92b470a7a3cc7060e1051360c54058d8c32e5c43
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