Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

[SOLVED] Safe access to MSR IA32_PRED_CMD

CyrIng
Novice
1,989 Views

Hello,

In the SDM, the MSR IA32_PRED_CMD (0x49) can be read if CPUID(EAX=07H, ECX=0):EDX[26] equals 1

For example, processor Xeon W3690 of architecture Westmere/Gulftown, microcode version 31, is capable of IBRS & IBPB, according to the EDX register of CPUID leave 7. However, reading the MSR 0x49 will immediately crash processor [whereas MSR IA32_SPEC_CTRL (0x48) works as specified]

FYI, same issue has been encountered with a i7-6700 Skylake processor

 

Question: what are the discriminant bits to safely read the MSR IA32_PRED_CMD ?

 

Thank you

Cyril

0 Kudos
4 Replies
CyrIng
Novice
1,989 Views

Registers MSR_IA32_PRED_CMD and MSR_IA32_FLUSH_CMD are write-only

0 Kudos
McCalpinJohn
Honored Contributor III
1,989 Views

What kind of crash do you mean?  (Cleverly not testing this myself, just in case....)

0 Kudos
CyrIng
Novice
1,989 Views

My driver was seg-faulting because reading this MSR. I fixed it by writing only the register. 

0 Kudos
McCalpinJohn
Honored Contributor III
1,989 Views

Thanks!  That sounds like the normal fault condition for a non-readable MSR (or for writing to any bits of an MSR that is not writable).  

I thought that Intel had configured the "write-only" MSRs to be readable (returning zero), but apparently not all of them!

0 Kudos
Reply