On Thu, 2016-03-03 at 17:48 +0100, Juergen Gross wrote: > Some hardware (e.g. Dell studio 1555 laptops) require SMIs to be > called on physical cpu 0 only. Linux drivers like dcdbas or i8k try > to achieve this by pinning the running thread to cpu 0, but in Dom0 > this is not enough: the vcpu must be pinned to physical cpu 0 via > Xen, too. > > Add a stable hypercall option SCHEDOP_pin_override to the sched_op > hypercall to achieve this. It is taking a physical cpu number as > parameter. If pinning is possible (the calling domain has the > privilege to make the call and the cpu is available in the domain's > cpupool) the calling vcpu is pinned to the specified cpu. > I would have added the "and the cpu is available in the domain's cpupool" part in the comment in public headers too, such as: > --- a/xen/include/public/sched.h > +++ b/xen/include/public/sched.h > @@ -118,6 +118,17 @@ >   * With id != 0 and timeout != 0, poke watchdog timer and set new > timeout. >   */ >  #define SCHEDOP_watchdog    6 > + > +/* > + * Override the current vcpu affinity by pinning it to one physical > cpu or undo > + * this override restoring the previous affinity. > + * @arg == pointer to sched_pin_override_t structure. > + * > + * A negative pcpu value will undo a previous pin override and > restore the > + * previous cpu affinity. > + * This call is allowed for the hardware domain only. ", and succeeds only if the specified cpu is available in the domain's cpupool." > + */ > +#define SCHEDOP_pin_override 7 >  /* ` } */ >   >  struct sched_shutdown { > In any case, the scheduling part is: Acked-by: Dario Faggioli Regards, Dario -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)