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