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

Re: [PATCH v2 2/3] arinc653: don't assume Dom0 is the control domain


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 25 Mar 2026 17:32:47 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=/ARDBad1bfc+Ep20ji2Krz8i0VzFmUeOG2n5LLiFqs0=; b=T1mfq8iYxLPhPaBML9X/Uk6lhKs9QNyI53i8U4JOJfzPjmsJuIEKeVs4WPTOYeE52sd7qb0Y9f6BcdtnemkpFfm64GcTLZPbbU7ecIQSyb3Mh9+7IdbsYKvV/iZt3UDr6farlykSP1UY5yFlDXGgD265SuiQo/YjTsJW2cZq3d+VXfyywxq3W0rCz2PZV0Ww3EJtd2WplLDZ/PONr3phILZbCQ74Ei5e70MtFIKJU1jF/TSNANFecmXN8Nrk4OSNdmYPes3MOJbX2FUpXrR/F9DHh8ZzP30RYmbZdHDAd2zUTa3olV48cNpmVxz22lAV3BxFOdlfue93dO/aVsTcOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DZqaAnW4aro8WAugMLHX6zk7MTSGHH/oSPovMUREmcFaj8fKtLJEUKuSc+zpov++7mbZTe2eNpISHXSBzU8ISP477HJbTPHS6tAQCGJmrGiz0BP3rXXqdwqIc3vY1QvtgkDp8L3JRqOqTf16PAOiGRXLJj1kU9leBhTRBi9CpZ5OO/lPjnpT6nhj1qz7pKMwUpVZCf/LCTiTQc2EzGGbW++HHuV05AA2LKV3DQUbjsV3fWpCQAct3AXgM1nHGGqc/IkraMAv8Dcd5ENFy0zAMX92mI896xI6Zi8pQ+YcZpnPgUf2rFg0ssFI6YMXGQ+fSWvz0JXoQy3Ts4KmSDlQSg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Nathan Studer <nathan.studer@xxxxxxxxxxxxxxx>, Stewart Hildebrand <stewart@xxxxxxx>
  • Delivery-date: Wed, 25 Mar 2026 21:33:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 3/25/26 08:54, Jan Beulich wrote:
> Leaving aside highly disaggregated environments, the control domain is
> what will invoke XEN_SYSCTL_SCHEDOP_putinfo. Its vCPU-s therefore need to
> be able to run unconditionally, not those of the domain with ID 0 (which
> may not exist at all).
> 
> Fixes: 9f0c658baedc ("arinc: add cpu-pool support to scheduler")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> There being no "else" to the if(), what about other control domain vCPU-s?

I wonder if a panic() is appropriate in the else case. If not, at least a
warning or error message should be logged.

> And why are they added to all scheduler instances?
> ---
> v2: New.
> 
> --- a/xen/common/sched/arinc653.c
> +++ b/xen/common/sched/arinc653.c
> @@ -411,10 +411,10 @@ a653sched_alloc_udata(const struct sched
>      spin_lock_irqsave(&sched_priv->lock, flags);
>  
>      /*
> -     * Add every one of dom0's units to the schedule, as long as there are
> -     * slots available.
> +     * Add every one of the control domain's units to the schedule, as long 
> as
> +     * there are slots available.
>       */
> -    if ( unit->domain->domain_id == 0 )
> +    if ( is_control_domain(unit->domain) )

Sorry, I didn't realize before that is_control_domain() includes the idle
domain. We don't want to include the idle domain in the default schedule here.

I suggest adding '&& !is_idle_domain(unit->domain)' or similar.

>      {
>          entry = sched_priv->num_schedule_entries;
>  
> 
> 




 


Rackspace

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