From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp17K-0003Ud-RU for qemu-devel@nongnu.org; Wed, 11 Jul 2012 13:54:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp17E-0003VU-WF for qemu-devel@nongnu.org; Wed, 11 Jul 2012 13:54:26 -0400 Received: from mail-gh0-f173.google.com ([209.85.160.173]:51559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp17E-0003VQ-Rv for qemu-devel@nongnu.org; Wed, 11 Jul 2012 13:54:20 -0400 Received: by ghrr14 with SMTP id r14so1608500ghr.4 for ; Wed, 11 Jul 2012 10:54:20 -0700 (PDT) From: Anthony Liguori In-Reply-To: <1340733111-9166-3-git-send-email-vianac@linux.vnet.ibm.com> References: <1340733111-9166-1-git-send-email-vianac@linux.vnet.ibm.com> <1340733111-9166-3-git-send-email-vianac@linux.vnet.ibm.com> Date: Wed, 11 Jul 2012 12:54:16 -0500 Message-ID: <87liiq2ng7.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 3/3] Change driftfix default value to slew List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Cr=C3=ADstian?= Viana , QEMU Development ML Cc: Paolo Bonzini , Stefano Stabellini Cr=C3=ADstian Viana writes: > Windows 2008+ is very sensitive to missed ticks. The RTC is used by defau= lt as > the time source. If driftfix is not enabled, Windows is prone to > blue screening. > > Signed-off-by: Cr=C3=ADstian Viana Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > 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[] =3D { > 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(), > }; >=20=20 > diff --git a/vl.c b/vl.c > index 1329c30..3ae43fc 100644 > --- a/vl.c > +++ b/vl.c > @@ -559,7 +559,16 @@ static void configure_rtc(QemuOpts *opts) >=20=20 > qdev_prop_register_global_list(slew_lost_ticks); > } else if (!strcmp(value, "none")) { > - /* discard is default */ > + static GlobalProperty discard_lost_ticks[] =3D { > + { > + .driver =3D "mc146818rtc", > + .property =3D "lost_tick_policy", > + .value =3D "discard", > + }, > + { /* end of list */ } > + }; > + > + qdev_prop_register_global_list(discard_lost_ticks); > } else { > fprintf(stderr, "qemu: invalid option value '%s'\n", value); > exit(1); > --=20 > 1.7.9.5