On 06.12.2024 05:41, Denis Mukhin via B4 Relay wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -65,6 +65,9 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock);
>  static struct domain *domain_hash[DOMAIN_HASH_SIZE];
>  struct domain *domain_list;
>  
> +/* Last known non-system domain ID. */
> +domid_t __read_mostly max_init_domid;
> +
>  /*
>   * Insert a domain into the domlist/hash.  This allows the domain to be 
> looked
>   * up by domid, and therefore to be the subject of hypercalls/etc.
> @@ -815,6 +818,12 @@ struct domain *domain_create(domid_t domid,
>  
>      memcpy(d->handle, config->handle, sizeof(d->handle));
>  
> +    /*
> +     * Housekeeping for physical console forwarding to the domain.
> +     */
> +    if ( !is_system_domain(d) && max_init_domid < domid )
> +        max_init_domid = domid;

Yet this affects all domains, not just init ones. Either the variable
name is wrong then, or the updating logic needs adjustment. The comment
in the earlier hunk suggests the former, yet then this is a behavioral
change for Arm, correctness of which needs explaining.

Jan

Reply via email to