thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

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

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