Blame SOURCES/kvm-pc-Add-machine-type-rhel6-2-0.patch

d81766
From b42f56083fdb9486c892982045459c0867583578 Mon Sep 17 00:00:00 2001
d81766
From: Miroslav Rezanina <mrezanin@redhat.com>
d81766
Date: Wed, 31 Jul 2013 08:05:31 +0200
d81766
Subject: pc: Add machine type "rhel6.2.0"
d81766
d81766
Message-id: <1375201922-6794-12-git-send-email-armbru@redhat.com>
d81766
Patchwork-id: 52823
d81766
O-Subject: [RHEL-7 PATCH v3 11/15] pc: Add machine type "rhel6.2.0"
d81766
Bugzilla: 983991
d81766
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
d81766
RH-Acked-by: Bandan Das <bsd@redhat.com>
d81766
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
d81766
d81766
Match RHEL-6's compat_props qxl.revision,
d81766
qxl-vga.revision. virtio-blk-pci.event_idx,
d81766
virtio-serial-pci.event_idx, virtio-net-pci.event_idx,
d81766
virtio-balloon-pci.event_idx.
d81766
d81766
RHEL-6's non-upstream hda-duplex.mcompat, hda-micro.mcompat,
d81766
hda-output.mcompat aren't needed.  RHEL-6 has them to enable migration
d81766
back to RHEL-6.1 (see qemu-kvm-rhel6 commit d619762), which isn't
d81766
relevant in RHEL-7.
d81766
d81766
Non-upstream usb-tablet.migrate, usb-mouse.migrate, usb-kbd.migrate
d81766
will be covered separately (bug 953304).
d81766
d81766
PIIX4_PM.disable_s3, PIIX4_PM.disable_s4 will be covered separately
d81766
(bug 980840).
d81766
d81766
Signed-off-by: Markus Armbruster <armbru@redhat.com>
d81766
d81766
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
d81766
index 99f12e8..3c0f9f7 100644
d81766
--- a/hw/i386/pc_piix.c
d81766
+++ b/hw/i386/pc_piix.c
d81766
@@ -941,7 +941,7 @@ static QEMUMachine pc_machine_rhel700 = {
d81766
     .is_default = 1,
d81766
 };
d81766
 
d81766
-#define PC_RHEL6_1_COMPAT \
d81766
+#define PC_RHEL6_2_COMPAT \
d81766
     {\
d81766
         .driver   = "Conroe-" TYPE_X86_CPU,\
d81766
         .property = "model",\
d81766
@@ -1034,11 +1034,11 @@ static QEMUMachine pc_machine_rhel700 = {
d81766
     },{\
d81766
         .driver   = "qxl",\
d81766
         .property = "revision",\
d81766
-        .value    = stringify(2),\
d81766
+        .value    = stringify(3),\
d81766
     },{\
d81766
         .driver   = "qxl-vga",\
d81766
         .property = "revision",\
d81766
-        .value    = stringify(2),\
d81766
+        .value    = stringify(3),\
d81766
     },{\
d81766
         .driver   = "VGA",\
d81766
         .property = "mmio",\
d81766
@@ -1064,6 +1064,45 @@ static QEMUMachine pc_machine_rhel700 = {
d81766
         .property = "class",\
d81766
         .value    = stringify(PCI_CLASS_MEMORY_RAM),\
d81766
     },{\
d81766
+        .driver   = TYPE_PCI_DEVICE,\
d81766
+        .property = "command_serr_enable",\
d81766
+        .value    = "off",\
d81766
+    },{\
d81766
+        .driver   = "AC97",\
d81766
+        .property = "use_broken_id",\
d81766
+        .value    = stringify(1),\
d81766
+    }
d81766
+
d81766
+static void pc_init_rhel620(MachineState *machine)
d81766
+{
d81766
+    x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
d81766
+    enable_compat_apic_id_mode();
d81766
+    pc_init_rhel700(machine);
d81766
+}
d81766
+
d81766
+static QEMUMachine pc_machine_rhel620 = {
d81766
+    PC_DEFAULT_MACHINE_OPTIONS,
d81766
+    .name = "rhel6.2.0",
d81766
+    .desc = "RHEL 6.2.0 PC",
d81766
+    .init = pc_init_rhel620,
d81766
+    .max_cpus = 255,
d81766
+    .compat_props = (GlobalProperty[]) {
d81766
+        PC_RHEL6_2_COMPAT,
d81766
+        { /* end of list */ }
d81766
+    },
d81766
+};
d81766
+
d81766
+#define PC_RHEL6_1_COMPAT \
d81766
+    PC_RHEL6_2_COMPAT,\
d81766
+    {\
d81766
+        .driver   = "qxl",\
d81766
+        .property = "revision",\
d81766
+        .value    = stringify(2),\
d81766
+    },{\
d81766
+        .driver   = "qxl-vga",\
d81766
+        .property = "revision",\
d81766
+        .value    = stringify(2),\
d81766
+    },{\
d81766
         .driver   = "virtio-blk-pci",\
d81766
         .property = "event_idx",\
d81766
         .value    = "off",\
d81766
@@ -1079,21 +1118,11 @@ static QEMUMachine pc_machine_rhel700 = {
d81766
         .driver   = "virtio-balloon-pci",\
d81766
         .property = "event_idx",\
d81766
         .value    = "off",\
d81766
-    },{\
d81766
-        .driver   = TYPE_PCI_DEVICE,\
d81766
-        .property = "command_serr_enable",\
d81766
-        .value    = "off",\
d81766
-    },{\
d81766
-        .driver   = "AC97",\
d81766
-        .property = "use_broken_id",\
d81766
-        .value    = stringify(1),\
d81766
     }
d81766
 
d81766
 static void pc_init_rhel610(MachineState *machine)
d81766
 {
d81766
-    x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
d81766
-    enable_compat_apic_id_mode();
d81766
-    pc_init_rhel700(machine );
d81766
+    pc_init_rhel620(machine);
d81766
 }
d81766
 
d81766
 static QEMUMachine pc_machine_rhel610 = {
d81766
@@ -1126,8 +1155,6 @@ static QEMUMachine pc_machine_rhel610 = {
d81766
 
d81766
 static void pc_init_rhel600(MachineState *machine)
d81766
 {
d81766
-    x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
d81766
-    enable_compat_apic_id_mode();
d81766
     pc_init_rhel610(machine);
d81766
 }
d81766
 
d81766
@@ -1146,6 +1173,7 @@ static QEMUMachine pc_machine_rhel600 = {
d81766
 static void rhel_machine_init(void)
d81766
 {
d81766
     qemu_register_pc_machine(&pc_machine_rhel700);
d81766
+    qemu_register_pc_machine(&pc_machine_rhel620);
d81766
     qemu_register_pc_machine(&pc_machine_rhel610);
d81766
     qemu_register_pc_machine(&pc_machine_rhel600);
d81766
 }