Blob Blame History Raw
commit ffacd352a92751dab005eaa1892676a91e788a10
Author: Eduardo Habkost <ehabkost@redhat.com>
Date:   Thu Jun 27 15:57:41 2013 +0200

    pc: Replace upstream machine types by RHEL-7 types
    
    RH-Author: Eduardo Habkost <ehabkost@redhat.com>
    Message-id: <1372348663-1706-2-git-send-email-ehabkost@redhat.com>
    Patchwork-id: 52251
    O-Subject: [PATCH v2 1/3] pc: Replace upstream machine types by RHEL-7 types
    Bugzilla: 977864
    RH-Acked-by: Bandan Das <bsd@redhat.com>
    RH-Acked-by: Markus Armbruster <armbru@redhat.com>
    RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
    
    From: Markus Armbruster <armbru@redhat.com>
    
    Bugzilla: 977864
    Upstream status: not applicable
    
    Existing machine-types are commented-out instead of being deleted, to
    help avoid backport conflicts in the future.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    [ehabkost: edited patch description]
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    ---
     hw/i386/pc_piix.c | 29 +++++++++++++++++++++++++++++
     hw/i386/pc_q35.c  | 28 ++++++++++++++++++++++++++++
     2 files changed, 57 insertions(+)
    
    Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e26c93d..d8d74a3 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -246,6 +246,8 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
              initrd_filename, cpu_model, 1, 1);
 }
 
+#if 0 /* Disabled for Red Hat Enterprise Linux */
+
 static void pc_init_pci_1_4(QEMUMachineInitArgs *args)
 {
     has_pvpanic = false;
@@ -778,3 +780,30 @@ static void pc_machine_init(void)
 }
 
 machine_init(pc_machine_init);
+
+#endif  /* Disabled for Red Hat Enterprise Linux */
+
+/* Red Hat Enterprise Linux machine types */
+
+static void pc_init_rhel700(QEMUMachineInitArgs *args)
+{
+    pc_init_pci(args);
+}
+
+static QEMUMachine pc_machine_rhel700 = {
+    .name = "pc-i440fx-rhel7.0.0",
+    .alias = "pc",
+    .desc = "RHEL 7.0.0 PC (i440FX + PIIX, 1996)",
+    .init = pc_init_rhel700,
+    .hot_add_cpu = pc_hot_add_cpu,
+    .max_cpus = 255,
+    .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
+};
+
+static void rhel_machine_init(void)
+{
+    qemu_register_machine(&pc_machine_rhel700);
+}
+
+machine_init(rhel_machine_init);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 7888dfe..9bcad00 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -208,6 +208,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
     }
 }
 
+#if 0 /* Disabled for Red Hat Enterprise Linux */
+
 static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
 {
     has_pvpanic = false;
@@ -244,3 +246,29 @@ static void pc_q35_machine_init(void)
 }
 
 machine_init(pc_q35_machine_init);
+
+#endif  /* Disabled for Red Hat Enterprise Linux */
+
+/* Red Hat Enterprise Linux machine types */
+
+static void pc_q35_init_rhel700(QEMUMachineInitArgs *args)
+{
+    pc_q35_init(args);
+}
+
+static QEMUMachine pc_q35_machine_rhel700 = {
+    .name = "pc-q35-rhel7.0.0",
+    .alias = "q35",
+    .desc = "RHEL-7.0.0 PC (Q35 + ICH9, 2009)",
+    .init = pc_q35_init_rhel700,
+    .hot_add_cpu = pc_hot_add_cpu,
+    .max_cpus = 255,
+    DEFAULT_MACHINE_OPTIONS,
+};
+
+static void rhel_pc_q35_machine_init(void)
+{
+    qemu_register_machine(&pc_q35_machine_rhel700);
+}
+
+machine_init(rhel_pc_q35_machine_init);