【问题标题】:wrmsr operation not permitted exception?wrmsr 操作不允许异常?
【发布时间】:2017-11-05 20:44:27
【问题描述】:

我正在研究 msr 寄存器以操纵处理器频率,从而为我们的 HPC 系统研究项目之一节省电力。我做了以下工作:

[root@test/msr-tools-master]# ./rdmsr 410 -0
0000000000000000

我们想使用 Intel 在 Github 上提供的 msr-tools-master 代码进行修改。我们做了以下工作:

[root@test/msr-tools-master]# ./wrmsr 410 -p 0 0x0000000000000012
wrmsr: pwrite: Operation not permitted

我们的操作系统为:

Centos 7 (x86_64)
Kernel : 3.10.0-514.21.1.el7.x86_64

处理器详细信息:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 78
model name  : Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
stepping    : 3
microcode   : 0x9e
cpu MHz     : 400.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1
bogomips    : 5184.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

我们尝试了以下调试,但没有成功:

modprobe msr;
setcap CAP_SYS_RAWIO=ep wrmsr 

这些是文件权限:

crw-------. 1 root root 202, 0 Jun  5 09:11 /dev/cpu/0/msr
-rwxr-xr-x. 1 root root 13776 Jun  2 11:16 wrmsr

现在我们被困住了。非常感谢任何帮助。

谢谢。

【问题讨论】:

  • 你解决过这个问题吗?谢谢
  • 控制处理器频率以节省电量 - 您可能需要grep . /sys/devices/system/cpu/cpufreq/policy[0-9]*/energy_performance_preferencesudo sh -c 'for i in /sys/devices/system/cpu/cpufreq/policy[0-9]*/energy_performance_preference;do echo balance_performance > "$i";done' 而不是手动编写 MSR。或patchwork.kernel.org/project/linux-pm/patch/… 显然通过/sys/devices/system/cpu/cpu*/power/energy_perf_bias 进行更细粒度的调整

标签: intel processor msr


【解决方案1】:

尝试在 bios 中禁用 SecureBoot

【讨论】:

  • 还有其他方法吗?我开启了安全启动,MSR 模块已签名并加载,但我仍然收到权限错误。一个答案here 建议为可执行文件设置权限,但这对我不起作用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多