aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi/asm
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2017-01-24 15:09:39 -0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-02-07 18:16:45 +0100
commit55dd00a73a518281bc846dc5de1a718349431eb2 (patch)
tree13c912f125578744049bf28902e26e5e30b57b66 /arch/x86/include/uapi/asm
parent6342c50ad12e8ce0736e722184a7dbdea4a3477f (diff)
KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall
Add a hypercall to retrieve the host realtime clock and the TSC value used to calculate that clock read. Used to implement clock synchronization between host and guest. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/uapi/asm')
-rw-r--r--arch/x86/include/uapi/asm/kvm_para.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h
index 1421a6585126..cff0bb6556f8 100644
--- a/arch/x86/include/uapi/asm/kvm_para.h
+++ b/arch/x86/include/uapi/asm/kvm_para.h
@@ -50,6 +50,15 @@ struct kvm_steal_time {
__u32 pad[11];
};
+#define KVM_CLOCK_PAIRING_WALLCLOCK 0
+struct kvm_clock_pairing {
+ __s64 sec;
+ __s64 nsec;
+ __u64 tsc;
+ __u32 flags;
+ __u32 pad[9];
+};
+
#define KVM_STEAL_ALIGNMENT_BITS 5
#define KVM_STEAL_VALID_BITS ((-1ULL << (KVM_STEAL_ALIGNMENT_BITS + 1)))
#define KVM_STEAL_RESERVED_MASK (((1 << KVM_STEAL_ALIGNMENT_BITS) - 1 ) << 1)

Privacy Policy