[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 07/12] xen/arm: Add support for system suspend triggered by hardware domain


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Sat, 23 Aug 2025 00:53:14 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wmcakKGRpCSdV7gwQtcfrfgco6UwLTgQ20Q02v1oV3w=; b=G3+pdu5WJRY/y+m2lw9ROqlLTD/dziFhkD9CzR1R9XGZCbAx1si04GRMEWJKd9+VaIW9s9Ngr9etTzq91CjvnrjQECgyIuQ+9+cJuVR375b3NNatktjV8UPwMuSJvnnKQh7f6vaoAUx4RYCr9bXm0lijq7/bXVxdNKamzPc0mPXnkmyDJSjwN45PttmPW19RZiqVl19mFGqyephGgI/RH7lHuS/G46ke9edF8vlp9bf2spx8L9MQXs5had5G+o7BU9tIpzoBs50+BX+dkApZ0HYUETvwC5ds/EwzpFr4FPv6mqQxx7OXftJI+eyO6v99FMyBbX686em3X7VHxko+qQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lNqgC6dnPLlP2Ctb0IWiRbam6zqHAVzr4DnOcpz+rz+zCcF54n9m+TDhvV9bX68/dcvByqJg48V7OijoRDl1ZXR4YH8Zefl2oiW0peVLM2u7b8YZGTCKpD0MS2Xy1E5XSGSFQh7paJRNXUJ9omZdRdmt1yWVduQfZIHnEl9rPcO90CKSSgjaZzLgxJ7T1RlD8WwV5la9wWwT32K9xZMhhgb1H21Nsn1oRPLbwvaXJTXRIaGqmLIMNx5UG3UzEGfFCk36kE66yRfEXzwX/ShKQiQHW40VbQsQD590qbR8nAKAxYIvZesj4oJAPqu9Kdncezrw4sHo2bOFxrcjs2iofA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Mykola Kvach <xakep.amatop@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>, Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, Mykola Kvach <Mykola_Kvach@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sat, 23 Aug 2025 00:53:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcCwFfU+9GQNRu4k2nrD5uWqCz7A==
  • Thread-topic: [PATCH v5 07/12] xen/arm: Add support for system suspend triggered by hardware domain

Hi Jan,

Jan Beulich <jbeulich@xxxxxxxx> writes:

> 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?

I am not Stefano, but IMO, this should be ctldom. But only after hwdom
is already suspended, otherwise we'll have problems with devices.

It is unclear which entity should check if hwdom is already suspended,
though. Should be it be ctldom or Xen itself?

And if we already speaking of devices... There can be domains with
passed-through devices. Those domains should be suspended properly, not
just freezed. I think this requires another TODO.

-- 
WBR, Volodymyr


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.