9ae3a8
From 66543c63c5be389816ab45cdc6eed93094345281 Mon Sep 17 00:00:00 2001
9ae3a8
From: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
Date: Wed, 31 Jul 2013 08:07:32 +0200
9ae3a8
Subject: pc: rhel6-compat: enable S3, S4 for 6.1 and lower machine types
9ae3a8
9ae3a8
Message-id: <1374235471-27096-3-git-send-email-armbru@redhat.com>
9ae3a8
Patchwork-id: 52605
9ae3a8
O-Subject: [RHEL-7 PATCH qemu-kvm 2/2] pc: rhel6-compat: enable S3, S4 for 6.1 and lower machine types
9ae3a8
Bugzilla: 980840
9ae3a8
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
RH-Acked-by: Bandan Das <bsd@redhat.com>
9ae3a8
RH-Acked-by: Gleb Natapov <gleb@redhat.com>
9ae3a8
9ae3a8
From: Amit Shah <amit.shah@redhat.com>
9ae3a8
9ae3a8
We don't advertise S3/S4 support by default since RHEL6.2:
9ae3a8
9ae3a8
RHEL6.4 has S3/S4 advertisement disabled by default (can be overriden by
9ae3a8
    the disable_s3 and disable_s4 properties of the PIIX4).
9ae3a8
RHEL6.3 and 6.2 had S3/S4 advertisement disabled by default (can be
9ae3a8
    overriden by using the alternative bios-pm.bin SeaBIOS image).
9ae3a8
RHEL6.1 and 6.0 had S3/S4 advertisement enabled by default.
9ae3a8
9ae3a8
We need to ensure we keep that behaviour, so adjust the 6.1 and 6.0
9ae3a8
machine types to allow S3/S4.
9ae3a8
9ae3a8
As a side note, migrating a RHEL6.0 or RHEL6.1 VM to a RHEL6.2 or 6.3
9ae3a8
host would have caused a guest-visible change, but we can do better
9ae3a8
starting with 6.4, so let's do the right thing now.  This, however, has
9ae3a8
the potential to cause two guest-visible changes if a VM is migrated
9ae3a8
like this:
9ae3a8
9ae3a8
RHEL6.1 host --1--> RHEL6.3 host --2--> RHEL6.4 host
9ae3a8
9ae3a8
After (1) above, guest will stop seeing S3/S4 advertised.  After (2),
9ae3a8
S3/S4 will be advertised again.
9ae3a8
9ae3a8
Signed-off-by: Amit Shah <amit.shah@redhat.com>
9ae3a8
Signed-off-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
(cherry picked from commit ffc7768db990f0587b84e08e06095ed26f095fde)
9ae3a8
9ae3a8
Picked from qemu-kvm-rhel6.
9ae3a8
9ae3a8
Conflicts:
9ae3a8
        hw/pc.c
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 5ca2cc3..23002ce 100644
9ae3a8
--- a/hw/i386/pc_piix.c
9ae3a8
+++ b/hw/i386/pc_piix.c
9ae3a8
@@ -998,6 +998,14 @@ static QEMUMachine pc_machine_rhel620 = {
9ae3a8
 #define PC_RHEL6_1_COMPAT \
9ae3a8
     PC_RHEL6_2_COMPAT,\
9ae3a8
     {\
9ae3a8
+        .driver   = "PIIX4_PM",\
9ae3a8
+        .property = "disable_s3",\
9ae3a8
+        .value    = "0",\
9ae3a8
+    },{\
9ae3a8
+        .driver   = "PIIX4_PM",\
9ae3a8
+        .property = "disable_s4",\
9ae3a8
+        .value    = "0",\
9ae3a8
+    },{\
9ae3a8
         .driver   = "qxl",\
9ae3a8
         .property = "revision",\
9ae3a8
         .value    = stringify(2),\