Blame SOURCES/0020-Migration-compat-for-pckbd.patch

383d26
From a13b85a600a676b75777d71dd6f11c233a5d8849 Mon Sep 17 00:00:00 2001
383d26
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
383d26
Date: Thu, 25 Jun 2015 16:34:25 +0200
383d26
Subject: Migration compat for pckbd
383d26
383d26
Patchwork-id: 66497
383d26
O-Subject: [RHEL-7.2 qemu-kvm-rhev PATCH 1/1] Migration compat for pckbd
383d26
Bugzilla: 1215092
383d26
RH-Acked-by: Juan Quintela <quintela@redhat.com>
383d26
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
383d26
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
383d26
383d26
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
383d26
383d26
2.2 added a new subsection to the pc keyboard model to preserve
383d26
the value of 'outport' across migration; to maintain migration
383d26
backwards compatibility this patch disables it on older machine types.
383d26
This leaves us no-worse-off than in older versions.
383d26
383d26
Even with the new code, the value migrated in 'outport' isn't used
383d26
anywhere in the pckbd model; for example the value migrated doesn't
383d26
change the state of the A20 line or potentially do a reset.
383d26
383d26
The only effect, as far as I can tell is if the guest were to
383d26
explicitly read the outport value it might get a more sensible reply.
383d26
383d26
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
(cherry picked from commit d2aba8a17b40c081f2ce29bc12b3945b7fb91d53)
383d26
(cherry picked from commit 583b819622f77c9e62bf3cd4f44b08de8aa46dcd)
383d26
383d26
Conflicts:
383d26
	hw/input/pckbd.c
383d26
383d26
(cherry picked from commit b26d8202c6a76320865d3a9dad113e570f4e1bad)
383d26
(cherry picked from commit fd17a12528099d896cbdb032425f08d393fca145)
383d26
(cherry picked from commit 9fb05d3c53161d680e58dc44b3db75d4c9a43453)
383d26
---
383d26
 hw/input/pckbd.c | 6 ++++++
383d26
 1 file changed, 6 insertions(+)
383d26
383d26
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
383d26
index 66adb83..bbd4112 100644
383d26
--- a/hw/input/pckbd.c
383d26
+++ b/hw/input/pckbd.c
383d26
@@ -27,6 +27,7 @@
383d26
 #include "hw/i386/pc.h"
383d26
 #include "hw/input/ps2.h"
383d26
 #include "hw/input/i8042.h"
383d26
+#include "migration/migration.h"
383d26
 #include "sysemu/sysemu.h"
383d26
 
383d26
 /* debug PC keyboard */
383d26
@@ -390,6 +391,11 @@ static int kbd_outport_post_load(void *opaque, int version_id)
383d26
 static bool kbd_outport_needed(void *opaque)
383d26
 {
383d26
     KBDState *s = opaque;
383d26
+
383d26
+    if (migrate_pre_2_2) {
383d26
+        return false;
383d26
+    }
383d26
+
383d26
     return s->outport != kbd_outport_default(s);
383d26
 }
383d26
 
383d26
-- 
383d26
1.8.3.1
383d26