On 11.08.2025 22:48, Mykola Kvach wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -1311,7 +1311,11 @@ int domain_shutdown(struct domain *d, u8 reason) > d->shutdown_code = reason; > reason = d->shutdown_code; > > +#if defined(CONFIG_SYSTEM_SUSPEND) && defined(CONFIG_ARM) > + if ( reason != SHUTDOWN_suspend && is_hardware_domain(d) ) > +#else > if ( is_hardware_domain(d) ) > +#endif > hwdom_shutdown(reason);
There better wouldn't be any #ifdef here. Afaict you can easily use IS_ENABLED(CONFIG_SYSTEM_SUSPEND). For CONFIG_ARM, though, I think some new abstraction will need adding. E.g. HAS_HWDOM_SUSPEND (with want for a better, yet not overly long name). With the hwdom / ctldom separation work in mind I wonder though if it's really hwdom to be in charge of initiating system suspend. Imo conceptually that rather would want to be ctldom. Stefano? Jan