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

RE: [PATCH 10/36] xen/arch: check color selection function


  • To: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 14 Mar 2022 06:06:37 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+5vDZRUa8GvcEAGaJ+myRho+cJnHExOj0FwE3vOCH4E=; b=iuumx5NkHA0SIY87WsAKEW0Ivf70bDMHlNmyikwVkGfM8A5Sh40q5EltXRd//1aR2fbD4yF4MDr9A7W+hpAnuhSQczi9OX8ziGheqlMLJtbegKoGp62laM3ZrfjfqEPpXhXB6A/CopT/2mmE0gKMbtuygUt7gvAetMFug5UZFm/Oy+hyRTctKvpY9TG5VjGIAxqAsiowizYk37QVMWoAu5swqM4+vPOyecdQbCXr1RvqhC3rbfzRtu+tmDBpCFJzpGGXiNkR3ZVoUtoF8smXVsl0akOz+aE4VBQ+mDlMcPxvw/5PaEfyLfNKHYJv86vpQNQOMYd1mxh1sj2gdNrgzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iTnXqVuEKz2T1A3msZozOK/9+vzt6YhqZOZ1j3bmRNwKZjXeb11FKjKLxsX/NEUyAQ0Z7sDFIk3iNIY83G630euoDgDX/3S5ytUAsyz3iiPELTTT3CWt0OVIHBj7SHnznJgC95ApGh71CkfvV5mv29AeJzyPnD5dlzQBmTSSm1/MmKbood+Rf2JAn4TusefzQ/cvcr1EGknOejMtwR7CeX8yZLaok7fp9vU47xcvG0Tf8XoNSe+PLKsepde9pWqn1lwiuNsNzt0ts+JjZyu9g+ggmZVUI65OeDkz/YL5AC06OWK9dSumXcQUz84cXcmx2aTuna1s/qdkn4mOVF2loQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marco Solieri <marco.solieri@xxxxxxxxxx>, Andrea Bastoni <andrea.bastoni@xxxxxxxxxxxxxxx>, Luca Miccio <lucmiccio@xxxxxxxxx>
  • Delivery-date: Mon, 14 Mar 2022 06:07:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYL/Q7H6udck4WIkSPZpB4k5JnoKy+cvyw
  • Thread-topic: [PATCH 10/36] xen/arch: check color selection function

Hi Marco,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Marco Solieri
> Sent: Saturday, March 5, 2022 1:47 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxx>;
> Jan Beulich <jbeulich@xxxxxxxx>; Julien Grall <julien@xxxxxxx>; Stefano
> Stabellini <sstabellini@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Marco Solieri
> <marco.solieri@xxxxxxxxxx>; Andrea Bastoni
> <andrea.bastoni@xxxxxxxxxxxxxxx>; Luca Miccio <lucmiccio@xxxxxxxxx>
> Subject: [PATCH 10/36] xen/arch: check color selection function
> 
> From: Luca Miccio <lucmiccio@xxxxxxxxx>
> 
> Dom0 color configuration is parsed in the Xen command line. Add an
> helper function to check the user selection. If no configuration is
> provided by the user, all the available colors supported by the
> hardware will be assigned to dom0.
> 
> Signed-off-by: Luca Miccio <lucmiccio@xxxxxxxxx>
> Signed-off-by: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>

For the first 10 commits:

Tested-by: Henry Wang <Henry.Wang@xxxxxxx>

> ---
>  xen/arch/arm/coloring.c             | 17 +++++++++++++++++
>  xen/arch/arm/include/asm/coloring.h |  8 ++++++++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/xen/arch/arm/coloring.c b/xen/arch/arm/coloring.c
> index f6e6d09477..382d558021 100644
> --- a/xen/arch/arm/coloring.c
> +++ b/xen/arch/arm/coloring.c
> @@ -179,6 +179,23 @@ uint32_t *setup_default_colors(uint32_t *col_num)
>      return NULL;
>  }
> 
> +bool check_domain_colors(struct domain *d)
> +{
> +    int i;
> +    bool ret = false;
> +
> +    if ( !d )
> +        return ret;
> +
> +    if ( d->max_colors > max_col_num )
> +        return ret;
> +
> +    for ( i = 0; i < d->max_colors; i++ )
> +        ret |= (d->colors[i] > (max_col_num - 1));
> +
> +    return !ret;
> +}
> +
>  bool __init coloring_init(void)
>  {
>      int i;
> diff --git a/xen/arch/arm/include/asm/coloring.h
> b/xen/arch/arm/include/asm/coloring.h
> index 8f24acf082..fdd46448d7 100644
> --- a/xen/arch/arm/include/asm/coloring.h
> +++ b/xen/arch/arm/include/asm/coloring.h
> @@ -26,8 +26,16 @@
>  #define MAX_COLORS_CELLS 4
> 
>  #ifdef CONFIG_COLORING
> +#include <xen/sched.h>
> +
>  bool __init coloring_init(void);
> 
> +/*
> + * Check colors of a given domain.
> + * Return true if check passed, false otherwise.
> + */
> +bool check_domain_colors(struct domain *d);
> +
>  /*
>   * Return an array with default colors selection and store the number of
>   * colors in @param col_num. The array selection will be equal to the dom0
> --
> 2.30.2
> 




 


Rackspace

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