Re: [kvm-devel] windows acpi time drift

2008-03-19 Thread Avi Kivity
Dor Laor wrote: > On Wed, 2008-03-19 at 17:39 +0200, Avi Kivity wrote: > >> Anthony Liguori wrote: >> >>> Avi Kivity wrote: >>> The fourth is probably impossible from userspace (and very difficult in the kernel). >>> What makes it impossible to do in usersp

Re: [kvm-devel] windows acpi time drift

2008-03-19 Thread Dor Laor
On Wed, 2008-03-19 at 17:39 +0200, Avi Kivity wrote: > Anthony Liguori wrote: > > Avi Kivity wrote: > >> The fourth is probably impossible from userspace (and very > >> difficult in the kernel). > > > > What makes it impossible to do in userspace? If you managed a > > tsc_offset in userspace,

Re: [kvm-devel] windows acpi time drift

2008-03-19 Thread Avi Kivity
Anthony Liguori wrote: > Avi Kivity wrote: >> The fourth is probably impossible from userspace (and very >> difficult in the kernel). > > What makes it impossible to do in userspace? If you managed a > tsc_offset in userspace, you would of course need to adjust that > tsc_offset within the ke

Re: [kvm-devel] windows acpi time drift

2008-03-19 Thread Anthony Liguori
Avi Kivity wrote: > The fourth is probably impossible from userspace (and very difficult > in the kernel). What makes it impossible to do in userspace? If you managed a tsc_offset in userspace, you would of course need to adjust that tsc_offset within the kernel for the particular PCPU that

Re: [kvm-devel] windows acpi time drift

2008-03-19 Thread Avi Kivity
Anthony Liguori wrote: > Why don't we just introduce a vm-ioctl interface for a one-shot > programmable timer? It could be programmed in userspace, and when it > fires, we can drop down to userspace with a special exit code. We could > then introduce an interrupt queuing mechanism in the kerne

Re: [kvm-devel] windows acpi time drift

2008-03-18 Thread Anthony Liguori
Dor Laor wrote: > 2. The other option is to have an accurate userspace timer (userspace > hrtimer exist >= 2.6.24) and to add interface to pic/apic to queue > pending irqs by the pit/rtc. > The pending queue can be a simple atomic counter per irq. > So this may explain why I see no appreciable

Re: [kvm-devel] windows acpi time drift

2008-03-18 Thread Anthony Liguori
Dor Laor wrote: > On Wed, 2008-03-19 at 01:09 +0200, Dor Laor wrote: > >> After some research of time drift while using window windows acpi hal I >> discovered it uses the ... rtc timer as a source clock. >> Not the apic, acpi nor the pit. The acpi timer is not used by the time >> keeping clock

Re: [kvm-devel] windows acpi time drift

2008-03-18 Thread Anthony Liguori
Dor Laor wrote: > After some research of time drift while using window windows acpi hal I > discovered it uses the ... rtc timer as a source clock. > Not the apic, acpi nor the pit. The acpi timer is not used by the time > keeping clock, the apic & pit timer irqs are masked. > > In order to fix th

Re: [kvm-devel] windows acpi time drift

2008-03-18 Thread Dor Laor
On Wed, 2008-03-19 at 01:09 +0200, Dor Laor wrote: > After some research of time drift while using window windows acpi hal I > discovered it uses the ... rtc timer as a source clock. > Not the apic, acpi nor the pit. The acpi timer is not used by the time > keeping clock, the apic & pit timer irq

[kvm-devel] windows acpi time drift

2008-03-18 Thread Dor Laor
After some research of time drift while using window windows acpi hal I discovered it uses the ... rtc timer as a source clock. Not the apic, acpi nor the pit. The acpi timer is not used by the time keeping clock, the apic & pit timer irqs are masked. In order to fix the time drift we need to fix