From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh4Gd-00032k-Cx for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sh4GV-00033T-KL for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:10 -0400 Received: from e24smtp03.br.ibm.com ([32.104.18.24]:38002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh4GV-000314-9d for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:03 -0400 Received: from /spool/local by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jun 2012 16:38:55 -0300 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 7DEEA352004B for ; Tue, 19 Jun 2012 15:38:52 -0400 (EDT) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5JJaBl03231906 for ; Tue, 19 Jun 2012 16:36:11 -0300 Received: from d24av04.br.ibm.com (loopback [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5JHceXE025253 for ; Tue, 19 Jun 2012 14:38:41 -0300 From: =?UTF-8?q?Cr=C3=ADstian=20Viana?= Date: Tue, 19 Jun 2012 16:38:45 -0300 Message-Id: <1340134725-28764-2-git-send-email-vianac@linux.vnet.ibm.com> In-Reply-To: <1340134725-28764-1-git-send-email-vianac@linux.vnet.ibm.com> References: <1340134725-28764-1-git-send-email-vianac@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 2/2] Change driftfix default value to slew List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Development ML Cc: Paolo Bonzini , =?UTF-8?q?Cr=C3=ADstian=20Viana?= , Anthony Liguori , Stefano Stabellini Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as the time source. If driftfix is not enabled, Windows is prone to blue screening. Signed-off-by: Crístian Viana --- Anthony, Could you please try to reproduce the segfault again (as you stated in http://article.gmane.org/gmane.comp.emulators.qemu/143649)? I can't find it anymore. Changes since v3: - Fix a segfault hw/mc146818rtc.c | 2 +- vl.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index 3777f85..dfd7ee6 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -686,7 +686,7 @@ ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) static Property mc146818rtc_properties[] = { DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980), DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState, - lost_tick_policy, LOST_TICK_DISCARD), + lost_tick_policy, LOST_TICK_SLEW), DEFINE_PROP_END_OF_LIST(), }; diff --git a/vl.c b/vl.c index 204d85b..03661d1 100644 --- a/vl.c +++ b/vl.c @@ -559,7 +559,16 @@ static void configure_rtc(QemuOpts *opts) qdev_prop_register_global_list(slew_lost_ticks); } else if (!strcmp(value, "none")) { - /* discard is default */ + static GlobalProperty discard_lost_ticks[] = { + { + .driver = "mc146818rtc", + .property = "lost_tick_policy", + .value = "discard", + }, + { /* end of list */ } + }; + + qdev_prop_register_global_list(discard_lost_ticks); } else { fprintf(stderr, "qemu: invalid option value '%s'\n", value); exit(1); -- 1.7.9.5