From nobody Mon Aug 24 21:43:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=infradead.org ARC-Seal: i=1; a=rsa-sha256; t=1783113767; cv=none; d=zohomail.com; s=zohoarc; b=jNOPbX2vZBes+ZTNDR8+GY33La8xMWzf1BlfHCXdokozDiEkb7s4nMBjdGC/wuWdUljPSsFgfORIA3x5f3F8nYY95y//vx3+Hj89YRcY4P1QxiqLdYNjtRLffJ5WcxFxS9zuWSyZB8AYCNvRCYvSxDT35xbVnInE+oKQB9iyjXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783113767; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JGip5OQmCNyYBe2RKNqtANSbVWKYmHi+8pzbH2BRHSA=; b=K9At2qdmIVdPtjXGK3TGcKX4wfa1CRgg7DrFpgVIhJ8GmSrrl+dCPzCq/0rUu1tshCkX7PYJ86IZTcDiC/Dmt8j75iStYqDi1QvGI18Q3dKUot2YETG2q1ROtkJzZZIKa45nKh1fmGmAtiUKTEPEFH3J6zY379jqATpjPI0DL08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1783113767619897.6997149564402; Fri, 3 Jul 2026 14:22:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1353756.1609501 (Exim 4.92) (envelope-from ) id 1wflKq-0006Is-JK; Fri, 03 Jul 2026 21:22:08 +0000 Received: by outflank-mailman (output) from mailman id 1353756.1609501; Fri, 03 Jul 2026 21:22:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wflKq-0006H8-7Z; Fri, 03 Jul 2026 21:22:08 +0000 Received: by outflank-mailman (input) for mailman id 1353756; Fri, 03 Jul 2026 21:22:06 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wflKo-0005Xr-HM for xen-devel@lists.xenproject.org; Fri, 03 Jul 2026 21:22:06 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wflKn-00BEX7-GE; Fri, 03 Jul 2026 23:22:05 +0200 Received: from [10.42.69.11] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a4827be-5cb7-0a2a0a5109dd-0a2a450bcf44-20 for ; Fri, 03 Jul 2026 23:22:05 +0200 Received: from [90.155.50.34] (helo=casper.infradead.org) by tlsNG-42698a.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a4827f8-ac48-0a2a450b0019-5a9b3222e674-3 for ; Fri, 03 Jul 2026 23:22:00 +0200 Received: from [2001:8b0:10b:1::425] (helo=i7.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wflKW-0000000AsXx-09Ii; Fri, 03 Jul 2026 21:21:48 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.99.2 #2 (Red Hat Linux)) id 1wflKV-00000001RNx-3z0C; Fri, 03 Jul 2026 22:21:47 +0100 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=casper.20170209 header.d=infradead.org header.i="@infradead.org" header.h="Sender:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description; bh=JGip5OQmCNyYBe2RKNqtANSbVWKYmHi+8pzbH2BRHSA=; b=K/OjjdcT6O/cygwEuqkom8qloZ C+OSPUx10ymjhW/V1tZF78Q5nJxxW2QjPYLriE1GdGwSREYz44Tw3TsyTe82NSqCWM4lhGivf38wg 9D4xJ62zrzNbRoTxpSRpCCvI1dys9Fy/vhBI//h1vnhNBgX8NhQ4YfneO8qb7VoE7Wc2qbmTreVVa GCneIJ/+04IgHesf0fEdF7QfFZ4qvRcVRcQeGwt1frRTnHVzA3JdKed2mpPaZI/LW7m4axN8dohsQ eqIh5yx6j6F7xOtPZxM5z3JlqseV4oJ+7+jG5Og0yXJOI4I7gubsrk0nQ/3NxYg95+n+OLVBYJeVh wxION8tA==; From: David Woodhouse To: Paolo Bonzini , Jonathan Corbet , Shuah Khan , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Vitaly Kuznetsov , Juergen Gross , Boris Ostrovsky , David Woodhouse , Paul Durrant , Jonathan Cameron , Sascha Bischoff , Marc Zyngier , Joey Gouly , Jack Allister , Dongli Zhang , joe.jin@oracle.com, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-kselftest@vger.kernel.org Subject: [PATCH v6 03/36] UAPI: x86: Move pvclock-abi to UAPI for x86 platforms Date: Fri, 3 Jul 2026 22:17:42 +0100 Message-ID: <20260703212145.343527-4-dwmw2@infradead.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260703212145.343527-1-dwmw2@infradead.org> References: <20260703212145.343527-1-dwmw2@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-purgate-ID: tlsNG-42698a/1783113725-A5B20220-C70E66EA/0/0 X-purgate-type: clean X-purgate-size: 3570 X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1783113768541158500 Content-Type: text/plain; charset="utf-8" From: Jack Allister 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 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Tested-by: Dongli Zhang --- MAINTAINERS | 4 +-- arch/x86/include/{ =3D> uapi}/asm/pvclock-abi.h | 27 ++++++++++--------- scripts/xen-hypercalls.sh | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) rename arch/x86/include/{ =3D> uapi}/asm/pvclock-abi.h (82%) diff --git a/MAINTAINERS b/MAINTAINERS index 905c29fe4996..057ccef8d1fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14420,7 +14420,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 @@ -29105,7 +29105,7 @@ R: Boris Ostrovsky L: xen-devel@lists.xenproject.org (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 + #ifndef __ASSEMBLER__ =20 /* @@ -24,20 +27,20 @@ */ =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 */ =20 struct pvclock_wall_clock { - u32 version; - u32 sec; - u32 nsec; + __u32 version; + __u32 sec; + __u32 nsec; } __attribute__((__packed__)); =20 #define PVCLOCK_TSC_STABLE_BIT (1 << 0) diff --git a/scripts/xen-hypercalls.sh b/scripts/xen-hypercalls.sh index f18b00843df3..51a722198997 100755 --- a/scripts/xen-hypercalls.sh +++ b/scripts/xen-hypercalls.sh @@ -5,7 +5,7 @@ shift in=3D"$@" =20 for i in $in; do - eval $CPP $LINUXINCLUDE -dD -imacros "$i" -x c /dev/null + eval $CPP -D__KERNEL__ $LINUXINCLUDE -dD -imacros "$i" -x c /dev/null done | \ awk '$1 =3D=3D "#define" && $2 ~ /__HYPERVISOR_[a-z][a-z_0-9]*/ { v[$3] = =3D $2 } END { print "/* auto-generated by scripts/xen-hypercall.sh */" --=20 2.54.0