qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Crístian Viana" <vianac@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 2/2] Change timedrift default value to slew
Date: Wed, 21 Mar 2012 22:37:21 +0100	[thread overview]
Message-ID: <4F6A4A11.3090703@redhat.com> (raw)
In-Reply-To: <1332345997-4772-2-git-send-email-vianac@linux.vnet.ibm.com>

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 <vianac@linux.vnet.ibm.com>
> ---
>  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 <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2012-03-21 21:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 16:06 [Qemu-devel] [PATCH v3 1/2] Force timedrift=none on previous machines Crístian Viana
2012-03-21 16:06 ` [Qemu-devel] [PATCH v3 2/2] Change timedrift default value to slew Crístian Viana
2012-03-21 21:37   ` Paolo Bonzini [this message]
2012-03-21 21:36 ` [Qemu-devel] [PATCH v3 1/2] Force timedrift=none on previous machines Paolo Bonzini
2012-03-22 10:37   ` Stefano Stabellini
2012-03-23 12:57     ` Anthony Liguori
2012-03-26 19:20 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6A4A11.3090703@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vianac@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).