mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen/domain: Initialise the domain handle before inserting into the domlist
As soon as the the domain is in the domlist, it can be queried via various means, ahead of being fully constructed. Ensure it has the toolstack-given UUID prior to becoming visible. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
12f1af2e8f
commit
1ce968d960
1 file changed
+2
-1
+2
-1
@@ -901,6 +901,8 @@ struct domain *domain_create(domid_t domid,
|
||||
*/
|
||||
ASSERT(config);
|
||||
|
||||
memcpy(d->handle, config->handle, sizeof(d->handle));
|
||||
|
||||
#ifdef CONFIG_HAS_PIRQ
|
||||
if ( !is_hardware_domain(d) )
|
||||
d->nr_pirqs = nr_static_irqs + extra_domU_irqs;
|
||||
@@ -962,7 +964,6 @@ struct domain *domain_create(domid_t domid,
|
||||
domlist_insert(d);
|
||||
|
||||
domain_changed_state(d);
|
||||
memcpy(d->handle, config->handle, sizeof(d->handle));
|
||||
|
||||
return d;
|
||||
|
||||
|
||||