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

[Xen-changelog] [xen master] x86/cpu: Don't update this_cpu for get_cpu_vendor(, gcv_guest)



commit 291dcb4dd0140fac0e439760b4d51b2892ff9264
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Jan 3 12:55:55 2017 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jan 3 13:33:16 2017 +0000

    x86/cpu: Don't update this_cpu for get_cpu_vendor(, gcv_guest)
    
    Otherwise booting a cross-vendor guest would cause PCPU hotplug to
    malfunction, because of trying to use the wrong CPU driver.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/cpu/common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index a89cf07..537ad35 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -166,7 +166,8 @@ int get_cpu_vendor(const char v[], enum get_cpu_vendor mode)
                        if (!strcmp(v,cpu_devs[i]->c_ident[0]) ||
                            (cpu_devs[i]->c_ident[1] && 
                             !strcmp(v,cpu_devs[i]->c_ident[1]))) {
-                               this_cpu = cpu_devs[i];
+                               if (mode == gcv_host)
+                                       this_cpu = cpu_devs[i];
                                return i;
                        }
                }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.