Bug 1741508 - kvm_init_vcpu failed if use EPYC cpu model and specify option dies in QEMU cli
Summary: kvm_init_vcpu failed if use EPYC cpu model and specify option dies in QEMU cli
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-15 10:33 UTC by Yumei Huang
Modified: 2020-12-24 20:02 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e
Doc Type: If docs needed, set a value
Doc Text:
Cause: The Consequence: Workaround (if any): Result:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:47:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yumei Huang 2019-08-15 10:33:33 UTC
Description of problem:
Boot guest with EPYC cpu model, and set dies in QEMU cli, QEMU quit and print error message.


Version-Release number of selected component (if applicable):
qemu-kvm-4.1.0-1.module+el8.1.0+3966+4a23dca1
kernel-4.18.0-131.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. #  /usr/libexec/qemu-kvm -smp 1,dies=2,maxcpus=2 -cpu EPYC

2.
3.

Actual results:
#  /usr/libexec/qemu-kvm -smp 1,dies=2,maxcpus=2 -cpu EPYC
qemu-kvm: kvm_init_vcpu failed: Argument list too long


Expected results:
No error.

Additional info:

Comment 3 Eduardo Habkost 2019-08-22 22:50:48 UTC
libvirt doesn't support the "dies" option yet (see bug 1702444).  Lowering severity and priority and moving to 8.2.0.

Comment 5 Ademar Reis 2020-02-05 23:03:04 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 7 Eduardo Habkost 2020-03-03 17:39:18 UTC
Fixed by the 4.2.0 rebase, upstream commit:

commit af95cafb877f563ed39ce8a5b2abe227dd5312fa
Author: Eduardo Habkost <ehabkost>
Date:   Thu Aug 22 19:52:10 2019 -0300

    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>
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1741508
    Signed-off-by: Eduardo Habkost <ehabkost>
    Message-Id: <20190822225210.32541-1-ehabkost>
    Acked-by: Paolo Bonzini <pbonzini>
    Signed-off-by: Eduardo Habkost <ehabkost>

Comment 8 Eduardo Habkost 2020-03-03 17:45:14 UTC
Updating Fixed In Version to exact build tag.

Danilo, should this be manually added to 8.2 errata?

Comment 9 Yumei Huang 2020-03-05 08:54:23 UTC
Test with qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae, the issue is gone.

Comment 13 Jeff Nelson 2020-03-22 18:49:31 UTC
BZ was added to errata, so clearing needinfo request from comment 8.

Comment 15 errata-xmlrpc 2020-05-05 09:47:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017


Note You need to log in before you can comment on or make changes to this bug.