• Paolo Bonzini's avatar
    KVM: x86: synthesize CPUID leaf 0x80000021h if useful · f144c49e
    Paolo Bonzini authored
    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: default avatarPaolo Bonzini <pbonzini@redhat.com>
    f144c49e
cpuid.c 39.6 KB