diff mbox

qemu-kvm: Fix in-kernel PIT reset

Message ID 4E085A27.4080505@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka June 27, 2011, 10:23 a.m. UTC
Analogously to the PIC, we were lacking sync of the PIT user space
state to the kernel after reset. Fix it pragmatically, the code will be
reworked for upstream anyway.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/i8254.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Avi Kivity June 28, 2011, 8:20 a.m. UTC | #1
On 06/27/2011 01:23 PM, Jan Kiszka wrote:
> Analogously to the PIC, we were lacking sync of the PIT user space
> state to the kernel after reset. Fix it pragmatically, the code will be
> reworked for upstream anyway.

Applied, thanks.
diff mbox

Patch

diff --git a/hw/i8254.c b/hw/i8254.c
index 33974db..824d5c7 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -487,6 +487,9 @@  static void pit_reset(DeviceState *dev)
         s->gate = (i != 2);
         pit_load_count(pit, 0, i);
     }
+    if (vmstate_pit.post_load) {
+        vmstate_pit.post_load(pit, 2);
+    }
 }
 
 #ifdef TARGET_I386