9ae3a8
From 0bc3adc3b0a24625b1f8217abc1a50d7ce741191 Mon Sep 17 00:00:00 2001
9ae3a8
From: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
Date: Fri, 2 Aug 2013 14:08:53 +0200
9ae3a8
Subject: pc: set compat "pmu" property for rhel6.x machine-types
9ae3a8
9ae3a8
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
Message-id: <1375452533-12507-4-git-send-email-ehabkost@redhat.com>
9ae3a8
Patchwork-id: 52934
9ae3a8
O-Subject: [RHEL-7 PATCH 3/3] pc: set compat "pmu" property for rhel6.x machine-types
9ae3a8
Bugzilla: 853101
9ae3a8
RH-Acked-by: Bandan Das <bsd@redhat.com>
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
RH-Acked-by: Gleb Natapov <gleb@redhat.com>
9ae3a8
9ae3a8
Bugzilla: 853101
9ae3a8
Upstream status: not applicable
9ae3a8
9ae3a8
This adds compatibility values to the rhel6.* machine-types for the
9ae3a8
"pmu" property on X86CPU:
9ae3a8
9ae3a8
 * rhel6.2 and older doesn't have vPMU support
9ae3a8
 * rhel6.3 has the broken passthrough-mode vPMU enabled
9ae3a8
 * rhel6.4 and newer have vPMU disabled by default
9ae3a8
9ae3a8
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
9ae3a8
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
9ae3a8
index e1bedec..bc67633 100644
9ae3a8
--- a/hw/i386/pc_piix.c
9ae3a8
+++ b/hw/i386/pc_piix.c
9ae3a8
@@ -942,6 +942,10 @@ static QEMUMachine pc_machine_rhel640 = {
9ae3a8
         .driver   = "virtio-scsi-pci",\
9ae3a8
         .property = "param_change",\
9ae3a8
         .value    = "off",\
9ae3a8
+    },{\
9ae3a8
+        .driver = TYPE_X86_CPU,\
9ae3a8
+        .property = "pmu",\
9ae3a8
+        .value = "on",\
9ae3a8
     }
9ae3a8
 
9ae3a8
 static void pc_init_rhel630(QEMUMachineInitArgs *args)
9ae3a8
@@ -964,7 +968,12 @@ static QEMUMachine pc_machine_rhel630 = {
9ae3a8
 };
9ae3a8
 
9ae3a8
 #define PC_RHEL6_2_COMPAT \
9ae3a8
-    PC_RHEL6_3_COMPAT
9ae3a8
+    PC_RHEL6_3_COMPAT,\
9ae3a8
+    {\
9ae3a8
+        .driver = TYPE_X86_CPU,\
9ae3a8
+        .property = "pmu",\
9ae3a8
+        .value = "off",\
9ae3a8
+    }
9ae3a8
 
9ae3a8
 static void pc_init_rhel620(QEMUMachineInitArgs *args)
9ae3a8
 {