[PATCH 2/5] qemu-kvm: i8254: Reset broken pit_load_old to upstream version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jan.kiszka@xxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux