From: Andrew Cooper Subject: x86/amd: Fix DE_CFG truncation in amd_check_zenbleed() This line: val &= ~chickenbit; ends up truncating val to 32 bits, and turning off various errata workarounds in Zen2 systems. Fixes: f91c5ea97067 ("x86/amd: Mitigations for Zenbleed") Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index 3ed06f670491..df2681b7c455 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -909,8 +909,8 @@ void __init detect_zen2_null_seg_behaviour(void) void amd_check_zenbleed(void) { const struct cpu_signature *sig = &this_cpu(cpu_sig); - unsigned int good_rev, chickenbit = (1 << 9); - uint64_t val, old_val; + unsigned int good_rev; + uint64_t val, old_val, chickenbit = (1 << 9); /* * If we're virtualised, we can't do family/model checks safely, and