[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.13] x86/amd: only call setup_force_cpu_cap for boot CPU



commit bde3b13043e31fd757c44bcec182b0ff1fe36d22
Author:     Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
AuthorDate: Mon Aug 15 16:13:54 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Aug 15 16:13:54 2022 +0200

    x86/amd: only call setup_force_cpu_cap for boot CPU
    
    This should only be called for the boot CPU to avoid calling _init code
    after it has been unloaded.
    
    Fixes: 062868a5a8b4 ("x86/amd: Work around CLFLUSH ordering on older parts")
    Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: 31b41ce858c8bd5159212d40969f8e0b7124bbf0
    master date: 2022-08-11 17:44:26 +0200
---
 xen/arch/x86/cpu/amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index e9530d581b..959790575a 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -705,7 +705,7 @@ static void init_amd(struct cpuinfo_x86 *c)
         * everything, including reads and writes to address, and
         * LFENCE/SFENCE instructions.
         */
-       if (!cpu_has_clflushopt)
+       if (c == &boot_cpu_data && !cpu_has_clflushopt)
                setup_force_cpu_cap(X86_BUG_CLFLUSH_MFENCE);
 
        switch(c->x86)
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.