This presentation was given at Kernel/VM Tokyo No.16. In this talk, I first introduced MSR basics, and how to explore the MSR space. I compared two different CPU MSR spaces in two settings by visualizing the spaces.
registers to con fi gure the system. • As the name indicates, most of the MSRs are implementation de fi ned. • MSRs have own address space (MSR address space). • Use rdmsr/wrmsr to read/write an MSR.
of behaviors on reading an unsupported MSR: • Generates general purpose exception (#GP(0)). [1] • Default behavior for unimplemented MSR access. • Returns all-zeros or all-ones • For backward-compatibility, such as used by already deleted features.
CPU have more valid MSRs than an old one. • Compare MSR spaces of two Intel CPUs: • i7-7700K: 7th Gen. (Q1’17) [2] • i9-13900K: 13th Gen. (Q4’22) [3] • Visualize the MSR spaces (with ChatGPT Code Interpreter) • https://github.com/retrage/msr-explorer
joint venture with the municipal government of Shanghai to found Zhaoxin” [4] • KX-6640MA: (Q2’19) [5] • 4C/[email protected] • Modern CPU spec. ZhaoXin (ஹਊ)
CPU: A Newer CPU have more valid MSRs than an old one. • ZhaoXin CPU has Intel VT-x extension, but the MSR space di ff ers. • Looking for a VIA CPU to compare with ZhaoXin CPU. • Published Tool: https://github.com/retrage/msr-explorer
in speci fi ed range. • Read /dev/cpu/CPUNUM/msr on Linux and dump as JSON. • https://github.com/retrage/msr-explorer • MSR Address Range: [0x0000-0x1 ff f] • To cover all the IA-32 architectural MSRs [1]