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

Re: [PATCH v3 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: Thu, 9 Nov 2023 12:11:09 +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=vFqVLBs/pexFqyC4DGwn0UgQ7Qo1oPTwatjXIllCYx0=; b=OuJW9zZxg/UTdXlv4PrfRZr2qiHe71m05XmpsmOvCYTe18wje9/71RktjmXetGimWEEGtM8bR+1ndMDU4Fy1k2nSSXrE+NLk5jUOwTTcKmVA/NOdeIzvtViX5vDQx+KPTzOQEjYv0iWAPFe6HqVt/LcmEhihofmTqbzeNedLFyECwRmHj5wBAKgg1O+khnnwjddHnZKWx8hF+A62eJGF5T2pDQzKznrV+9c7uQIXQXuCgCKPIMezearhVGLUP3WJhdvo2dpZUV3i4/4UFxQGBLcCwKwW9QHkUwJAjNwty2akPwLRi1ZYiPZd2VMX4ANjZ4glCLwntDctzqpEZ7eUcA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YkYcol4Mlzbmfdd+IBKEsPGHci8ePLPLL2knshEKw1Wy5Z/yw0+bt8jzEOZtGI3f1iuItRjynzJGI9r/7/YTUYpX5z3M/Gr4rtp2nyi4Bnl735bm2HN/Iuo6MYkSV0ise41Igiu1K9Jv5ZZ7J18C5DOxrz7Mi1cwOQhfx/mQw4bvehO0Yd7FtZ5w8ie5pqMf4FxKi4sWTfb11s0o3tWuqmFY11ps2q1fXHUUCN9YHpIv0BaeS7Xa7NbH0qABWVx2ejj9ACz7e2JVNLW0CJKkfT5gw86AuNwYPVOLNyPHG0BJzpVH5KvPoeqpTEoG5bA+aYURnkXzNYE3EHAMiDfUYQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 09 Nov 2023 11:11:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Luca,

On 09/11/2023 10:06, 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
This one, despite the name, is strictly related to shmem. Shouldn't we move it 
to static-shmem?

>  - make_hypervisor_node
>  - make_psci_node
>  - make_cpus_node
>  - make_timer_node
>  - handle_device_interrupts
>  - construct_domain
>  - process_shm
>  - allocate_bank_memory
What about static event channels? Does it make sense to leave it unguarded? 
Reading the docs,
it looks like at least one domU needs to be present (dom0-domU or domU-domU). 
Hovever, looking at the code it should
be possible for a loopback. That said, I don't really find it useful given that 
loopback does not really need this feature.

> 
> 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>
> ---
> Changes from v2:
>  - move allocate_bank_memory back in domain_build.c, remove header
>    from dom0less-build.c.
I can see you removed the copyright from .c but .h still has it. This also
applies to other newly introduced files that were subject only to code movement.

~Michal



 


Rackspace

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