summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/utils.h
diff options
context:
space:
mode:
authorHaiyang Zhang2010-05-05 21:23:46 +0200
committerGreg Kroah-Hartman2010-05-11 20:36:15 +0200
commit39c4e9c37894feb1525fac4bb75e8c919042473b (patch)
tree4378aabc1d7319eedc703d2adb53c4e368bffc7a /drivers/staging/hv/utils.h
parentStaging: hv: Channel.c: fix up compiler warning (diff)
downloadkernel-qcow2-linux-39c4e9c37894feb1525fac4bb75e8c919042473b.tar.gz
kernel-qcow2-linux-39c4e9c37894feb1525fac4bb75e8c919042473b.tar.xz
kernel-qcow2-linux-39c4e9c37894feb1525fac4bb75e8c919042473b.zip
Staging: hv: Add Time Sync feature to hv_utils module.
The Time Sync feature synchronizes guest time to host UTC time after reboot, and restore from saved/paused state. Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/utils.h')
-rw-r--r--drivers/staging/hv/utils.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/staging/hv/utils.h b/drivers/staging/hv/utils.h
index e404b21e9af2..d1d2f282dd9b 100644
--- a/drivers/staging/hv/utils.h
+++ b/drivers/staging/hv/utils.h
@@ -75,7 +75,30 @@ struct shutdown_msg_data {
u8 display_message[2048];
} __attribute__((packed));
-#define HV_SHUTDOWN_MSG 0
+
+/* Time Sync IC defs */
+#define ICTIMESYNCFLAG_PROBE 0
+#define ICTIMESYNCFLAG_SYNC 1
+#define ICTIMESYNCFLAG_SAMPLE 2
+
+#ifdef __x86_64__
+#define WLTIMEDELTA 116444736000000000L /* in 100ns unit */
+#else
+#define WLTIMEDELTA 116444736000000000LL
+#endif
+
+typedef u64 winfiletime_t; /* Windows FILETIME type */
+
+struct ictimesync_data{
+ winfiletime_t parenttime;
+ winfiletime_t childtime;
+ winfiletime_t roundtriptime;
+ u8 flags;
+} __attribute__((packed));
+
+/* Index for each IC struct in array hv_cb_utils[] */
+#define HV_SHUTDOWN_MSG 0
+#define HV_TIMESYNC_MSG 1
struct hyperv_service_callback {
u8 msg_type;