Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1439740 > unrolled thread

[PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate

Started byJan Kiszka <jan.kiszka@siemens.com>
First post2016-07-08 20:50 +0200
Last post2016-07-10 05:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in  core_get_max_pstate Jan Kiszka <jan.kiszka@siemens.com> - 2016-07-08 20:50 +0200
    Re: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in  core_get_max_pstate Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-07-08 21:50 +0200
      Re: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-07-09 02:50 +0200
        Re: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in  core_get_max_pstate Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-07-10 05:50 +0200

#1439740 — [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate

FromJan Kiszka <jan.kiszka@siemens.com>
Date2016-07-08 20:50 +0200
Subject[PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate
Message-ID<rSJ0B-5b-3@gated-at.bofh.it>
If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.

Found while running over the Jailhouse hypervisor which became upset
about this strange MSR index.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 drivers/cpufreq/intel_pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 1fa1a32..1b15917 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -944,7 +944,7 @@ static int core_get_max_pstate(void)
 			if (err)
 				goto skip_tar;
 
-			tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
+			tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl & 0x3);
 			err = rdmsrl_safe(tdp_msr, &tdp_ratio);
 			if (err)
 				goto skip_tar;
-- 
2.1.4

[toc] | [next] | [standalone]


#1439764

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-07-08 21:50 +0200
Message-ID<rSJWF-Gh-11@gated-at.bofh.it>
In reply to#1439740
On Fri, 2016-07-08 at 20:42 +0200, Jan Kiszka wrote:
> If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
> MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.
> 
> Found while running over the Jailhouse hypervisor which became upset
> about this strange MSR index.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/cpufreq/intel_pstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index 1fa1a32..1b15917 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -944,7 +944,7 @@ static int core_get_max_pstate(void)
>  			if (err)
>  				goto skip_tar;
>  
> -			tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
> +			tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl
> & 0x3);
>  			err = rdmsrl_safe(tdp_msr, &tdp_ratio);
>  			if (err)
>  				goto skip_tar;

[toc] | [prev] | [next] | [standalone]


#1439859 — Re: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2016-07-09 02:50 +0200
SubjectRe: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate
Message-ID<rSOCZ-3U2-1@gated-at.bofh.it>
In reply to#1439764
On Friday, July 08, 2016 12:39:07 PM Srinivas Pandruvada wrote:
> On Fri, 2016-07-08 at 20:42 +0200, Jan Kiszka wrote:
> > If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
> > MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.
> > 
> > Found while running over the Jailhouse hypervisor which became upset
> > about this strange MSR index.
> > 
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

OK

Should this go into stable?  Which series if so?

Thanks,
Rafael

[toc] | [prev] | [next] | [standalone]


#1440026

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-07-10 05:50 +0200
Message-ID<rTdUJ-3GE-3@gated-at.bofh.it>
In reply to#1439859
On Sat, 2016-07-09 at 02:45 +0200, Rafael J. Wysocki wrote:
> On Friday, July 08, 2016 12:39:07 PM Srinivas Pandruvada wrote:
> > On Fri, 2016-07-08 at 20:42 +0200, Jan Kiszka wrote:
> > > If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address
> > > some
> > > MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.
> > > 
> > > Found while running over the Jailhouse hypervisor which became
> > > upset
> > > about this strange MSR index.
> > > 
> > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> 
> OK
> 
> Should this go into stable?
Better to mark for stable tree 4.4+

Thanks,
Srinivas

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web