Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pvclock-abi.h
Go to the documentation of this file.
1 /*
2  * same structure to x86's
3  * Hopefully asm-x86/pvclock-abi.h would be moved to somewhere more generic.
4  * For now, define same duplicated definitions.
5  */
6 
7 #ifndef _ASM_IA64__PVCLOCK_ABI_H
8 #define _ASM_IA64__PVCLOCK_ABI_H
9 #ifndef __ASSEMBLY__
10 
11 /*
12  * These structs MUST NOT be changed.
13  * They are the ABI between hypervisor and guest OS.
14  * Both Xen and KVM are using this.
15  *
16  * pvclock_vcpu_time_info holds the system time and the tsc timestamp
17  * of the last update. So the guest can use the tsc delta to get a
18  * more precise system time. There is one per virtual cpu.
19  *
20  * pvclock_wall_clock references the point in time when the system
21  * time was zero (usually boot time), thus the guest calculates the
22  * current wall clock by adding the system time.
23  *
24  * Protocol for the "version" fields is: hypervisor raises it (making
25  * it uneven) before it starts updating the fields and raises it again
26  * (making it even) when it is done. Thus the guest can make sure the
27  * time values it got are consistent by checking the version before
28  * and after reading them.
29  */
30 
32  u32 version;
33  u32 pad0;
37  s8 tsc_shift;
38  u8 pad[3];
39 } __attribute__((__packed__)); /* 32 bytes */
40 
45 } __attribute__((__packed__));
46 
47 #endif /* __ASSEMBLY__ */
48 #endif /* _ASM_IA64__PVCLOCK_ABI_H */