From patchwork Mon Apr 23 08:04:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 133976 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp707947lji; Mon, 23 Apr 2018 01:06:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/nIQmznPhe/SePoyyFBnQJm7d1Cmd2iIDjJszcoJZ0BTUMOnm1DS9gKtQesEtx10K8P3m/ X-Received: by 10.101.86.203 with SMTP id w11mr7282321pgs.176.1524470761938; Mon, 23 Apr 2018 01:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524470761; cv=none; d=google.com; s=arc-20160816; b=CsNf5RcBame1hQtr25N4+NZ+wcm3fDSAejM9VHzMx/MM4KAMCxpcIpMTthMuCXcWtv lKCDkIQKo01P862ktMtluOtvTGDMkyPSLLorTrCPt3TgDp3grLjEyMH+FR53z5KA1TvC QvbW7O45wdOwo0H95WK360WAZ5XIfbOW11t47aglYAaBFMX4o+naT/qRw8xRntJkzaxS jPb3j3qfKYZ4BgsDj4SYMaGenJnEdW6bdZumXKRgRsFYSgfUivCYOrE8Sk5h6iGvfuy8 Q5t2hgc1QkrRU6I3Bh+kWUNM+W00JJwlmP2LvDHqOn5fhbwI5XPEuuV8uyCy7tFtj+La sASw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yKLg9gDl+7xnK/nd6Se6ychMCEliWJg4om/lkakzNG4=; b=UcBNnz4OxKuA8yGOZzNZ4U5rKbHmrlWdb5U5YS14QTtDyVYAdNk/VIDwgGWKYZLYUq VmqHOV6FRZcSYBuyWv+BQr2oRZQXU5kZQlvdIskVC/aNVj9PCuOEoneX7IK23mtOW7el aDfsRhIbYXnuTTb9T0RzXtNEL1ti77cgmEYEsqGoKKX3QMwIlw1AQNvxvK2Eytonv+79 05QoRKJPm5QlXKIbbT9gGLuCK4nRICfLNZPXMOdQXqojNFPU8TVZLAj5/voSguLOCMxW dJnGVX1T9SU9ZyoTXDa2P3fM//jKw0o9Rh7XLjS3MUW5w/2bzbHYu4ibChpg+S9QflNe wpig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x64si7849459pff.196.2018.04.23.01.06.01; Mon, 23 Apr 2018 01:06:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754237AbeDWIF4 (ORCPT + 29 others); Mon, 23 Apr 2018 04:05:56 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:52701 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbeDWIFx (ORCPT ); Mon, 23 Apr 2018 04:05:53 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LcgwZ-1ejCGK2171-00k5Qv; Mon, 23 Apr 2018 10:05:15 +0200 From: Arnd Bergmann To: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [RESEND] KVM: x86: use timespec64 for KVM_HC_CLOCK_PAIRING Date: Mon, 23 Apr 2018 10:04:26 +0200 Message-Id: <20180423080512.1614520-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:qv2vviUhSJ/fJDEihO9m+rlRZf7wod8efxdcrvfrNvYnweN3G+J ovKLKEjuzPiK1CSZ7DvSr3VG6anwI21T4+Ht8xIt7y6UW9y+1VclYSna821QQKWoVw9xPMC SAlge54zvTlubOk5/4QpyCUgNiBYaFcEwPUtotwwVtO0iRHLqddrKBYtIH1WY4Go+GnL6NF JbI4T0ks7NCETFuD8vmQw== X-UI-Out-Filterresults: notjunk:1; V01:K0:duqV5tNnCtA=:uvTtFl1LuujZI0F3iRZxh+ H2K5qOpzZdJv2gtyenJT10S/lvUdjEBO7Y0ur5mqbpkaDLRsGwM0gIBVDpw+RLFU5Np4krzVx osdAecD0e/x8IFub/tlXouePewX/3n8xscU364RGds58guuXLUO36jv3CMsTfdIGKPww0HrRa saH5Q3zFOJkMQu+hrFZT9hBH9JS5JVNOjQsR6GSsz0IrHG6Cql/EjPNKR/9i5ye+EKczf2joL juCU03few0CZP3Btm2/8FBZQHW0ArA5XnZDneOrhRFFyduOPO8oARzlJUKeauMUQ5btVylgGH Ege1pjIlf3uxqrlWCt+llaFCqx3xhqHH2da7FDJPTa6/NRgEGOCCv8ImyiHzNWTW/iyr27l6h LW6zeJpvkPmZFkPjnmEpLTyc9jOcIP7MFB66DrVcYaHDB8q7TNBVB/6MDzBM6FhBS1EZ9X8hy l9lLCvMFSPZHSc7kqGg1oCE7SwzoH4rNvNBxVxTwOsqnA/OFiv8L4k6t4OPB7IkpxmGdVNOUm YaF/TGqCMOUIsTtg8FBSL6oPyCM8AgmxQuhiteeRQVQz6dM9fstaRFk14c6V9poPpkgXM3AJs o1imzMmE2naW3cFZtoSU3EqqAVf5EnhVCGqZMYHAVuCI+YFn4mXuuY8qx/xKGwOceflLphv85 PaO/SNT++4qo4Mz+S4IvbnWAHI57EQkUqFtmn0wr0abfu4ZNFIb6cDsgw7xM5QYbuwpaWnpcW c/Cgt0nM1HCgzQZ29VUaLkTa0YfeB3/fsu454g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hypercall was added using a struct timespec based implementation, but we should not use timespec in new code. This changes it to timespec64. There is no functional change here since the implementation is only used in 64-bit kernels that use the same definition for timespec and timespec64. Fixes: 55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall") Signed-off-by: Arnd Bergmann --- I originally sent this in October, but got no reply. The patch is still required for the overall cleanup of 'timespec' uses in the kernel, please apply. --- arch/x86/kvm/x86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b2ff74b12ec4..961ee64cb137 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1755,7 +1755,7 @@ static int do_monotonic_boot(s64 *t, u64 *tsc_timestamp) return mode; } -static int do_realtime(struct timespec *ts, u64 *tsc_timestamp) +static int do_realtime(struct timespec64 *ts, u64 *tsc_timestamp) { struct pvclock_gtod_data *gtod = &pvclock_gtod_data; unsigned long seq; @@ -1788,7 +1788,7 @@ static bool kvm_get_time_and_clockread(s64 *kernel_ns, u64 *tsc_timestamp) } /* returns true if host is using TSC based clocksource */ -static bool kvm_get_walltime_and_clockread(struct timespec *ts, +static bool kvm_get_walltime_and_clockread(struct timespec64 *ts, u64 *tsc_timestamp) { /* checked again under seqlock below */ @@ -6610,7 +6610,7 @@ static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr, unsigned long clock_type) { struct kvm_clock_pairing clock_pairing; - struct timespec ts; + struct timespec64 ts; u64 cycle; int ret;