Skip to contentSkip to conversation

Port HPET device model to vpt timer subsystem

PATCH New Keir Fraser 1 participant 1 message Oct 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Port HPET device model to vpt timer subsystem

The current hpet implementation runs a one-shot xen timer for each hpet timer whenever the main counter is enabled regardless of whether or not the individual hpet timers are enabled. When the timer fires, if it is enabled the interrupt is routed to the guest. If the hpet timer is periodic, a new one-shot timer is set, for NOW()+period. There are a number of problems with this the most significant is guest time drift. Windows does not read the hardware clock to verify time, it depends on timer interrupts firing at the expected interval. The existing implementation queues a new one-shot timer each time it fires and does not allow for a difference between NOW() and the time the timer was expected to fire, causing drift. Also there is no allowance for lost ticks. This modification changes HPET to use the Virtual Platform Timer (VPT) and, for periodic timers, to use periodic timers. The VPT ensures an interrupt is delivered to the guest for each period that elapses, plus, its use of xen periodic timers ensures no drift.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel