diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-29 20:43:04 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-29 21:24:58 +0200 |
commit | f751d8eac17692905cdd6935f72d523d8adf3b65 (patch) | |
tree | b75ec91ec9ede7ff337470e7e3a021837dccee7a /tools/perf/util/rlimit.h | |
parent | Revert "x86/mm: Introduce lookup_address_in_mm()" (diff) | |
download | linux-f751d8eac17692905cdd6935f72d523d8adf3b65.tar.xz linux-f751d8eac17692905cdd6935f72d523d8adf3b65.zip |
KVM: x86: work around QEMU issue with synthetic CPUID leaves
Synthesizing AMD leaves up to 0x80000021 caused problems with QEMU,
which assumes the *host* CPUID[0x80000000].EAX is higher or equal
to what KVM_GET_SUPPORTED_CPUID reports.
This causes QEMU to issue bogus host CPUIDs when preparing the input
to KVM_SET_CPUID2. It can even get into an infinite loop, which is
only terminated by an abort():
cpuid_data is full, no space for cpuid(eax:0x8000001d,ecx:0x3e)
To work around this, only synthesize those leaves if 0x8000001d exists
on the host. The synthetic 0x80000021 leaf is mostly useful on Zen2,
which satisfies the condition.
Fixes: f144c49e8c39 ("KVM: x86: synthesize CPUID leaf 0x80000021h if useful")
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/util/rlimit.h')
0 files changed, 0 insertions, 0 deletions