From patchwork Wed Dec 12 21:36:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 205663 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 940BD2C008E for ; Thu, 13 Dec 2012 08:37:31 +1100 (EST) Received: from localhost ([::1]:39388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Titzd-0000D0-Ob for incoming@patchwork.ozlabs.org; Wed, 12 Dec 2012 16:37:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TitzU-0000Cq-GH for qemu-devel@nongnu.org; Wed, 12 Dec 2012 16:37:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TitzQ-0000kM-Ou for qemu-devel@nongnu.org; Wed, 12 Dec 2012 16:37:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TitzQ-0000kD-HM for qemu-devel@nongnu.org; Wed, 12 Dec 2012 16:37:16 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBCLbFbc013235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Dec 2012 16:37:15 -0500 Received: from amt.cnet (vpn1-6-57.gru2.redhat.com [10.97.6.57]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBCLbEE0018177; Wed, 12 Dec 2012 16:37:14 -0500 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id C745266E17E; Wed, 12 Dec 2012 19:36:33 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.5/8.14.5/Submit) id qBCLaWBs028010; Wed, 12 Dec 2012 19:36:32 -0200 Date: Wed, 12 Dec 2012 19:36:31 -0200 From: Marcelo Tosatti To: qemu-devel@nongnu.org Message-ID: <20121212213631.GA27694@amt.cnet> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Jan Kiszka , Paolo Bonzini Subject: [Qemu-devel] [PATCH] RTC: enable lost_tick_policy=slew as default (v2) 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 RTC interrupt reinjection has no known negative effect. Lack of RTC interrupt reinjection, though, has negative effects: time drift for Windows guests which use it as a timer source. Based on that, enable lost_tick_policy=slew option as default. Signed-off-by: Marcelo Tosatti v2: do not change default for older machines types (Paolo Bonzini) Reviewed-by: Paolo Bonzini diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index c79fca7..c9e007d 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -884,7 +884,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/hw/pc_piix.c b/hw/pc_piix.c index 19e342a..475bb4c 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -295,6 +295,10 @@ static QEMUMachine pc_machine_v1_4 = { .driver = "usb-tablet",\ .property = "usb_version",\ .value = stringify(1),\ + },{\ + .driver = "mc146818rtc",\ + .property = "lost_tick_policy",\ + .value = "discard",\ } static QEMUMachine pc_machine_v1_3 = {