958e1b
From 6971c1cd4d0c6822c99b2043f58c0f6a225c83b2 Mon Sep 17 00:00:00 2001
240766
From: Paolo Bonzini <pbonzini@redhat.com>
240766
Date: Mon, 5 May 2014 20:27:12 +0200
958e1b
Subject: [PATCH 1/2] pc: add hot_add_cpu callback to all machine types
240766
240766
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
240766
Message-id: <1399321632-26203-1-git-send-email-pbonzini@redhat.com>
240766
Patchwork-id: 58691
240766
O-Subject: [RHEL 7.0.z qemu-kvm PATCH] pc: add hot_add_cpu callback to all machine types
958e1b
Bugzilla: 1094285
240766
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
240766
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
240766
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
240766
958e1b
Bugzilla: 1094285
958e1b
240766
Upstream status: N/A
240766
240766
Brew build: 7416220
240766
240766
Due to the lack of the callback, RHEL6-compatible machine types
240766
failed CPU hotplug with a "not supported" error message.
240766
240766
However CPU hotplug is supported in RHEL6, albeit with a different
240766
monitor command that we had inherited from qemu-kvm, and for all machine
240766
types.  So, add it to all machine types in RHEL7 too.
240766
240766
Tested locally with a RHEL6.5 guest and -Mrhel6.5.0.
240766
240766
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
240766
---
240766
 hw/i386/pc_piix.c | 6 ++++++
240766
 1 file changed, 6 insertions(+)
240766
240766
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
240766
---
240766
 hw/i386/pc_piix.c |    6 ++++++
240766
 1 files changed, 6 insertions(+), 0 deletions(-)
240766
240766
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
240766
index 67d51da..aeec6f2 100644
240766
--- a/hw/i386/pc_piix.c
240766
+++ b/hw/i386/pc_piix.c
240766
@@ -968,6 +968,7 @@ static QEMUMachine pc_machine_rhel650 = {
240766
     .name = "rhel6.5.0",
240766
     .desc = "RHEL 6.5.0 PC",
240766
     .init = pc_init_rhel650,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_5_COMPAT,
240766
@@ -1016,6 +1017,7 @@ static QEMUMachine pc_machine_rhel640 = {
240766
     .name = "rhel6.4.0",
240766
     .desc = "RHEL 6.4.0 PC",
240766
     .init = pc_init_rhel640,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_4_COMPAT,
240766
@@ -1091,6 +1093,7 @@ static QEMUMachine pc_machine_rhel630 = {
240766
     .name = "rhel6.3.0",
240766
     .desc = "RHEL 6.3.0 PC",
240766
     .init = pc_init_rhel630,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_3_COMPAT,
240766
@@ -1122,6 +1125,7 @@ static QEMUMachine pc_machine_rhel620 = {
240766
     .name = "rhel6.2.0",
240766
     .desc = "RHEL 6.2.0 PC",
240766
     .init = pc_init_rhel620,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_2_COMPAT,
240766
@@ -1194,6 +1198,7 @@ static QEMUMachine pc_machine_rhel610 = {
240766
     .name = "rhel6.1.0",
240766
     .desc = "RHEL 6.1.0 PC",
240766
     .init = pc_init_rhel610,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_1_COMPAT,
240766
@@ -1233,6 +1238,7 @@ static QEMUMachine pc_machine_rhel600 = {
240766
     .name = "rhel6.0.0",
240766
     .desc = "RHEL 6.0.0 PC",
240766
     .init = pc_init_rhel600,
240766
+    .hot_add_cpu = pc_hot_add_cpu,
240766
     .max_cpus = 255,
240766
     .compat_props = (GlobalProperty[]) {
240766
         PC_RHEL6_0_COMPAT,
240766
-- 
240766
1.7.1
240766