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 ACC4235F17D; Wed, 27 May 2026 22:50:40 +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=1779922241; cv=none; b=MN9KUb/RVlbx/feJyF0gwvhK2D+mKVOJ+lf+2qtkcFPbI4QzOiszncO032ycJkaPt5PAOy3vDWr8c98IBJAYdHOLRYoFcsVpQebPx8jO4DzJxWinVExzIm35Sa7S26Q65hOyWMp4UKS5MhqOFoh3e4fGNPEvgvXOmEguPR64SaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779922241; c=relaxed/simple; bh=rWwyGqzEcc1rl4gmeL5NkuvI/2yXQskzT3jCS38aDtI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WF0ZtPmalijuth+U+0l/dssPkzQfR2mSwLP0nfIMG47YiEpevFNeyH202HxXN0YyirMsILMzZKTXwMOB2xnKM9qdngUlVS41HCa/1xd+LjyLBQPXorvq4tx3irYW/PUhzJ8cEP44zPb4VvGfzcSlU6TZ22wAem1NPzGdKJqBZJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fhw7S3jJ; 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="fhw7S3jJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07C7B1F000E9; Wed, 27 May 2026 22:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779922240; bh=9ySTpxezoAiBFX0/7zEUiI4eNm+Oaylf4HMVPn8Ys+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fhw7S3jJcbuIlgSOp29WFGHzJGB8ddxj21QfNQC7Kt+/DuNhL3vzkfrKDOK2vHXpU 9u3VGq1FBhaFxNhXtDsHCGmQxkVUA9Ohv3lMJq9Az76x2nDOwUB6XMvehUlh9tTFoC EGh04Ya+JrGSncmzc441tVrPR6j2TzwyfIIw08LxXSPeFPEe6h/434pSvOdwDDpKsf 7oDoNQaqM5EhSla92HypgPbcuB4wUC2Nf3obbHOjWriw5lRJevLfjOdPHN4Upktnyr vdvGgOrWVDC3Yq5FtR1nZ8EZ9nncfapF6wZnVzmeAn8Aci91MUqjjSrAfcng/qGtOj ZNfnnt/SxyJXg== Date: Wed, 27 May 2026 15:50:38 -0700 From: Wei Liu To: Sean Christopherson Cc: Kiryl Shutsemau , Paolo Bonzini , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Ajay Kaher , Alexey Makhalov , Jan Kiszka , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Juergen Gross , Daniel Lezcano , Thomas Gleixner , John Stultz , Rick Edgecombe , Vitaly Kuznetsov , Broadcom internal kernel review list , Boris Ostrovsky , Stephen Boyd , x86@kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org, linux-hyperv@vger.kernel.org, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Michael Kelley , Tom Lendacky , Nikunj A Dadhania , Thomas Gleixner , David Woodhouse Subject: Re: [PATCH v3 09/41] clocksource: hyper-v: Don't save/restore TSC offset when using HV sched_clock Message-ID: <20260527225038.GG3518940@liuwe-devbox-debian-v2.local> References: <20260515191942.1892718-1-seanjc@google.com> <20260515191942.1892718-10-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260515191942.1892718-10-seanjc@google.com> On Fri, May 15, 2026 at 12:19:10PM -0700, Sean Christopherson wrote: > Now that Hyper-V overrides the sched_clock save/restore hooks if and only > sched_clock itself is set to the Hyper-V reference counter, drop the > invocation of the "old" save/restore callbacks. When the registration of > the PV sched_clock was done separately from overriding the save/restore > hooks, it was possible for Hyper-V to clobber the TSC save/restore > callbacks without actually switching to the Hyper-V refcounter. > > Enabling a PV sched_clock is a one-way street, i.e. the kernel will never > revert to using TSC for sched_clock, and so there is no need to invoke the > TSC save/restore hooks (and if there was, it belongs in common PV code). > > Reviewed-by: Michael Kelley > Tested-by: Michael Kelley > Signed-off-by: Sean Christopherson Acked-by: Wei Liu