From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATDo-0005gO-LN for qemu-devel@nongnu.org; Wed, 21 Mar 2012 17:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SATDm-000685-U4 for qemu-devel@nongnu.org; Wed, 21 Mar 2012 17:37:32 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:53763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATDm-00067q-Kv for qemu-devel@nongnu.org; Wed, 21 Mar 2012 17:37:30 -0400 Received: by pbcuo5 with SMTP id uo5so1263884pbc.4 for ; Wed, 21 Mar 2012 14:37:28 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4F6A4A11.3090703@redhat.com> Date: Wed, 21 Mar 2012 22:37:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1332345997-4772-1-git-send-email-vianac@linux.vnet.ibm.com> <1332345997-4772-2-git-send-email-vianac@linux.vnet.ibm.com> In-Reply-To: <1332345997-4772-2-git-send-email-vianac@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 2/2] Change timedrift default value to slew List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?Q3LDrXN0aWFuIFZpYW5h?= Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Il 21/03/2012 17:06, Crístian Viana ha scritto: > Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as > the time source. If time drift is not enabled, Windows is prone to > blue screening. > > Signed-off-by: Crístian Viana > --- > hw/mc146818rtc.c | 2 +- > vl.c | 10 +++++----- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c > index 2b59c36..2b31587 100644 > --- a/hw/mc146818rtc.c > +++ b/hw/mc146818rtc.c > @@ -726,7 +726,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 112b0e0..11817e5 100644 > --- a/vl.c > +++ b/vl.c > @@ -539,18 +539,18 @@ static void configure_rtc(QemuOpts *opts) > value = qemu_opt_get(opts, "driftfix"); > if (value) { > if (!strcmp(value, "slew")) { > - static GlobalProperty slew_lost_ticks[] = { > + /* slew is default */ > + } else if (!strcmp(value, "none")) { > + static GlobalProperty discard_lost_ticks[] = { > { > .driver = "mc146818rtc", > .property = "lost_tick_policy", > - .value = "slew", > + .value = "discard", > }, > { /* end of list */ } > }; > > - qdev_prop_register_global_list(slew_lost_ticks); > - } else if (!strcmp(value, "none")) { > - /* discard is default */ > + qdev_prop_register_global_list(discard_lost_ticks); > } else { > fprintf(stderr, "qemu: invalid option value '%s'\n", value); > exit(1); Reviewed-by: Paolo Bonzini Paolo