Page MenuHomeFreeBSD

Align IA32_ARCH_CAP MSR definitions and use with SDM rev. 068.
ClosedPublic

Authored by kib on Nov 16 2018, 10:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 9:52 PM
Unknown Object (File)
Feb 13 2024, 7:31 PM
Unknown Object (File)
Jan 16 2024, 8:22 AM
Unknown Object (File)
Dec 19 2023, 11:40 PM
Unknown Object (File)
Dec 13 2023, 12:15 AM
Unknown Object (File)
Nov 17 2023, 2:41 PM
Unknown Object (File)
Oct 13 2023, 6:18 PM
Unknown Object (File)
Oct 13 2023, 5:04 AM
Subscribers

Details

Summary

SDM rev. 068 was released yesterday and it contains the description of the MSR 0x10a IA32_ARCH_CAP. This change adds symbolic definitions for all bits present in the document, and decode them in the CPU identification lines printed on boot.

But also, the document defines SSB_NO as bit 4, while FreeBSD used but 2 to detect the need to work-around Speculative Store Bypass issue. Which one is correct ? I changed code to use the bit from SDM.

Similarly, the document describes bit 3 as an indicator that L1TF issue is not present, in particular, no L1D flush is needed on VMENTRY. We used RDCL_NO to avoid flushing, and again I changed the code to follow new spec from SDM.

In fact my Apollo Lake machine with latest ucode shows this:

IA32_ARCH_CAPS=0x19<RDCL_NO,SKIP_L1DFL_VME,SSB_NO>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I asked for clarification and hopefully, I will have some by the end of the day. My understanding is that RDCL_NO still determines whether or not you need to mitigate L1TF type vulnerabilities.

When SSB_NO is set, RDCL_NO should always also be set (I don't think anything today actually will have SSB_NO). But perhaps that was the source of confusion?

I am not certain why there is a mistake of bit4 vs. bit2. I'll get to the bottom of it.

Can you please identify where the docs say

Similarly, the document describes bit 4 as an indicator that L1TF issue is not present, in particular, no L1D flush is needed on VMENTRY. We used RDCL_NO to avoid flushing, and again I changed the code to follow new spec from SDM.

I see no mention of this bit, otherwise the patch is correct.

This revision is now accepted and ready to land.Nov 16 2018, 7:54 PM

Talked with Kostik offline. Patch should say bit 3 instead of 4 for VM entry. Patch itself is correct.

This revision was automatically updated to reflect the committed changes.