From: Roger Pau Monne Date: Wed, 17 Jan 2018 09:20:05 +0000 (+0000) Subject: xen/pvshim: identity pin shim vCPUs to pCPUs X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~750 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c9c71e4124b00d33d89aa95527b32527cee5198f;p=xen.git xen/pvshim: identity pin shim vCPUs to pCPUs Since VCPUOP_{up/down} already identity maps vCPU hotplug to pCPU hotplug also identity pin the vCPUs to the pCPUs in the scheduler. This prevents vCPU migration and should improve performance. While there also use __cpumask_set_cpu instead of cpumask_set_cpu, there's no need to use the locked variant. Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 17cb1272c1..555660b853 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -140,9 +140,8 @@ struct vcpu *__init dom0_setup_vcpu(struct domain *d, { if ( pv_shim ) { - - cpumask_setall(v->cpu_hard_affinity); - cpumask_setall(v->cpu_soft_affinity); + __cpumask_set_cpu(vcpu_id, v->cpu_hard_affinity); + __cpumask_set_cpu(vcpu_id, v->cpu_soft_affinity); } else {