pit_load_old is only called with version_id == 1, but
PIT_SAVEVM_VERSION is 2. So this function is broken in qemu_kvm for
ages, and also the dummy qemu_get_be32 is pointless. Revert to upstream.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hw/i8254.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/hw/i8254.c b/hw/i8254.c
index 8925139..7089832 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -390,10 +390,9 @@ static int pit_load_old(QEMUFile *f, void *opaque, int 
version_id)
     PITChannelState *s;
     int i;
 
-    if (version_id != PIT_SAVEVM_VERSION)
+    if (version_id != 1)
         return -EINVAL;
 
-    (void)qemu_get_be32(f);
     for(i = 0; i < 3; i++) {
         s = &pit->channels[i];
         s->count=qemu_get_be32(f);
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to