RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1159264 - qemu-kvm process quit when smp >8 and maxcpus=240 (qemu-kvm: max_cpus is too large. APIC ID of last CPU is 380)
Summary: qemu-kvm process quit when smp >8 and maxcpus=240 (qemu-kvm: max_cpus is too ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Radim Krčmář
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-31 10:35 UTC by FuXiangChun
Modified: 2014-11-01 17:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-31 16:48:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description FuXiangChun 2014-10-31 10:35:37 UTC
Description of problem:
QE tested scenarios:

smp 8 and maxcpus=240 -> works
smp 10 and maxcpus=240 ->fail
smp 12 and maxcpus=240 ->fail
...........


Version-Release number of selected component (if applicable):
3.10.0-195.el7.x86_64(host and guest)
qemu-kvm-rhev-2.1.2-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1./usr/libexec/qemu-kvm -m 10G -smp 12,cores=6,threads=1,sockets=2,maxcpus=240
2.
3.

Actual results:
qemu-kvm: max_cpus is too large. APIC ID of last CPU is 317

Expected results:


Additional info:

qemu-1.5.x didn't hit this issue.

Comment 2 Radim Krčmář 2014-10-31 16:48:07 UTC
APIC IDs do not have to be continuous.

They contain the topology in them -- a part of the ID is reserved only for cores, so if their number is not a power of two, bits get wasted and we can effectively express less CPUs.

1.5.x does not check for it [see patch below], so it should fail when max_cpus is reached ... I prefer to keep the early warning in RHEV.


---
commit f03bd716a2935532379cff1c71c6f0f399921b70
Author: Eduardo Habkost <ehabkost>
Date:   Fri Mar 14 16:33:54 2014 -0300

    pc: Refuse max_cpus if it results in too large APIC ID
    
    This changes the PC initialization code to reject max_cpus if it results
    in an APIC ID that's too large, instead of aborting or erroring out when
    it is already too late.

Comment 5 Eduardo Habkost 2014-10-31 17:42:22 UTC
Our VCPU count limit is also an APIC ID limit, unfortunately, for multiple reasons:

1) Some KVM data structures are APIC ID-based, so increasing the APIC ID limit would require careful evaluation just like increasing the global VCPU count limit.

2) APIC IDs larger than 254 require x2apic support, and would use different code paths inside host-side emulation code and on the guest code. I don't even know which guest OSes would support it. It requires careful testing and evaluation, and needs to be treated as completely new feature.


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