From b8a3ade135f53280e2eda8d0e38edfd150310d13 Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Date: Thu, 2 Jun 2016 15:11:49 +0200
Subject: [PATCH 23/24] pc: Create new pc-q35-rhel7.3.0 machine-type

RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: <1464880310-29953-6-git-send-email-dgilbert@redhat.com>
Patchwork-id: 70542
O-Subject: [RHEL-7.3 qemu-kvm-rhev PATCH 5/6] pc: Create new pc-q35-rhel7.3.0 machine-type
Bugzilla: 1342015
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Bandan Das <bsd@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

While we're still figuring out the details of what we want in it,
we definitely want it.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_q35.c | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index f0e3e38..1fe71b0 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -321,8 +321,33 @@ DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
 
 /* Red Hat Enterprise Linux machine types */
 
+static void pc_q35_compat_rhel730(MachineState *machine)
+{
+}
+
+static void pc_q35_init_rhel730(MachineState *machine)
+{
+    pc_q35_compat_rhel730(machine);
+    pc_q35_init(machine);
+}
+
+static void pc_q35_machine_rhel730_options(MachineClass *m)
+{
+    m->family = "pc_q35_Z";
+    m->desc = "RHEL-7.3.0 PC (Q35 + ICH9, 2009)";
+    m->alias = "q35";
+    m->default_machine_opts = "firmware=bios-256k.bin";
+    m->default_display = "std";
+    m->no_floppy = 1;
+}
+
+DEFINE_PC_MACHINE(q35_rhel730, "pc-q35-rhel7.3.0", pc_q35_init_rhel730,
+                  pc_q35_machine_rhel730_options);
+
 static void pc_q35_compat_rhel720(MachineState *machine)
 {
+    pc_q35_compat_rhel730(machine);
+
     savevm_skip_section_footers();
     global_state_set_optional();
 }
@@ -335,12 +360,10 @@ static void pc_q35_init_rhel720(MachineState *machine)
 
 static void pc_q35_machine_rhel720_options(MachineClass *m)
 {
-    m->family = "pc_q35_Z";
+    pc_q35_machine_rhel730_options(m);
+    m->is_default = 0;
+    m->alias = NULL;
     m->desc = "RHEL-7.2.0 PC (Q35 + ICH9, 2009)";
-    m->alias = "q35";
-    m->default_machine_opts = "firmware=bios-256k.bin";
-    m->default_display = "std";
-    m->no_floppy = 1;
     SET_MACHINE_COMPAT(m, PC_RHEL7_2_COMPAT);
 }
 
-- 
1.8.3.1

