On 2025-04-08 02:37, Jan Beulich wrote:
On 07.04.2025 21:40, Jason Andryuk wrote:
From: "Daniel P. Smith" <dpsm...@apertussolutions.com>

Add and use a new internal create domain flag to specify the hardware
domain.  This removes the hardcoding of domid 0 as the hardware domain.

This allows more flexibility with domain creation.

The assignment of d->cdf is moved later so CDF_hardware is added for the
late_hwdom case.  Also old_hwdom has the flag removed to reflect the
change.

Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
Signed-off-by: Jason Andryuk <jason.andr...@amd.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
i.e. ...

Thanks.

---
v4:
Move d->cdf assignment later

... despite my earlier concern this movement looks fine to me.

Double checking today, I see that in the failure case, hardware_domain is restored from old_hwdom. So in that case, CDF_hardware should be restored:

@@ -986,7 +987,11 @@ struct domain *domain_create(domid_t domid,

     d->is_dying = DOMDYING_dead;
     if ( hardware_domain == d )
+    {
+        if ( old_hwdom )
+            old_hwdom->cdf |= CDF_hardware;
         hardware_domain = old_hwdom;
+    }
     atomic_set(&d->refcnt, DOMAIN_DESTROYED);

     sched_destroy_domain(d);

I'll see what comments I get on the rest of the series before respinning.

Regards,
Jason

Reply via email to