Blob Blame History Raw
From aec30edd21fc46b3e6ad5a1b1e49da77afef5d42 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Thu, 19 Feb 2015 17:14:00 +0100
Subject: [PATCH] pc: add rhel6.6.0 machine type

Message-id: <1424366040-6013-1-git-send-email-ehabkost@redhat.com>
Patchwork-id: 63901
O-Subject: [RHEL-7.1.z qemu-kvm PATCH] pc: add rhel6.6.0 machine type
Bugzilla: 1198958
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>

From: Paolo Bonzini <pbonzini@redhat.com>

This enables migration from RHOSP5 to RHOSP6.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_piix.c | 41 +++++++++++++++++++++++++++++++++++------
 1 file changed, 35 insertions(+), 6 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 4ea3f67..f4cf2b5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -794,7 +794,7 @@ static QEMUMachine pc_machine_rhel700 = {
     DEFAULT_MACHINE_OPTIONS,
 };
 
-#define PC_RHEL6_5_COMPAT \
+#define PC_RHEL6_6_COMPAT \
     {\
         .driver   = "scsi-hd",\
         .property = "discard_granularity",\
@@ -905,16 +905,12 @@ static QEMUMachine pc_machine_rhel700 = {
         .property = "romfile",\
         .value    = "rhel6-virtio.rom",\
     },{\
-        .driver   = TYPE_USB_DEVICE,\
-        .property = "msos-desc",\
-        .value    = "no",\
-    },{\
         .driver   = "virtio-net-pci",\
         .property = "any_layout",\
         .value    = "off",\
     }
 
-static void pc_compat_rhel650(QEMUMachineInitArgs *args)
+static void pc_compat_rhel660(QEMUMachineInitArgs *args)
 {
     pc_compat_rhel700(args);
     if (!args->cpu_model) {
@@ -962,6 +958,38 @@ static void pc_compat_rhel650(QEMUMachineInitArgs *args)
     ich9_uhci123_irqpin_override = true;
 }
 
+static void pc_init_rhel660(QEMUMachineInitArgs *args)
+{
+    pc_compat_rhel660(args);
+    pc_init_pci(args);
+}
+
+static QEMUMachine pc_machine_rhel660 = {
+    .name = "rhel6.6.0",
+    .desc = "RHEL 6.6.0 PC",
+    .init = pc_init_rhel660,
+    .hot_add_cpu = pc_hot_add_cpu,
+    .max_cpus = RHEL_MAX_CPUS,
+    .compat_props = (GlobalProperty[]) {
+        PC_RHEL6_6_COMPAT,
+        { /* end of list */ }
+    },
+    DEFAULT_MACHINE_OPTIONS,
+};
+
+#define PC_RHEL6_5_COMPAT \
+    PC_RHEL6_6_COMPAT,\
+    {\
+        .driver   = TYPE_USB_DEVICE,\
+        .property = "msos-desc",\
+        .value    = "no",\
+    }
+
+static void pc_compat_rhel650(QEMUMachineInitArgs *args)
+{
+    pc_compat_rhel660(args);
+}
+
 static void pc_init_rhel650(QEMUMachineInitArgs *args)
 {
     pc_compat_rhel650(args);
@@ -1254,6 +1282,7 @@ static QEMUMachine pc_machine_rhel600 = {
 static void rhel_machine_init(void)
 {
     qemu_register_machine(&pc_machine_rhel700);
+    qemu_register_machine(&pc_machine_rhel660);
     qemu_register_machine(&pc_machine_rhel650);
     qemu_register_machine(&pc_machine_rhel640);
     qemu_register_machine(&pc_machine_rhel630);
-- 
1.8.3.1