Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
15 Views

How many MSRs can I use

Hi All,

I successfully write event information to MSRs from 0x186 to 0x189. However, I found it returns error starting from address 0x18a.

The CPU I'm using is Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz. I check the developer manual and search online, but find nothing.

Does anyone know how many MSRs can I use? It seems only 4 for my CPU?

Thanks in advance.

0 Kudos
2 Replies
Highlighted
New Contributor III
15 Views

This is documented in Chapter 18 of the Intel developer manual Volume 3. For your Skylake processor, see Table 18-33. There are 8 general-purpose registers per core. If hyperthreading is enabled, then they are statically partitioned evenly between the two threads of the same core, i.e., each thread has 4 counter registers. So the last valid counter MSR is 0x189. This is probably why you're not able to write beyond 0x189. If hyperthreading is disabled, all of the 8 registers are available and so you can address up to MSR 0x18D on each core. Note that if you want to do full-width (48-bit) writes, you have to use the aliasing MSRs starting at 0x4C1.

0 Kudos
Highlighted
Beginner
15 Views

Thank you so much. It makes sense since hyperthreading is enable in my Linux. I will read the related part you mentioned. Thanks again.

 

0 Kudos