[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 03/30] UAPI: x86: Move pvclock-abi to UAPI for x86 platforms



From: Jack Allister <jalliste@xxxxxxxxxx>

A subsequent commit will provide a new KVM interface for performing a
fixup/correction of the KVM clock against the reference TSC. The
KVM_[GS]ET_CLOCK_GUEST API requires a pvclock_vcpu_time_info, as such
the caller must know about this definition.

Move the definition to the UAPI folder so that it is exported to
usermode and also change the type definitions to use the standard for
UAPI exports.

Signed-off-by: Jack Allister <jalliste@xxxxxxxxxx>
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
Reviewed-by: Paul Durrant <paul@xxxxxxx>
---
 MAINTAINERS                                   |  4 +--
 arch/x86/include/{ => uapi}/asm/pvclock-abi.h | 27 ++++++++++---------
 2 files changed, 17 insertions(+), 14 deletions(-)
 rename arch/x86/include/{ => uapi}/asm/pvclock-abi.h (82%)

diff --git a/MAINTAINERS b/MAINTAINERS
index e0b307b2108c..e49676955c0c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14406,7 +14406,7 @@ S:      Supported
 T:     git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
 F:     arch/um/include/asm/kvm_para.h
 F:     arch/x86/include/asm/kvm_para.h
-F:     arch/x86/include/asm/pvclock-abi.h
+F:     arch/x86/include/uapi/asm/pvclock-abi.h
 F:     arch/x86/include/uapi/asm/kvm_para.h
 F:     arch/x86/kernel/kvm.c
 F:     arch/x86/kernel/kvmclock.c
@@ -29087,7 +29087,7 @@ R:      Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
 L:     xen-devel@xxxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
 S:     Supported
 F:     arch/x86/configs/xen.config
-F:     arch/x86/include/asm/pvclock-abi.h
+F:     arch/x86/include/uapi/asm/pvclock-abi.h
 F:     arch/x86/include/asm/xen/
 F:     arch/x86/platform/pvh/
 F:     arch/x86/xen/
diff --git a/arch/x86/include/asm/pvclock-abi.h 
b/arch/x86/include/uapi/asm/pvclock-abi.h
similarity index 82%
rename from arch/x86/include/asm/pvclock-abi.h
rename to arch/x86/include/uapi/asm/pvclock-abi.h
index b9fece5fc96d..6d70cf640362 100644
--- a/arch/x86/include/asm/pvclock-abi.h
+++ b/arch/x86/include/uapi/asm/pvclock-abi.h
@@ -1,6 +1,9 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_PVCLOCK_ABI_H
 #define _ASM_X86_PVCLOCK_ABI_H
+
+#include <linux/types.h>
+
 #ifndef __ASSEMBLER__
 
 /*
@@ -24,20 +27,20 @@
  */
 
 struct pvclock_vcpu_time_info {
-       u32   version;
-       u32   pad0;
-       u64   tsc_timestamp;
-       u64   system_time;
-       u32   tsc_to_system_mul;
-       s8    tsc_shift;
-       u8    flags;
-       u8    pad[2];
+       __u32   version;
+       __u32   pad0;
+       __u64   tsc_timestamp;
+       __u64   system_time;
+       __u32   tsc_to_system_mul;
+       __s8    tsc_shift;
+       __u8    flags;
+       __u8    pad[2];
 } __attribute__((__packed__)); /* 32 bytes */
 
 struct pvclock_wall_clock {
-       u32   version;
-       u32   sec;
-       u32   nsec;
+       __u32   version;
+       __u32   sec;
+       __u32   nsec;
 } __attribute__((__packed__));
 
 #define PVCLOCK_TSC_STABLE_BIT (1 << 0)
-- 
2.51.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.