linux/arch/x86/kvm
Marcelo Tosatti 53f658b3c3 KVM: VMX: initialize TSC offset relative to vm creation time
VMX initializes the TSC offset for each vcpu at different times, and
also reinitializes it for vcpus other than 0 on APIC SIPI message.

This bug causes the TSC's to appear unsynchronized in the guest, even if
the host is good.

Older Linux kernels don't handle the situation very well, so
gettimeofday is likely to go backwards in time:

http://www.mail-archive.com/kvm@vger.kernel.org/msg02955.html
http://sourceforge.net/tracker/index.php?func=detail&aid=2025534&group_id=180599&atid=893831

Fix it by initializating the offset of each vcpu relative to vm creation
time, and moving it from vmx_vcpu_reset to vmx_vcpu_setup, out of the
APIC MP init path.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2009-03-24 11:02:53 +02:00
..
Kconfig KVM: Require the PCI subsystem 2008-11-11 20:56:13 +02:00
Makefile KVM: change KVM to use IOMMU API 2009-01-03 14:11:07 +01:00
i8254.c KVM: PIT: fix i8254 pending count read 2009-02-15 02:47:36 +02:00
i8254.h KVM: Fix guest shared interrupt with in-kernel irqchip 2008-10-28 14:21:34 +02:00
i8259.c KVM: Add locking to virtual i8259 interrupt controller 2008-12-31 16:55:48 +02:00
irq.c KVM: x86: fix LAPIC pending count calculation 2009-02-15 02:47:38 +02:00
irq.h KVM: x86: fix LAPIC pending count calculation 2009-02-15 02:47:38 +02:00
kvm_cache_regs.h KVM: x86: accessors for guest registers 2008-10-15 10:13:57 +02:00
kvm_svm.h KVM: x86: Virtualize debug registers 2009-03-24 11:02:49 +02:00
lapic.c KVM: x86: fix LAPIC pending count calculation 2009-02-15 02:47:38 +02:00
lapic.h KVM: x86: fix LAPIC pending count calculation 2009-02-15 02:47:38 +02:00
mmu.c KVM: MMU: Drop walk_shadow() 2009-03-24 11:02:53 +02:00
mmu.h KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
paging_tmpl.h KVM: MMU: Replace walk_shadow() by for_each_shadow_entry() in invlpg() 2009-03-24 11:02:53 +02:00
svm.c KVM: x86: Wire-up hardware breakpoints for guest debugging 2009-03-24 11:02:50 +02:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: initialize TSC offset relative to vm creation time 2009-03-24 11:02:53 +02:00
x86.c KVM: VMX: initialize TSC offset relative to vm creation time 2009-03-24 11:02:53 +02:00
x86.h KVM: Add a pending interrupt queue 2008-10-15 10:15:13 +02:00
x86_emulate.c KVM: Fix vmload and friends misinterpreted as lidt 2009-03-24 11:02:51 +02:00