android_kernel_samsung_msm8976/arch/i386/xen
Jeremy Fitzhardinge 15c84731d6 xen: time implementation
Xen maintains a base clock which measures nanoseconds since system
boot.  This is provided to guests via a shared page which contains a
base time in ns, a tsc timestamp at that point and tsc frequency
parameters.  Guests can compute the current time by reading the tsc
and using it to extrapolate the current time from the basetime.  The
hypervisor makes sure that the frequency parameters are updated
regularly, paricularly if the tsc changes rate or stops.

This is implemented as a clocksource, so the interface to the rest of
the kernel is a simple clocksource which simply returns the current
time directly in nanoseconds.

Xen also provides a simple timer mechanism, which allows a timeout to
be set in the future.  When that time arrives, a timer event is sent
to the guest.  There are two timer interfaces:
 - An old one which also delivers a stream of (unused) ticks at 100Hz,
   and on the same event, the actual timer events.  The 100Hz ticks
   cause a lot of spurious wakeups, but are basically harmless.
 - The new timer interface doesn't have the 100Hz ticks, and can also
   fail if the specified time is in the past.

This code presents the Xen timer as a clockevent driver, and uses the
new interface by preference.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
2007-07-18 08:47:43 -07:00
..
enlighten.c xen: time implementation 2007-07-18 08:47:43 -07:00
events.c xen: event channels 2007-07-18 08:47:42 -07:00
features.c xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
Makefile xen: time implementation 2007-07-18 08:47:43 -07:00
mmu.c xen: virtual mmu 2007-07-18 08:47:42 -07:00
mmu.h xen: virtual mmu 2007-07-18 08:47:42 -07:00
multicalls.c xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
multicalls.h xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
setup.c xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
time.c xen: time implementation 2007-07-18 08:47:43 -07:00
xen-head.S xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
xen-ops.h xen: Core Xen implementation 2007-07-18 08:47:42 -07:00