lkml.org 
[lkml]   [2015]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/rapl: Do not load in a guest
On Fri, Dec 04, 2015 at 08:42:06AM +0100, Ingo Molnar wrote:
>
> * Borislav Petkov <bp@alien8.de> wrote:
>
> > From: Borislav Petkov <bp@suse.de>
> >
> > qemu/kvm doesn't support RAPL and RAPL doesn't have a CPUID feature bit
> > so check whether we're in a guest instead.
>
> So when a hypervisor starts supporting RAPL we'll disable the driver erroneously?
>
> Isn't there any better method to detect RAPL support?
>
> So in particular in drivers/powercap/intel_rapl.c there's an enumerated list of
> CPU models, which is used via a x86_match_cpu() call. That's still not ideal (it
> does not work on hypervisors for example), but even better would be to detect RAPL
> support in some other fashion, that does not rely on us statically enumerating CPU
> models that support it.

RAPL isn't enumerated, the best we could do is attempt to write to one
of the writable MSRs and see if that 'works'.

Also, yuck @ powercap/intel_rapl.c for doing rdmsr_on_cpu() +
wrmsr_on_cpu() all over the place.


\
 
 \ /
  Last update: 2015-12-04 10:01    [W:0.130 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site