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

[Xen-changelog] [xen master] x86/AMD: unbreak CPU hotplug on AMD systems without RstrFpErrPtrs



commit 0f3cdbdf7a7f33952121a5bde02cae2b3f703f67
Author:     Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
AuthorDate: Tue Dec 10 11:07:22 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 10 11:07:22 2019 +0100

    x86/AMD: unbreak CPU hotplug on AMD systems without RstrFpErrPtrs
    
    If the feature is not present Xen will try to force X86_BUG_FPU_PTRS
    feature at CPU identification time. This is especially noticeable in
    PV-shim that usually hotplugs its vCPUs. We either need to restrict this
    action for boot CPU only or allow secondary CPUs to modify
    forced CPU capabilities at runtime. Choose the former since modifying
    forced capabilities out of boot path leaves the system in potentially
    inconsistent state.
    
    Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 fec2830c6a..8b5f0f2e4c 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -583,7 +583,7 @@ static void init_amd(struct cpuinfo_x86 *c)
         * Older AMD CPUs don't save/load FOP/FIP/FDP unless an FPU exception
         * is pending.  Xen works around this at (F)XRSTOR time.
         */
-       if (!cpu_has(c, X86_FEATURE_RSTR_FP_ERR_PTRS))
+       if (c == &boot_cpu_data && !cpu_has(c, X86_FEATURE_RSTR_FP_ERR_PTRS))
                setup_force_cpu_cap(X86_BUG_FPU_PTRS);
 
        /*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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