From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] qemu-kvm: Fix in-kernel PIT reset Date: Mon, 27 Jun 2011 12:23:35 +0200 Message-ID: <4E085A27.4080505@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm To: Avi Kivity , Marcelo Tosatti Return-path: Received: from goliath.siemens.de ([192.35.17.28]:15012 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757459Ab1F0KXj (ORCPT ); Mon, 27 Jun 2011 06:23:39 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- hw/i8254.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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 -- 1.7.1