On 11/08/2022 11:30, Ross Lagerwall wrote: >> From: Andrew Cooper <andrew.coop...@citrix.com> >> Sent: Thursday, August 11, 2022 11:21 AM >> To: Ross Lagerwall <ross.lagerw...@citrix.com>; >> xen-devel@lists.xenproject.org <xen-devel@lists.xenproject.org> >> Cc: Jan Beulich <jbeul...@suse.com>; Roger Pau Monne <roger....@citrix.com>; >> Wei Liu <w...@xen.org> >> Subject: Re: [PATCH] x86/cpu: Drop _init from *_cpu_cap functions >> >> On 11/08/2022 11:17, Ross Lagerwall wrote: >>> These functions may be called by init_amd() after the _init functions >>> have been purged during CPU hotplug or PV shim boot so drop the _init. >>> >>> Signed-off-by: Ross Lagerwall <ross.lagerw...@citrix.com> >> Hmm. That's a bug in init_amd() I'd say. These really shouldn't be >> used after __init. >> >> Which path exploded specifically? > The stack trace was: > > setup_force_cpu_cap > init_amd > identify_cpu > start_secondary > > In setup_force_cpu_cap() here: > > /* > * On pre-CLFLUSHOPT AMD CPUs, CLFLUSH is weakly ordered with > * everything, including reads and writes to address, and > * LFENCE/SFENCE instructions. > */ > if (!cpu_has_clflushopt) > setup_force_cpu_cap(X86_BUG_CLFLUSH_MFENCE); > > which was recently introduced by: > > commit 062868a5a8b428b85db589fa9a6d6e43969ffeb9 > Author: Andrew Cooper <andrew.coop...@citrix.com> > Date: Thu Jun 9 14:23:07 2022 +0200 > > x86/amd: Work around CLFLUSH ordering on older parts
Bah, and that was also backported in a security fix, to everything back to 4.12 is broken. > Should the fix rather be to guard that call with "if (c == &boot_cpu_data > ..." ? Yes please. Sorry. ~Andrew