diff --git a/xen/common/domctl.c b/xen/common/domctl.c index b34c0a112d..e43904e1ec 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -782,6 +782,12 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) break; } + /* Undo a stuck SCHED_pin_override? */ + if ( vcpuaff->flags & XEN_VCPUAFFINITY_FORCE ) + vcpu_pin_override(v, -1); + + ret = 0; + /* * We both set a new affinity and report back to the caller what * the scheduler will be effectively using. diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index a93431890c..076b1aeb3d 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -307,6 +307,9 @@ struct xen_domctl_vcpuaffinity { /* Set/get the soft affinity for vcpu */ #define _XEN_VCPUAFFINITY_SOFT 1 #define XEN_VCPUAFFINITY_SOFT (1U<<_XEN_VCPUAFFINITY_SOFT) + /* Undo SCHEDOP_pin_override */ +#define _XEN_VCPUAFFINITY_FORCE 2 +#define XEN_VCPUAFFINITY_FORCE (1U<<_XEN_VCPUAFFINITY_FORCE) uint32_t flags; /* * IN/OUT variables.