Skip to contentSkip to conversation

add QMP command to reset rtc interrupt backlog

PATCH Michal Privoznik 2 participants 2 messages Jun 2, 2014 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · Marcelo Tosatti

It is necessary to reset RTC interrupt backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command.

Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time.

Marcelo,

what happens if quest is synchronized via NTP? Does this command still need to be executed after 'cont'?

Michal

#2 lore raw
Quoted 10 lines · Michal Privoznik
Quoted 8 lines · Marcelo Tosatti

It is necessary to reset RTC interrupt backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command.

Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time.

Quoted 6 lines

Marcelo,

what happens if quest is synchronized via NTP? Does this command still need to be executed after 'cont'?

Michal

Yes because NTP will either take time to adjust by slewing or step the clock (which renders guest-set-time() unuseable). During that time, guest clock will be ahead of realtime.

Algorithm should be:

- ret = guest-set-time()
- if (ret = success)
- rtc-reset-reinjection()

That leaves a window where RTC interrupts are reinjected, but i see no better option.