xen/domain: Introduce domain_teardown()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 Sep 2020 17:14:53 +0000 (18:14 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 22 Dec 2020 14:31:34 +0000 (14:31 +0000)
commit98d4d6d8a6329ea3a8dcf8aab65acdd70c6397fc
tree95ab516f97f7a3fb2c9a8b9ff6054efbebb884e9
parent8dfeef47947929ad8de85140d391640744d9aead
xen/domain: Introduce domain_teardown()

There is no common equivelent of domain_reliquish_resources(), which has
caused various pieces of common cleanup to live in inappropriate
places.

Perhaps most obviously, evtchn_destroy() is called for every continuation of
domain_reliquish_resources(), which can easily be thousands of times.

Create domain_teardown() to be a new top level facility, and call it from the
appropriate positions in domain_kill() and domain_create()'s error path.  The
intention is for this to supersede domain_reliquish_resources() in due course.

No change in behaviour yet.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c
xen/include/xen/sched.h