qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Crístian Viana" <vianac@linux.vnet.ibm.com>,
	"QEMU Development ML" <qemu-devel@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH v5 3/3] Change driftfix default value to slew
Date: Wed, 11 Jul 2012 12:54:16 -0500	[thread overview]
Message-ID: <87liiq2ng7.fsf@codemonkey.ws> (raw)
In-Reply-To: <1340733111-9166-3-git-send-email-vianac@linux.vnet.ibm.com>

Crístian Viana <vianac@linux.vnet.ibm.com> writes:

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

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

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[] = {
>      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 1329c30..3ae43fc 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);
> -- 
> 1.7.9.5

      parent reply	other threads:[~2012-07-11 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340733111-9166-1-git-send-email-vianac@linux.vnet.ibm.com>
2012-07-11 17:52 ` [Qemu-devel] [PATCH v5 1/3] Check if GlobalProperty exists before registering Anthony Liguori
     [not found] ` <1340733111-9166-2-git-send-email-vianac@linux.vnet.ibm.com>
2012-07-11 17:53   ` [Qemu-devel] [PATCH v5 2/3] Force driftfix=none on previous machines Anthony Liguori
     [not found] ` <1340733111-9166-3-git-send-email-vianac@linux.vnet.ibm.com>
2012-07-11 17:54   ` Anthony Liguori [this message]

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=87liiq2ng7.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).