]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
UAPI: x86: Move pvclock-abi to UAPI for x86 platforms
authorJack Allister <jalliste@amazon.com>
Sun, 21 Apr 2024 15:21:16 +0000 (15:21 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 22 May 2024 00:05:31 +0000 (17:05 -0700)
KVM provides a new 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@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/include/uapi/asm/pvclock-abi.h [moved from arch/x86/include/asm/pvclock-abi.h with 83% similarity]

similarity index 83%
rename from arch/x86/include/asm/pvclock-abi.h
rename to arch/x86/include/uapi/asm/pvclock-abi.h
index 1436226efe3ef86ead2839af9ea966b38a25c69e..48cc53f62dd634abd31c81ca46745c7d0cd33b1e 100644 (file)
@@ -1,4 +1,4 @@
-/* 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
 #ifndef __ASSEMBLY__
  */
 
 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)