From patchwork Tue Jun 19 19:38:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Cr=C3=ADstian_Viana?= X-Patchwork-Id: 165827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B6077B7002 for ; Wed, 20 Jun 2012 05:39:28 +1000 (EST) Received: from localhost ([::1]:56017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh4Gs-0003AX-DO for incoming@patchwork.ozlabs.org; Tue, 19 Jun 2012 15:39:26 -0400 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 d24dlp01.br.ibm.com (9.18.248.204) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 19 Jun 2012 16:38:54 -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 Received: from jellybean.br.ibm.com (jellybean.br.ibm.com [9.18.235.216]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q5JHceT7025202; Tue, 19 Jun 2012 14:38:40 -0300 From: =?UTF-8?q?Cr=C3=ADstian=20Viana?= To: QEMU Development ML Date: Tue, 19 Jun 2012 16:38:45 -0300 Message-Id: <1340134725-28764-2-git-send-email-vianac@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 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 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12061919-9254-0000-0000-00000958D369 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.104.18.24 Cc: Paolo Bonzini , =?UTF-8?q?Cr=C3=ADstian=20Viana?= , Anthony Liguori , Stefano Stabellini Subject: [Qemu-devel] [PATCH v4 2/2] Change driftfix default value to slew X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);