qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] Change timedrift default value to slew


From: Crístian Viana
Subject: [Qemu-devel] [PATCH 2/2] Change timedrift default value to slew
Date: Tue, 20 Mar 2012 16:48:38 -0300

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 <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]