qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Crístian Viana" <vianac@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, "Crístian Viana" <vianac@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 2/2] Change timedrift default value to slew
Date: Tue, 20 Mar 2012 16:48:38 -0300	[thread overview]
Message-ID: <1332272918-31746-2-git-send-email-vianac@linux.vnet.ibm.com> (raw)
In-Reply-To: <1332272918-31746-1-git-send-email-vianac@linux.vnet.ibm.com>

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>
---
 vl.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index 112b0e0..2c7cbf0 100644
--- a/vl.c
+++ b/vl.c
@@ -550,11 +550,22 @@ static void configure_rtc(QemuOpts *opts)
 
             qdev_prop_register_global_list(slew_lost_ticks);
         } else if (!strcmp(value, "none")) {
-            /* discard is default */
+            /* do nothing */
         } else {
             fprintf(stderr, "qemu: invalid option value '%s'\n", value);
             exit(1);
         }
+    } else {
+        static GlobalProperty slew_lost_ticks[] = {
+            {
+                .driver   = "mc146818rtc",
+                .property = "lost_tick_policy",
+                .value    = "slew",
+            },
+            { /* end of list */ }
+        };
+
+        qdev_prop_register_global_list(slew_lost_ticks);
     }
 }
 
-- 
1.7.8.5

  reply	other threads:[~2012-03-20 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 19:48 [Qemu-devel] [PATCH 1/2] Force timedrift=none on previous machines Crístian Viana
2012-03-20 19:48 ` Crístian Viana [this message]
2012-03-20 20:05   ` [Qemu-devel] [PATCH 2/2] Change timedrift default value to slew Anthony Liguori
2012-03-20 20:16     ` Crístian Viana
2012-03-20 20:31       ` Anthony Liguori
2012-03-20 20:46         ` Crístian Viana

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=1332272918-31746-2-git-send-email-vianac@linux.vnet.ibm.com \
    --to=vianac@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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).