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

Re: [PATCH v6 3/5] arm/dom0less: put dom0less feature code in a separate module


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 24 Nov 2023 12:01:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.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=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=HXkuxcTnoOgixdrIhLdnoICoNZpbs0EV08hYaLn9r80=; b=mHNjRnhGKgvhgU6jtaJh60c6BB5KlLPYv38GizMBbT8UlOKx2XFiyHv5IKxJT0qJJOgKb6xIZnQ0jfHSj8jJOqIhjiQIdYzekBrSVC26ed3VJoofT3fd9/27eNsPp4DQXDvQv4UO8n5TU1MGZCZXrzdgQM09CGJe2vLesYngDuLhhtGCD4jPAr/JS7tn2S6DjOgTTpGHEo/mf7xP4SeBsoeqKBqA6wK9xwEcixg/Oj/4EHlr1/FCYpv5txYhw/hLgLFtw4Cr23aOtLqIxLDzDAc+5YR3M/d8cE8mx8Vxom0u/ckMVQ4FRvzwwx/CCtImpY91YiNqaOBYBkGoFQ8HTA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UD8L4Gs6HRKu3miRH/oemct3oNNt00gq4IjLRft1MACxRc84F1bqQWs+F9riA+E7NMy5Xlkf5kETgsd3E6v8n4FAS/slSI5/YDOJH2ScI4ZJcNu9owNAJqPVXxHgUM1yRnZf113nRnNgQsMgHPwmIm/qm1jI2tIQVp8o4ZWLPkxFIRHH4MDz2gZF4bSE2X9pWN8vSyr+wtyGK9S1M/TBLU26JU/C3U46rEyonSlDXU6f4KgSegYmw81QT9bkB0GShvK+vowT4lC8ZXkrWgVSctWXn0Ewz/3AzP3CBfVXSoSK5sma3dC2infQWdogx3aUM1tqVSkqf1NgNXxPLZv87w==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Fri, 24 Nov 2023 11:01:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Luca,

+ CC others

On 24/11/2023 10:48, Luca Fancellu wrote:
> 
> 
> Currently the dom0less feature code is mostly inside domain_build.c
> and setup.c, it is a feature that may not be useful to everyone so
> put the code in a different compilation module in order to make it
> easier to disable the feature in the future.
> 
> Move gic_interrupt_t in domain_build.h to use it with the function
> declaration, move its comment above the declaration.
> 
> The following functions are now visible externally from domain_build
> because they are used also from the dom0less-build module:
>  - get_allocation_size
>  - set_interrupt
>  - domain_fdt_begin_node
>  - make_memory_node
>  - make_resv_memory_node
>  - make_hypervisor_node
>  - make_psci_node
>  - make_cpus_node
>  - make_timer_node
>  - handle_device_interrupts
>  - construct_domain
>  - process_shm
>  - allocate_bank_memory
> 
> The functions allocate_static_memory and assign_static_memory_11
> are now externally visible, so put their declarations into
> domain_build.h and move the #else and stub definition in the header
> as well.
> 
> Move is_dom0less_mode from setup.c to dom0less-build.c and make it
> externally visible.
> 
> The function allocate_bank_memory is used only by dom0less code
> at the moment, but it's been decided to leave it in domain_build.c
> in case that in the future the dom0 code can use it.
> 
> Where spotted, fix code style issues.
> 
> No functional change is intended.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> ---
> Changes from v5:
>  - remove unneeded include (Michal)
Including asm/kernel.h was indeed not required. However, I'm thinking that if 
we want the header
to be self-contained and given that ...

[...]

> diff --git a/xen/arch/arm/include/asm/dom0less-build.h 
> b/xen/arch/arm/include/asm/dom0less-build.h
> new file mode 100644
> index 000000000000..c5625925d940
> --- /dev/null
> +++ b/xen/arch/arm/include/asm/dom0less-build.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +#ifndef __ASM_DOM0LESS_BUILD_H_
> +#define __ASM_DOM0LESS_BUILD_H_
> +
> +void create_domUs(void);
> +bool is_dom0less_mode(void);
here we use bool, I think we should include <xen/stdbool.h>

I think this change could be done on commit provided no remarks from other 
maintainers.

~Michal




 


Rackspace

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