From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 025EE3AFD1D; Fri, 29 May 2026 20:00:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780084816; cv=none; b=hR58/vH4viKLHQ9PiiOSSJK4wfvr1dqWARgPx88/aIydNQB4Zo4OSMNK3JbX5Yd1lOKE/Zh0W4StnIEJWXuvPzyAkW4PGtjs8jr6CiZrYLBcmFcnbKc9P8s3dAahafwQIcpL1FfrOHw3buAazWzJpKIqVDCQ5NOQ79X1uI+ViSg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780084816; c=relaxed/simple; bh=0d9RszKQ5ulW58jHf7D5TV+rJ/8l3Yc/0M72KLCVNI4=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=t2MDQ3Y+Bq5CvU97qOMJnRB81PghlfVDrHvTddxtbYjxEvys0Ei1LR89hiePGVkTJ1X1goQoN3VeIQVGmbObNoeoX4OhYCRYpNOcif6qZYkyjfwWubKRoA1C8yUmypPz97YCQ1011Kgxm8R+JEsjvgAuWFw0FxOG/3CQONNXpRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gjmMmw6q; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gjmMmw6q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D4541F00893; Fri, 29 May 2026 20:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780084814; bh=Qf8paJy4cCr3FX3U9NzV2imouySCZRszPEy7aqG40WU=; h=Date:From:To:Cc:Subject:References; b=gjmMmw6qGV7+Acyr7NUqTziVKS5F3FLQvtEfICyo2FepMlINoOQUL+6bMjgapGII0 X2KbiKPL/+pXaTEoJ2nIVdhUjxHs2wfWMsFZepXvK3JHtT5uyK2BW+/n7uAazqwWTJ LLHpa1z8+g9/A9AA70wuAfqHw4UOhwFHmIQoC7zb4ZOOquvZNggbANYJUrp3ZrMYgT sTmqCaoKr+2OTf+pAG9ER8wMwQ4eqXDbhx5glRvni2ZyilJA9CW7rDO6C23WRu1KZB xbrzki1aMg6343o3MRBHAGmBlE3TAFY8nRqe4/ckhd46aOn/Z47QywnZz2zYZzNofR a5+jMIYDAeUjw== Date: Fri, 29 May 2026 22:00:12 +0200 Message-ID: <20260529195557.225399927@kernel.org> User-Agent: quilt/0.69 From: Thomas Gleixner To: LKML Cc: David Woodhouse , Miroslav Lichvar , John Stultz , Stephen Boyd , Anna-Maria Behnsen , Frederic Weisbecker , thomas.weissschuh@linutronix.de, Arthur Kiyanovski , Rodolfo Giometti , Vincent Donnefort , Marc Zyngier , Oliver Upton , kvmarm@lists.linux.dev, Oliver Upton , Richard Cochran , netdev@vger.kernel.org, Takashi Iwai , Miri Korenblit , Johannes Berg , Jacob Keller , Tony Nguyen , Saeed Mahameed , Peter Hilber , "Michael S. Tsirkin" , virtualization@lists.linux.dev, linux-wireless@vger.kernel.org, linux-sound@vger.kernel.org, David Woodhouse , Vadim Fedorenko Subject: [patch V2 06/25] KVM: arm64: Use ktime_get_snapshot_id() to snapshot CLOCK_REALTIME References: <20260529193435.921555544@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: Thomas Gleixner ktime_get_snapshot() is replaced by ktime_get_snapshot_id() which allows to request a particular CLOCK ID to be captured along with the clocksource counter. Convert the usage in kvm_get_ptp_time() over and use the new system_time_snapshot::systime field, which holds the system timestamp selected by the CLOCK ID argument. No functional change intended. Signed-off-by: Thomas Gleixner Tested-by: Arthur Kiyanovski Reviewed-by: David Woodhouse Reviewed-by: Thomas Weißschuh Reviewed-by: Jacob Keller Acked-by: Marc Zyngier --- arch/arm64/kvm/hypercalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm64/kvm/hypercalls.c +++ b/arch/arm64/kvm/hypercalls.c @@ -28,7 +28,7 @@ static void kvm_ptp_get_time(struct kvm_ * system time and counter value must captured at the same * time to keep consistency and precision. */ - ktime_get_snapshot(&systime_snapshot); + ktime_get_snapshot_id(CLOCK_REALTIME, &systime_snapshot); /* * This is only valid if the current clocksource is the @@ -61,8 +61,8 @@ static void kvm_ptp_get_time(struct kvm_ * in the future (about 292 years from 1970, and at that stage * nobody will give a damn about it). */ - val[0] = upper_32_bits(systime_snapshot.real); - val[1] = lower_32_bits(systime_snapshot.real); + val[0] = upper_32_bits(systime_snapshot.systime); + val[1] = lower_32_bits(systime_snapshot.systime); val[2] = upper_32_bits(cycles); val[3] = lower_32_bits(cycles); }