[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] x86: Limit MSR_IA32_THERM_CONTROL and MSR_IA32_ENERGY_PERF_BIAS



>>> On 18.12.15 at 21:46, <konrad.wilk@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -2614,23 +2614,15 @@ static int emulate_privileged_op(struct cpu_user_regs 
> *regs)
>                  goto fail;
>              break;
>          case MSR_IA32_PERF_CTL:
> -            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
> -                goto fail;
> -            if ( !is_cpufreq_controller(currd) )
> -                break;
> -            if ( wrmsr_safe(regs->ecx, msr_content) != 0 )
> -                goto fail;
> -            break;
>          case MSR_IA32_THERM_CONTROL:
>          case MSR_IA32_ENERGY_PERF_BIAS:
>              if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
>                  goto fail;
> -            if ( !is_hardware_domain(currd) || !is_pinned_vcpu(v) )
> +            if ( !is_cpufreq_controller(currd) )
>                  break;

Are all three MSRs really only relevant to P-state handling? I don't
think so, and hence their accessibility shouldn't be controlled by a
P-state related conditional.

As an aside, I also think that we should do away with Dom0-driven
P-states (I don't think any Dom0 other than XenoLinux ones ever
supported this mode).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.