lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 03/11] perf/x86: Add support for TSC in nanoseconds as a perf event clock
On Mon, Mar 07, 2022 at 02:36:03PM +0200, Adrian Hunter wrote:

> > diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
> > index 4420499f7bb4..a1f179ed39bf 100644
> > --- a/arch/x86/kernel/paravirt.c
> > +++ b/arch/x86/kernel/paravirt.c
> > @@ -145,6 +145,15 @@ DEFINE_STATIC_CALL(pv_sched_clock, native_sched_clock);
> >
> > void paravirt_set_sched_clock(u64 (*func)(void))
> > {
> > + /*
> > + * Anything with ART on promises to have sane TSC, otherwise the whole
> > + * ART thing is useless. In order to make ART useful for guests, we
> > + * should continue to use the TSC. As such, ignore any paravirt
> > + * muckery.
> > + */
> > + if (cpu_feature_enabled(X86_FEATURE_ART))
>
> Does not seem to work because the feature X86_FEATURE_ART does not seem to get set.
> Possibly because detect_art() excludes anything running on a hypervisor.

Simple enough to delete that clause I suppose. Christopher, what is
needed to make that go away? I suppose the guest needs to be aware of
the active TSC scaling parameters to make it work ?

\
 
 \ /
  Last update: 2022-03-07 15:43    [W:0.085 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site