kernel-ark/virt/kvm
Marcelo Tosatti d828199e84 KVM: x86: implement PVCLOCK_TSC_STABLE_BIT pvclock flag
KVM added a global variable to guarantee monotonicity in the guest.
One of the reasons for that is that the time between

	1. ktime_get_ts(&timespec);
	2. rdtscll(tsc);

Is variable. That is, given a host with stable TSC, suppose that
two VCPUs read the same time via ktime_get_ts() above.

The time required to execute 2. is not the same on those two instances
executing in different VCPUS (cache misses, interrupts...).

If the TSC value that is used by the host to interpolate when
calculating the monotonic time is the same value used to calculate
the tsc_timestamp value stored in the pvclock data structure, and
a single <system_timestamp, tsc_timestamp> tuple is visible to all
vcpus simultaneously, this problem disappears. See comment on top
of pvclock_update_vm_gtod_copy for details.

Monotonicity is then guaranteed by synchronicity of the host TSCs
and guest TSCs.

Set TSC stable pvclock flag in that case, allowing the guest to read
clock from userspace.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-11-27 23:29:13 -02:00
..
assigned-dev.c KVM: Fix device assignment threaded irq handler 2012-07-11 13:01:48 +03:00
async_pf.c KVM: do not release the error page 2012-08-06 16:04:58 +03:00
async_pf.h KVM: Halt vcpu if page it tries to access is swapped out 2011-01-12 11:21:39 +02:00
coalesced_mmio.c KVM: make checks stricter in coalesced_mmio_in_range() 2011-12-27 11:17:07 +02:00
coalesced_mmio.h KVM: Make coalesced mmio use a device per zone 2011-09-25 19:17:57 +03:00
eventfd.c KVM updates for the 3.7 merge window 2012-10-04 09:30:33 -07:00
ioapic.c KVM: x86: drop parameter validation in ioapic/pic 2012-08-14 22:35:22 -03:00
ioapic.h KVM: fix race with level interrupts 2012-07-20 16:12:00 -03:00
iodev.h KVM: remove in_range from io devices 2009-09-10 08:33:05 +03:00
iommu.c KVM: do not treat noslot pfn as a error pfn 2012-10-29 20:31:04 -02:00
irq_comm.c KVM: Add resampling irqfds for level triggered interrupts 2012-09-23 13:50:15 +02:00
Kconfig KVM: Add config to support ple or cpu relax optimzation 2012-07-23 13:00:53 +03:00
kvm_main.c KVM: x86: implement PVCLOCK_TSC_STABLE_BIT pvclock flag 2012-11-27 23:29:13 -02:00