]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86/cpu: Don't update this_cpu for get_cpu_vendor(, gcv_guest)
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jan 2017 08:52:19 +0000 (09:52 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:52:19 +0000 (09:52 +0100)
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@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 291dcb4dd0140fac0e439760b4d51b2892ff9264
master date: 2017-01-03 13:33:16 +0000

xen/arch/x86/cpu/common.c

index 1d78ab4d8468ef5a8102e0a60c15170d4c658c41..b5da94a3e5b32ddb7c1c4502c574ff44a49938f4 100644 (file)
@@ -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;
                        }
                }