goldstone77 :
juanrga :
goldstone77 :
juanrga :
So branch prediction is only disabled on AMD CPUs.
Only parts of it are disable not all of it.
The patch is pretty clear: "This new firmware disables branch prediction on AMD family 17h processor"
So it disables branch prediction, not parts of it.
I think your taking the statement too literal. To completely disable it would cause a serious impact on performance.
Edit: To test this theory ask anyone who has the windows 10 patch installed on a Ryzen system.
It is really not clear what they actually did.
I went through the whole list of changes in the Kernels and I found this:
- x86/CPU/AMD: Add speculative control support for AMD (bsc#1068032).
- x86/CPU/AMD: Make the LFENCE instruction serialized (bsc#1068032).
- x86/CPU/AMD: Remove now unused definition of MFENCE_RDTSC feature
(bsc#1068032).
- x86/CPU: Check speculation control CPUID bit (bsc#1068032).
- x86/enter: Add macros to set/clear IBRS and set IBPB (bsc#1068032).
- x86/entry: Add a function to overwrite the RSB (bsc#1068032).
- x86/entry: Stuff RSB for entry to kernel for non-SMEP platform
(bsc#1068032).
- x86/entry: Use IBRS on entry to kernel space (bsc#1068032).
- x86/feature: Enable the x86 feature to control Speculation (bsc#1068032).
Juan is right they outright say they disabled the branch predictor (indirect? are there 2 types in Zen?), but the actual details in the kernel changes list does not say that explicitly. Quite the contrary: they added speculative control support for AMD. Is that basically to allow programs to know if they can use it or not?