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 2095260 - Revert the patch to ignore KVM_CAP_MAX_VCPUS in libvirt
Summary: Revert the patch to ignore KVM_CAP_MAX_VCPUS in libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 9.1
Assignee: Jiri Denemark
QA Contact: Luyao Huang
URL:
Whiteboard:
Depends On: 2094270
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-09 11:35 UTC by Thomas Huth
Modified: 2022-11-15 10:40 UTC (History)
13 users (show)

Fixed In Version: libvirt-8.4.0-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2094270
Environment:
Last Closed: 2022-11-15 10:04:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-13142 0 None None None 2022-06-27 10:51:50 UTC
Red Hat Issue Tracker RHELPLAN-124774 0 None None None 2022-06-09 11:38:03 UTC
Red Hat Product Errata RHSA-2022:8003 0 None None None 2022-11-15 10:05:06 UTC

Description Thomas Huth 2022-06-09 11:35:43 UTC
+++ This bug was initially created as a clone of Bug #2094270 +++

Description of problem:
In downstream qemu-kvm, we have a patch ("globally limit the maximum number of CPUs") that sets the hard limit of possible vCPUs to the value that the KVM code of the kernel recommends as soft limit. This soft limit was set to a value that we've tested in our downstream RHEL releases, so it make sense to set the hard limit to the same value. However, in upstream, the code has been changed recently to not use an arbitrary soft limit here anymore, but to cap the value on the amount of available physical CPUs of the host. So if that patch gets backported to the downstream kernel (see BZ 2074832), the hack in qemu-kvm won't work as expected anymore, making it impossible to set a "-smp x" value for the guests where x is greater than the amount of available physical CPUs.

Version-Release number of selected component (if applicable):
qemu-kvm-7.0.0-4.el9

How reproducible:
100%

Steps to Reproduce:
1. Install an upstream kernel (or the one from BZ 2074832)
2. Run a guest with more vCPUs than available physical host CPUs, e.g.:
   /usr/libexec/qemu-kvm -smp 700

Actual results:
qemu-kvm will refuse to start.

Expected results:
qemu-kvm should still run the guest.

Additional info:
I think we should simply revert/drop the "globally limit the maximum number of CPUs" patch in downstream qemu-kvm now.

[...]
--- Additional comment from Chao Yang on 2022-06-09 04:28:43 CEST ---

Do we need a counterpart libvirt bz in case we try migrating a VM with vCPU number exceeds the pCPU number of the destination host?

[...]
--- Additional comment from Jiri Denemark on 2022-06-09 13:16:54 CEST ---

I think we actually need libvirt bz to revert
https://gitlab.com/redhat/rhel/src/libvirt/-/commit/fcec98bb80633bec6f4bc3de0ab75627c874d315
RHEL-only patch. We are not involved in limit checking, but we report the
maximum number of virtual CPUs.

Comment 1 Jiri Denemark 2022-06-09 13:35:28 UTC
Backported: https://gitlab.com/redhat/rhel/src/libvirt/-/merge_requests/28

Comment 4 Luyao Huang 2022-06-16 07:16:33 UTC
Reproduce this bug with kernel-5.14.0-110.el9.x86_64, libvirt-8.4.0-1.el9.x86_64, qemu-kvm-7.0.0-6.el9.x86_64:

# virsh maxvcpus kvm
64

# virsh domcapabilities |grep "vcpu max"
  <vcpu max='64'/>

And verify this bug with kernel-5.14.0-110.el9.x86_64, libvirt-8.4.0-2.el9.x86_64, qemu-kvm-7.0.0-6.el9.x86_64:

# virsh domcapabilities |grep "vcpu max"
  <vcpu max='240'/>

# virsh maxvcpus kvm
240

Comment 10 errata-xmlrpc 2022-11-15 10:04:39 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 (Low: libvirt security, bug fix, and enhancement update), 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/RHSA-2022:8003


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