aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2019-08-22 19:52:10 -0300
committerEduardo Habkost <ehabkost@redhat.com>2019-10-15 18:34:44 -0300
commitaf95cafb877f563ed39ce8a5b2abe227dd5312fa (patch)
tree23d4d1acf889757203fb8a8d7defe555f08ea58c /scripts/qapi/source.py
parenti386: Fix legacy guest with xsave panic on host kvm without update cpuid. (diff)
downloadqemu-af95cafb877f563ed39ce8a5b2abe227dd5312fa.tar.xz
qemu-af95cafb877f563ed39ce8a5b2abe227dd5312fa.zip
i386: Omit all-zeroes entries from KVM CPUID table
KVM has a 80-entry limit at KVM_SET_CPUID2. With the introduction of CPUID[0x1F], it is now possible to hit this limit with unusual CPU configurations, e.g.: $ ./x86_64-softmmu/qemu-system-x86_64 \ -smp 1,dies=2,maxcpus=2 \ -cpu EPYC,check=off,enforce=off \ -machine accel=kvm qemu-system-x86_64: kvm_init_vcpu failed: Argument list too long This happens because QEMU adds a lot of all-zeroes CPUID entries for unused CPUID leaves. In the example above, we end up creating 48 all-zeroes CPUID entries. KVM already returns all-zeroes when emulating the CPUID instruction if an entry is missing, so the all-zeroes entries are redundant. Skip those entries. This reduces the CPUID table size by half while keeping CPUID output unchanged. Reported-by: Yumei Huang <yuhuang@redhat.com> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1741508 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190822225210.32541-1-ehabkost@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions