xen: sched: deal with vCPUs being or becoming online or offline
authorDario Faggioli <dfaggioli@suse.com>
Mon, 5 Aug 2019 10:50:55 +0000 (11:50 +0100)
committerPatchew Importer <importer@patchew.org>
Mon, 5 Aug 2019 10:50:55 +0000 (11:50 +0100)
commitd545f1d6c2519a183ed631cfca7aff0baf29fde5
tree4a4fb4b96c496088b0d1701a7dedab426fb17cf1
parenta397471278a7838962f57e4c460582c9c836d1b9
xen: sched: deal with vCPUs being or becoming online or offline

If a vCPU is, or is going, offline we want it to be neither
assigned to a pCPU, nor in the wait list, so:
- if an offline vcpu is inserted (or migrated) it must not
  go on a pCPU, nor in the wait list;
- if an offline vcpu is removed, we are sure that it is
  neither on a pCPU nor in the wait list already, so we
  should just bail, avoiding doing any further action;
- if a vCPU goes offline we need to remove it either from
  its pCPU or from the wait list.

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Message-Id: <156412235656.2385.13861979113936528474.stgit@Palanthas>
xen/common/sched_null.c