On 28/05/2019 13:44, Jan Beulich wrote: >>>> On 28.05.19 at 12:33, <jgr...@suse.com> wrote: >> --- a/xen/arch/x86/sysctl.c >> +++ b/xen/arch/x86/sysctl.c >> @@ -200,7 +200,8 @@ long arch_do_sysctl( >> >> case XEN_SYSCTL_CPU_HOTPLUG_SMT_ENABLE: >> case XEN_SYSCTL_CPU_HOTPLUG_SMT_DISABLE: >> - if ( !cpu_has_htt || boot_cpu_data.x86_num_siblings < 2 ) >> + if ( !cpu_has_htt || boot_cpu_data.x86_num_siblings < 2 || >> + sched_disable_smt_switching ) >> { >> ret = -EOPNOTSUPP; >> break; > > I'm not convinced -EOPNOTSUPP is an appropriate error code for > this new case. -EPERM, -EACCES, or -EIO would all seem more > appropriate to me (and perhaps there are further ones).
I think -EIO or -EBUSY would be the best fit. > >> --- a/xen/common/schedule.c >> +++ b/xen/common/schedule.c >> @@ -57,6 +57,7 @@ integer_param("sched_ratelimit_us", sched_ratelimit_us); >> >> /* Number of vcpus per struct sched_unit. */ >> static unsigned int sched_granularity = 1; >> +bool sched_disable_smt_switching; > > __read_mostly (perhaps also the pre-existing variable in context)? Yes, can do. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel