Skip to contentSkip to conversation

RTC: enable lost_tick_policy=slew as default

PATCH In review Marcelo Tosatti 2 participants 2 messages Dec 11, 2012 – Dec 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RTC: enable lost_tick_policy=slew as default

RTC interrupt reinjection has no known negative effect. Lack of RTC interrupt reinjection, though, has negative effects: time drift for Windows guests which use it as a timer source.

Based on that, enable lost_tick_policy=slew option as default.

hw/mc146818rtc.c +1 -1
index c79fca7..c9e007d 100644
@@ -884,7 +884,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(),
 };
 
#1 lore raw

Il 11/12/2012 22:49, Marcelo Tosatti ha scritto:

Quoted 17 lines

RTC interrupt reinjection has no known negative effect. Lack of RTC interrupt reinjection, though, has negative effects: time drift for Windows guests which use it as a timer source.

Based on that, enable lost_tick_policy=slew option as default.

hw/mc146818rtc.c +0 -0
index c79fca7..c9e007d 100644

hw/mc146818rtc.c ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) · line 890

Quoted 8 lines
hw/mc146818rtc.c +1 -1
@@ -884,7 +884,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(),
 };
 

This needs versioning for old machine types, though.

Paolo