Bug 1563834

Summary: Missing msr kernel module
Product: [Fedora] Fedora Reporter: bryanhoop
Component: msr-toolsAssignee: Greg Bailey <gbailey>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: gbailey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-11 02:14:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bryanhoop 2018-04-04 20:32:46 UTC
Description of problem:
msr-tools does not contain the corresponding msr kernel module so values cannot be written using wrmsr

Version-Release number of selected component (if applicable):
1.3

Steps to Reproduce:
1. install msr-tools
2. attempt to write (for example) an msr offset: sudo wrmsr 0x150 0x80000011ecc00000

Actual results: wrmsr: pwrite: Operation not permitted

Expected results: value written

Additional info: the msr kernel module necessary to write values is missing from the package/distro:

lsmod| grep msr (returns nothing)

Comment 1 Greg Bailey 2018-07-06 13:13:00 UTC
Kernels built for Fedora (and RHEL / CentOS) appear to have the msr module compiled directly into the kernel as opposed to being built as a separate module:

[root@localhost ~]# grep CONFIG_X86_MSR /boot/config-4.16.3-301.fc28.x86_64 
CONFIG_X86_MSR=y

Because of the above, I'm not aware of any need for any separate module to be loaded, as the msr interface is already available:

[root@localhost ~]# ls -l /dev/cpu/0/msr 
crw-------. 1 root root 202, 0 Jul  6 12:40 /dev/cpu/0/msr

Comment 2 bryanhoop 2018-07-11 02:13:58 UTC
>sudo wrmsr 0x150 0x80000011F9A00000
wrmsr: pwrite: Operation not permitted

Based on googling, the error thrown was the same as when the msr module was missing. Based on your information I did some further research and found that by default the msr module does not play nicely with secure boot:

https://github.com/intel/intel-cmt-cat/wiki/UEFI-Secure-Boot-Compatibility


Looks like that was the issue all along.