mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/amd: Fix inverted condition in zenbleed_use_chickenbit()
The identified commit inverted the condition under which Xen chooses to set the Zenbleed chickenbit. Undo that, and leave a better comment explaining why. Found by AI review of the referenced commit. This is XSA-515 / CVE-2026-79608. Fixes:d0c75dc4c0("x86/amd: Fix race editing DE_CFG") Assisted-by: Sashiko + Opus 5.0 Reported-by: George Dunlap <dunlapg@umich.edu> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> (cherry picked from commit0c5ec39d91)
This commit is contained in:
1 parent
41d194bf86
commit
d3dbd1d604
1 file changed
+6
-1
@@ -926,7 +926,12 @@ static bool zenbleed_use_chickenbit(void)
|
||||
return is_zen2_uarch();
|
||||
}
|
||||
|
||||
return (uint8_t)curr_rev >= fixed_rev;
|
||||
/*
|
||||
* Zenbleed can be mitigated by disabling Floating-Point
|
||||
* Mov-Elimination, but this is expensive. Only do so when we
|
||||
* don't have a fix in microcode.
|
||||
*/
|
||||
return (uint8_t)curr_rev < fixed_rev;
|
||||
}
|
||||
|
||||
void amd_init_de_cfg(const struct cpuinfo_x86 *c)
|
||||
|
||||