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

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


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 2 Oct 2023 14:28:04 +0000
  • Accept-language: en-GB, 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=iZvVHCnGwfnju72DCKji/LHCa5GX+jiSNB4VYsCrE+c=; b=fi8I1nQRY5+lUeLwdFMWfDEM/DbafZWX0vaILGVOkKCKSbP9cSGIQrbQWawvDNEO+w7WWgJ+MBNLhv0BCrz+M+PoBqJiiJcAjXIxHJaSuQYmKpvN8NhW+5JxsKKJSp1Csm9XH7CpLGk6pT3hOhZfLB9n0rVa+H/vE34vsQn1LLaeJdvNMyPxWDorhROfXyxFKl+ccRHL9o3+iP+iz5pVDQLHm+rDJ11xKwSSnNyA6j6O1fKu1AAnktBhgUzJtmIRKPGuri0cgd2m7/RWM+IG1iaRh+vHJI3WJWv5mfH7btSulB8m8cTp4iD/T/EyPe3ELfyWpS+SFBj9BJacgZ60WQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HqHLt5b4aYjHH687KXerWly8XT6JZLa70t9wvLhQFt/JqVX0yzoMuwbizh9MLQhTw4kRR4ga1vPFGktdb/g399745vZ5cwgyP+sxknKolW//12XITDmeI0FWrj2O0niSMyCEDMnd9RkrkGoZwB0CZhjgc4f78x90lem+2z6GeQNBX4DEq6kkGhuXWLxwPbY6qrC/XkmNKEjU7R4GTp3AO+F3JaoL9nyI1qriJuXJiVMkzW+p5F96yGuPbGgh0fTUZ9LdHdJh5ZhyYsEgMEGym3gDZwdq7YSg9VWvRkMQuL9Qt66Wbv4sZee2ZGcuxzI99V9UJ70hVR2IpW06lvg9XA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 02 Oct 2023 14:28:39 +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: AQHZ8UtDYO4d/ZAlGU2swEp9/t1GiLAw9peAgABwXACAANJugIAD+GkAgABk4YA=
  • Thread-topic: [PATCH v2 3/5] arm/dom0less: put dom0less feature code in a separate module

Hi,

> On 2 Oct 2023, at 10:26, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Stefano,
> 
> On 29/09/2023 20:48, Stefano Stabellini wrote:
>> On Fri, 29 Sep 2023, Luca Fancellu wrote:
>>>> On 29 Sep 2023, at 01:33, Stefano Stabellini <sstabellini@xxxxxxxxxx> 
>>>> wrote:
>>>> 
>>>> On Wed, 27 Sep 2023, 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
>>>>> 
>>>>> 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.
>>>>> 
>>>>> Where spotted, fix code style issues.
>>>>> 
>>>>> No functional change is intended.
>>>>> 
>>>>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>>> 
>>>> This is great! A couple of questions.
>>>> 
>>>> Why was allocate_static_memory not moved to dom0less-build.c ?
>>> 
>>> My aim is to decouple the features, so in patch 4 we move (just once as 
>>> Julien suggested)
>>> the static memory code on a module on its own, because we can have a guest 
>>> booted with
>>> dom0less feature but having it with static memory is optional.
>> OK
>>>> Would it make sense to also move construct_dom0 to dom0less-build.c
>>>> given the similarities with construct_domU? I am not sure about this.
>>>> 
>>> 
>>> We can’t do that because the final goal of this serie is to have a Kconfig 
>>> disabling dom0less,
>>> so in that case we will end up removing from the compilation also 
>>> construct_dom0.
>> OK. Probably we can't do much better than this.
>> One more question on the code movement, and I would also like Julien and
>> Bertrand to express their opinions on this.
>> Given that code movement is painful from a git history perspective, and
>> given that we have to move dom0less code to xen/common anyway to make
>> it available to RISC-V and also x86, could we do it in one shot here?
> 
> Looking at the name of the functions, I would expect that we would need 
> another code movement in the future to move back Arm specific function under 
> arch/arm/. So we would end up with two code movement as well.
> 
> I would prefer if we wait until RISC-V/x86 needs it so we don't unnecessarily 
> move Arm specific code in common/.

I agree with Julien here.
Moving the code now will mean moving part of it back in arm in the future once 
we have a second user of this.
I would rather wait for the need to come so that we do this cleanly.

Also using hyperlaunch name now would be weird as there was no agreement on the 
naming (as far as I know) so far.

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall



 


Rackspace

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