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