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<via...@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 */ }
+ };
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);
}
}