Blame SOURCES/kvm-Revert-globally-limit-the-maximum-number-of-CPUs.patch

29b115
From 5ab8613582fd56b847fe75750acb5b7255900b35 Mon Sep 17 00:00:00 2001
29b115
From: Vitaly Kuznetsov <vkuznets@redhat.com>
29b115
Date: Thu, 9 Jun 2022 11:55:15 +0200
29b115
Subject: [PATCH 15/16] Revert "globally limit the maximum number of CPUs"
29b115
29b115
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
29b115
RH-MergeRequest: 99: Revert "globally limit the maximum number of CPUs"
29b115
RH-Commit: [1/1] 13100d4a2209b2190a3654c1f9cf4ebade1e8d24 (vkuznets/qemu-kvm-c9s)
29b115
RH-Bugzilla: 2094270
29b115
RH-Acked-by: Andrew Jones <drjones@redhat.com>
29b115
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
29b115
RH-Acked-by: Thomas Huth <thuth@redhat.com>
29b115
29b115
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2094270
29b115
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=45871149
29b115
Upstream Status: RHEL-only
29b115
Tested: with upstream kernel
29b115
29b115
Downstream QEMU carries a patch that sets the hard limit of possible vCPUs
29b115
to the value that the KVM code of the kernel recommends as soft limit.
29b115
Upstream KVM code has been changed recently to not use an arbitrary soft
29b115
limit anymore, but to cap the value on the amount of available physical
29b115
CPUs of the host. This defeats the purpose of the downstream change in
29b115
QEMU completely. Drop the downstream-only patch to allow CPU overcommit.
29b115
29b115
This reverts commit 6669f6fa677d43144f39d6ad59725b7ba622f1c2.
29b115
29b115
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
29b115
---
29b115
 accel/kvm/kvm-all.c | 12 ------------
29b115
 1 file changed, 12 deletions(-)
29b115
29b115
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
29b115
index fdf0e4d429..5f1377ca04 100644
29b115
--- a/accel/kvm/kvm-all.c
29b115
+++ b/accel/kvm/kvm-all.c
29b115
@@ -2430,18 +2430,6 @@ static int kvm_init(MachineState *ms)
29b115
     soft_vcpus_limit = kvm_recommended_vcpus(s);
29b115
     hard_vcpus_limit = kvm_max_vcpus(s);
29b115
 
29b115
-#ifdef HOST_PPC64
29b115
-    /*
29b115
-     * On POWER, the kernel advertises a soft limit based on the
29b115
-     * number of CPU threads on the host.  We want to allow exceeding
29b115
-     * this for testing purposes, so we don't want to set hard limit
29b115
-     * to soft limit as on x86.
29b115
-     */
29b115
-#else
29b115
-    /* RHEL doesn't support nr_vcpus > soft_vcpus_limit */
29b115
-    hard_vcpus_limit = soft_vcpus_limit;
29b115
-#endif
29b115
-
29b115
     while (nc->name) {
29b115
         if (nc->num > soft_vcpus_limit) {
29b115
             warn_report("Number of %s cpus requested (%d) exceeds "
29b115
-- 
29b115
2.31.1
29b115