Re: [RFC][PATCH 7/9] x86/tsc: Provide sched_clock_noinstr()

Peter Zijlstra
2023-05-12T06:01:49Z

On Thu, May 11, 2023 at 11:11:07PM +0000, Michael Kelley (LINUX) wrote:
> From: Peter Zijlstra <peterz@infradead.org> Sent: Thursday, May 11, 2023 1:24 PM

> > > Tianyu and Michael, what's your thought on this?
> > >
> > > Is the MSR-based GHCB usable at this point?
> > >
> > > What other clock source can be used?
> >
> > You do have TSC support -- which is what I fixed for you. It's just the
> > whole MSR thing that is comically broken.
> >
> > You could do a read_hv_clock_msr() implementation using
> > __rdmsr() and add some sanity checking that anything GHCB using (SEV?)
> > *will* use TSC.
> >
> > Anyway, will you guys do that, or should I pull out the chainsaw and fix
> > it for you?
>
> Peter -- I'll work on a fix. But it will be the first half of next week before
> I can do it.

OK, Thanks!