Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp95102lqp; Tue, 21 May 2024 20:22:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+1M8gugXzXuLj+NRT7NnJcZ+nTNUozyWcHLC7aspyRhEzbFQowGEvdQDpjMgMJJqI3DnMzhnFCRoDh1uy8LXgTiYXwd0T2iaQsZ6E7g== X-Google-Smtp-Source: AGHT+IEsvO2okwPnDVGH9UN7ZNY26NFAOIxsKyt3GFbgULgqAeKHn7zKRmLzWWO49bVrph+s+t1g X-Received: by 2002:a05:6512:ba9:b0:524:34ad:ba77 with SMTP id 2adb3069b0e04-526becaa329mr343234e87.12.1716348177691; Tue, 21 May 2024 20:22:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716348177; cv=pass; d=google.com; s=arc-20160816; b=M8aje9RCh2wNQOlxnV8uIwN+UWbrH1mX9drc3bYm/Do+eW9qm1bes6ffOyiy4yHbBi 0W6ReoYeq8bTmuRj3I/ArVdEffvS57GdXWwPRaz0KEOBqt8W0fCT40P+JaLgAhfZQ+oU 7SdVH51KPfnTcg6JZIfH8wGxf9jQ8XhphcYoz5eWxRNUNd3k9Al8qJoLqNzifBI3oHWa h7N/2WMLnNsNQlW1xncheL1Gc1SvkDwtCl70F0C8VEkMsG2/6Tl1t2IFfNHCtMEOV7wz 9GwCvtV+DyjSpEPzAUlBzgX/iEPeMjpo/rt9LN3G/agzRnJ0xNCrU96/1olzAMHD2Hyr /AEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3iG35o3GASCZuBv/55TMrv8RjQ1ZC8tBTVusKcrNnms=; fh=cHbBeIcWPXug0itFmRfudfa44WmtKnJkoGAOtdzsqoA=; b=INLsUgpRSR4o+Dxy+k3fxpU3KubfXiAl2gCWc7HJ3EFlBZQQYRh8GN0fLePLhdl4ub XHWWPOfhs2HVFZhiR3BnqBnN7pWAFiE3RvFuY0uvXAhQeLs7ArLna5x+Ahf46OyVfbl+ kGh2G7NW8jgSUKwEb5S3FdqXR4liCn5dxeD2JiVDkmV++RA6Qj7bk2/tbldDC4Mf+jvB 2eCO3b8AEXZmBOsNzfA/404KVRX10BVUCFp3wI2HVQ16z1Lmqq/Epk17FY9jyUlRa9pA oIxTAiC5xTkLNhRDaMjfh+pEPy0A5PqJaBQtv6wN8J2/OQc8NWfxmiRHq5Y6gSpQPWHE 0yWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hnxOqT9d; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-185543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185543-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3782c1si15121022a12.640.2024.05.21.20.22.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:22:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hnxOqT9d; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-185543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185543-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 58EC91F22D15 for ; Wed, 22 May 2024 00:19:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 555A317C95; Wed, 22 May 2024 00:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hnxOqT9d" Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F3CB17E9; Wed, 22 May 2024 00:18:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716337116; cv=none; b=RUhg9dqVtkVcF+squ2m/jOolFwbKtuBXsaEGiB/XLgFCCoqWgf6DUpApvSbs0j3mJhq2V8VqOg5uYh+1K3RAgE3yaWnqnZ3cvpaMijNSqkQq3OFa4pACwNrtDVcWych/KRmJ2/FcNBr5MncY/q5I5k9+Mp1Ujp3Ju/uTsausLrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716337116; c=relaxed/simple; bh=4+ySHrVqNAVjzmKO0VNksE6sM4Tx/NojuQOCdJda0EE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tjeaHgXaRPmpDLdebsSl837Lcx9xgYyvnNriO6jSmVL3tgdbwgacVnXQP96f1f1RbMa33tb4pCNhxRghlca6S4RoKD9PZhZDAr7ucpEazsD+Xd5qJ2hOwZnIP86rjDxfnYDTQ6qvwd/BsiaqzOj/iKratyU+QSSFcV0dVO58QAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=desiato.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=hnxOqT9d; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=desiato.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=3iG35o3GASCZuBv/55TMrv8RjQ1ZC8tBTVusKcrNnms=; b=hnxOqT9d6IyP4YNoxAgcMutYfu S9HwtO2+Hq4NHDYg4U2bsaQ9Z5wKTleg+PEoHO9144hw71wf60uP8hcKthQxCSDgu/JzxtufalgZg +yCtx3slTk8slSJTTQAE/45/6sa0Lcwc4h0MBY/0PlNujOIvdqwAFhsXySsACxjR13aCO85Akj0p4 x87qQQWZsdEwnrUsS90PGgg40UOL3IqEHs+CS8sZH0kwT1UfJu1N7OIM+tD0LRgct022d//FFHXUF HM9qIEd/K4iRqKec8y5PLe3zgeyKMQP9feRJ/4mpTaVnZXf0JKa4fwWcBVvu5y/VdBfK+sPX562rw CLSXH8BA==; Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by desiato.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9ZgS-000000080jH-3p2P; Wed, 22 May 2024 00:18:23 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9ZgR-00000002b4Q-2hfk; Wed, 22 May 2024 01:18:19 +0100 From: David Woodhouse To: kvm@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Paul Durrant , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Shuah Khan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, jalliste@amazon.co.uk, sveith@amazon.de, zide.chen@intel.com, Dongli Zhang , Chenyi Qiang Subject: [RFC PATCH v3 04/21] UAPI: x86: Move pvclock-abi to UAPI for x86 platforms Date: Wed, 22 May 2024 01:16:59 +0100 Message-ID: <20240522001817.619072-5-dwmw2@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240522001817.619072-1-dwmw2@infradead.org> References: <20240522001817.619072-1-dwmw2@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by desiato.infradead.org. See http://www.infradead.org/rpr.html From: Jack Allister 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 Signed-off-by: David Woodhouse --- arch/x86/include/{ => uapi}/asm/pvclock-abi.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename arch/x86/include/{ => uapi}/asm/pvclock-abi.h (83%) diff --git a/arch/x86/include/asm/pvclock-abi.h b/arch/x86/include/uapi/asm/pvclock-abi.h similarity index 83% rename from arch/x86/include/asm/pvclock-abi.h rename to arch/x86/include/uapi/asm/pvclock-abi.h index 1436226efe3e..48cc53f62dd6 100644 --- a/arch/x86/include/asm/pvclock-abi.h +++ b/arch/x86/include/uapi/asm/pvclock-abi.h @@ -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__ @@ -24,20 +24,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.44.0