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

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