qemu-devel
[Top][All Lists]
Advanced

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

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


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2] Change timedrift default value to slew
Date: Tue, 20 Mar 2012 15:05:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 03/20/2012 02:48 PM, Crístian Viana wrote:
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 */ }
+        };

I think we just want to change:

hw/mc146818rtc.h:
    DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState,
                               lost_tick_policy, LOST_TICK_DISCARD),

I think we just need to change this to LOST_TICK_SLEW. This would effectively change the default.

Regards,

Anthony Liguori

+        qdev_prop_register_global_list(slew_lost_ticks);
      }
  }





reply via email to

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