|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [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
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |