[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0g59CvQVePgCbEsXvw5UqOcqvn-Snh3=0Jcnj=mhT_mfg@mail.gmail.com>
Date: Wed, 18 May 2016 02:50:07 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Prarit Bhargava <prarit@...hat.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Jacob Jun Pan <jacob.jun.pan@...el.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] powercap/rapl: Do not load in virtualized environments
On Tue, May 17, 2016 at 1:34 PM, Prarit Bhargava <prarit@...hat.com> wrote:
> intel_rapl is currently not supported in virtualized environments. When
> booting the warning message
>
> intel_rapl: no valid rapl domains found in package 0
You seem to be saying that this message is problematic for some
reason, so why is it?
> is output for every virtual core.
>
> This patch stops the driver from being loaded in virtual boots.
>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Cc: Jacob Jun Pan <jacob.jun.pan@...el.com>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: linux-pm@...r.kernel.org
> Signed-off-by: Prarit Bhargava <prarit@...hat.com>
> ---
> drivers/powercap/intel_rapl.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
> index f2201d42a9cd..bebfbe8acccd 100644
> --- a/drivers/powercap/intel_rapl.c
> +++ b/drivers/powercap/intel_rapl.c
> @@ -29,6 +29,7 @@
> #include <linux/sysfs.h>
> #include <linux/cpu.h>
> #include <linux/powercap.h>
> +#include <asm/hypervisor.h>
> #include <asm/iosf_mbi.h>
>
> #include <asm/processor.h>
> @@ -1600,6 +1601,10 @@ static int __init rapl_init(void)
> return -ENODEV;
> }
>
> + /* Intel RAPL is not supported on virtualized environments */
> + if (x86_hyper)
> + return -ENODEV;
> +
> rapl_defaults = (struct rapl_defaults *)id->driver_data;
>
> cpu_notifier_register_begin();
> --
Powered by blists - more mailing lists