kernel-hacking-2024-linux-s.../arch
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
..
alpha missing exports of csum_... 2007-07-17 11:01:07 -07:00
arm csb337 supports "new style" rtc-ds1307 2007-07-17 10:23:09 -07:00
arm26 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
avr32 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
blackfin Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging 2007-07-12 14:55:05 +08:00
cris PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
frv serial: add early_serial_setup() back to header file 2007-07-18 08:38:22 -07:00
h8300 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
i386 xen: time implementation 2007-07-18 08:47:43 -07:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-07-17 11:31:57 -07:00
m32r PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
m68k missing exports of csum_... 2007-07-17 11:01:07 -07:00
m68knommu PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
mips serial: add early_serial_setup() back to header file 2007-07-18 08:38:22 -07:00
parisc kallsyms: make KSYM_NAME_LEN include space for trailing '\0' 2007-07-17 10:23:03 -07:00
powerpc Cell: Draw SPE helper penguin logos 2007-07-17 10:23:13 -07:00
ppc serial: add early_serial_setup() back to header file 2007-07-18 08:38:22 -07:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2007-07-17 15:29:33 -07:00
sh PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
sh64 missing exports of csum_... 2007-07-17 11:01:07 -07:00
sparc sparc32 has working dma-mapping only with CONFIG_PCI 2007-07-17 11:01:07 -07:00
sparc64 [SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn(). 2007-07-17 14:37:54 -07:00
um um_kmalloc() remnants 2007-07-17 11:01:07 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 usermodehelper: Tidy up waiting 2007-07-18 08:47:40 -07:00
xtensa PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00