76daa3
From 5090ba1ce35fa1d2157de83a4539d993826da82d Mon Sep 17 00:00:00 2001
76daa3
From: Marcelo Tosatti <mtosatti@redhat.com>
76daa3
Date: Mon, 27 Jun 2016 20:21:25 +0200
76daa3
Subject: Fix qemu-kvm does not quit when booting guest w/ 241 vcpus and
76daa3
 "-no-kvm"
76daa3
76daa3
RH-Author: Marcelo Tosatti <mtosatti@redhat.com>
76daa3
Message-id: <20160627202124.GA26255@amt.cnet>
76daa3
Patchwork-id: 70796
76daa3
O-Subject: [RHEV-7.3 qemu-kvm-rhev PATCH v3] Fix qemu-kvm does not quit when booting guest w/ 161 vcpus and "-no-kvm" (BZ 1126666)
76daa3
Bugzilla: 1126666
76daa3
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
76daa3
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
76daa3
RH-Acked-by: Andrew Jones <drjones@redhat.com>
76daa3
76daa3
Boot a guest with /usr/libexec/qemu-kvm -no-kvm -smp 241
76daa3
and it does not fail.
76daa3
76daa3
Fix QEMU to match KVM's number of maximum supported CPUs.
76daa3
76daa3
Backport commit #: not applicable.
76daa3
76daa3
Note: this change was lost during the last rebase.
76daa3
The RHEL-7.1 commit number for that change is:
76daa3
commit ce72a826c4882e62d8b897efc2183c39d9c21906
76daa3
Author: Markus Armbruster <armbru@redhat.com>
76daa3
Date:   Mon Aug 11 07:54:35 2014 +0200
76daa3
76daa3
    exit when -no-kvm and vcpu count > 160
76daa3
76daa3
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
76daa3
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
(cherry picked from commit ff9e7316daa93ddfc0b11466128bf03540afcf74)
76daa3
(cherry picked from commit 13a605ab2f26363751d2b6c72b081d2fd39e6f45)
76daa3
---
76daa3
 hw/i386/pc.c | 3 ++-
76daa3
 1 file changed, 2 insertions(+), 1 deletion(-)
76daa3
76daa3
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
76daa3
index 2764b77..6ed4d23 100644
76daa3
--- a/hw/i386/pc.c
76daa3
+++ b/hw/i386/pc.c
76daa3
@@ -2332,7 +2332,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
76daa3
     mc->default_boot_order = "cad";
76daa3
     mc->hot_add_cpu = pc_hot_add_cpu;
76daa3
     mc->block_default_type = IF_IDE;
76daa3
-    mc->max_cpus = 255;
76daa3
+    /* 240: max CPU count for RHEL */
76daa3
+    mc->max_cpus = 240;
76daa3
     mc->reset = pc_machine_reset;
76daa3
     hc->pre_plug = pc_machine_device_pre_plug_cb;
76daa3
     hc->plug = pc_machine_device_plug_cb;
76daa3
-- 
76daa3
1.8.3.1
76daa3