From: Andrew Cooper Date: Tue, 3 Jan 2017 12:55:55 +0000 (+0000) Subject: x86/cpu: Don't update this_cpu for get_cpu_vendor(, gcv_guest) X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3067 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=291dcb4dd0140fac0e439760b4d51b2892ff9264;p=xen.git 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 Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index a89cf0763e..537ad356ad 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; } }