Blob Blame Raw
From 6971c1cd4d0c6822c99b2043f58c0f6a225c83b2 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon, 5 May 2014 20:27:12 +0200
Subject: [PATCH 1/2] pc: add hot_add_cpu callback to all machine types

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <1399321632-26203-1-git-send-email-pbonzini@redhat.com>
Patchwork-id: 58691
O-Subject: [RHEL 7.0.z qemu-kvm PATCH] pc: add hot_add_cpu callback to all machine types
Bugzilla: 1094285
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

Bugzilla: 1094285

Upstream status: N/A

Brew build: 7416220

Due to the lack of the callback, RHEL6-compatible machine types
failed CPU hotplug with a "not supported" error message.

However CPU hotplug is supported in RHEL6, albeit with a different
monitor command that we had inherited from qemu-kvm, and for all machine
types.  So, add it to all machine types in RHEL7 too.

Tested locally with a RHEL6.5 guest and -Mrhel6.5.0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/pc_piix.c | 6 ++++++
 1 file changed, 6 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_piix.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 67d51da..aeec6f2 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -968,6 +968,7 @@ static QEMUMachine pc_machine_rhel650 = {
     .name = "rhel6.5.0",
     .desc = "RHEL 6.5.0 PC",
     .init = pc_init_rhel650,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_5_COMPAT,
@@ -1016,6 +1017,7 @@ static QEMUMachine pc_machine_rhel640 = {
     .name = "rhel6.4.0",
     .desc = "RHEL 6.4.0 PC",
     .init = pc_init_rhel640,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_4_COMPAT,
@@ -1091,6 +1093,7 @@ static QEMUMachine pc_machine_rhel630 = {
     .name = "rhel6.3.0",
     .desc = "RHEL 6.3.0 PC",
     .init = pc_init_rhel630,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_3_COMPAT,
@@ -1122,6 +1125,7 @@ static QEMUMachine pc_machine_rhel620 = {
     .name = "rhel6.2.0",
     .desc = "RHEL 6.2.0 PC",
     .init = pc_init_rhel620,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_2_COMPAT,
@@ -1194,6 +1198,7 @@ static QEMUMachine pc_machine_rhel610 = {
     .name = "rhel6.1.0",
     .desc = "RHEL 6.1.0 PC",
     .init = pc_init_rhel610,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_1_COMPAT,
@@ -1233,6 +1238,7 @@ static QEMUMachine pc_machine_rhel600 = {
     .name = "rhel6.0.0",
     .desc = "RHEL 6.0.0 PC",
     .init = pc_init_rhel600,
+    .hot_add_cpu = pc_hot_add_cpu,
     .max_cpus = 255,
     .compat_props = (GlobalProperty[]) {
         PC_RHEL6_0_COMPAT,
-- 
1.7.1