9ae3a8
From 8f9887acd04e8db0bebd0ad3fe1cf5d7294abdfd Mon Sep 17 00:00:00 2001
9ae3a8
From: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
Date: Wed, 31 Jul 2013 08:06:25 +0200
9ae3a8
Subject: pc: Add machine type "rhel6.5.0"
9ae3a8
9ae3a8
Message-id: <1375201922-6794-15-git-send-email-armbru@redhat.com>
9ae3a8
Patchwork-id: 52824
9ae3a8
O-Subject: [RHEL-7 PATCH v3 14/15] pc: Add machine type "rhel6.5.0"
9ae3a8
Bugzilla: 983991
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Bandan Das <bsd@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
Match RHEL-6's virtio-scsi-pci.vectors.  Note: upstream commit 4c205d0
9ae3a8
"virtio-scsi: enable MSI-X support" changed vectors from 2 to
9ae3a8
DEV_NVECTORS_UNSPECIFIED.  The necessary compat_props to keep it at 2
9ae3a8
for old machine types were forgotten.  The RHEL-6 backport (commit
9ae3a8
0ef7672) added them.
9ae3a8
9ae3a8
Match RHEL-6's has_pvpanic.
9ae3a8
9ae3a8
RHEL-6's disable_kvm_sep() will be covered separately (bug 918907).
9ae3a8
9ae3a8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
9ae3a8
index a922645..5ca2cc3 100644
9ae3a8
--- a/hw/i386/pc_piix.c
9ae3a8
+++ b/hw/i386/pc_piix.c
9ae3a8
@@ -777,7 +777,7 @@ static QEMUMachine pc_machine_rhel700 = {
9ae3a8
     DEFAULT_MACHINE_OPTIONS,
9ae3a8
 };
9ae3a8
 
9ae3a8
-#define PC_RHEL6_4_COMPAT \
9ae3a8
+#define PC_RHEL6_5_COMPAT \
9ae3a8
     {\
9ae3a8
         .driver   = "scsi-hd",\
9ae3a8
         .property = "discard_granularity",\
9ae3a8
@@ -865,10 +865,35 @@ static QEMUMachine pc_machine_rhel700 = {
9ae3a8
         .value    = stringify(1),\
9ae3a8
     }
9ae3a8
 
9ae3a8
+static void pc_init_rhel650(QEMUMachineInitArgs *args)
9ae3a8
+{
9ae3a8
+    pc_init_rhel700(args);
9ae3a8
+}
9ae3a8
+
9ae3a8
+static QEMUMachine pc_machine_rhel650 = {
9ae3a8
+    .name = "rhel6.5.0",
9ae3a8
+    .desc = "RHEL 6.5.0 PC",
9ae3a8
+    .init = pc_init_rhel650,
9ae3a8
+    .max_cpus = 255,
9ae3a8
+    .compat_props = (GlobalProperty[]) {
9ae3a8
+        PC_RHEL6_5_COMPAT,
9ae3a8
+        { /* end of list */ }
9ae3a8
+    },
9ae3a8
+    DEFAULT_MACHINE_OPTIONS,
9ae3a8
+};
9ae3a8
+
9ae3a8
+#define PC_RHEL6_4_COMPAT \
9ae3a8
+    PC_RHEL6_5_COMPAT,\
9ae3a8
+    {\
9ae3a8
+        .driver   = "virtio-scsi-pci",\
9ae3a8
+        .property = "vectors",\
9ae3a8
+        .value    = stringify(2),\
9ae3a8
+    }
9ae3a8
+
9ae3a8
 static void pc_init_rhel640(QEMUMachineInitArgs *args)
9ae3a8
 {
9ae3a8
     has_pvpanic = false;
9ae3a8
-    pc_init_rhel700(args);
9ae3a8
+    pc_init_rhel650(args);
9ae3a8
 }
9ae3a8
 
9ae3a8
 static QEMUMachine pc_machine_rhel640 = {
9ae3a8
@@ -1051,6 +1076,7 @@ static QEMUMachine pc_machine_rhel600 = {
9ae3a8
 static void rhel_machine_init(void)
9ae3a8
 {
9ae3a8
     qemu_register_machine(&pc_machine_rhel700);
9ae3a8
+    qemu_register_machine(&pc_machine_rhel650);
9ae3a8
     qemu_register_machine(&pc_machine_rhel640);
9ae3a8
     qemu_register_machine(&pc_machine_rhel630);
9ae3a8
     qemu_register_machine(&pc_machine_rhel620);