Re: [PATCH] x86/rapl: Do not load in a guest

From: Ingo Molnar
Date: Fri Dec 04 2015 - 02:42:52 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> From: Borislav Petkov <bp@xxxxxxx>
>
> 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.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/