[HVM] Save/restore: Reset PIT period correctly
authorTim Deegan <Tim.Deegan@xensource.com>
Tue, 30 Jan 2007 18:30:27 +0000 (18:30 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Tue, 30 Jan 2007 18:30:27 +0000 (18:30 +0000)
This fixes some time-speedup after restore in guests that use the PIT.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/hvm/i8254.c

index 61f997c051af22195fabfd185a029d13530f277d..2fe8ad5f5f4811b464f3652694c0f2455d22a20a 100644 (file)
@@ -439,7 +439,7 @@ static int pit_load(hvm_domain_context_t *h, void *opaque, int version_id)
      * we hope the guest can handle it. */
 
     for(i = 0; i < 3; i++) {
-        pit_load_count(pit, i, pit_get_count(pit, i));
+        pit_load_count(pit, i, pit->hw.channels[i].count);
         pit->pt[i].last_plt_gtime = hvm_get_guest_time(d->vcpu[0]);
     }