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

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


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 13 Nov 2023 14:17:31 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=bDlMveBBAUHf/Y3uWO8Xe/3OD+n9dn9XlcmUzw0yHjw=; b=T40DQQScQHpq5KP4E3c8VD9aOuVLSpHx3csQTmzNNL3jHlnaQoqpaGMiuFUNxfJEyTz1gobACE8CH1r90JwgINJNWUkxUpFhYwi9n38FX3ZyDL7xW6NMGqI6olajN8CuVNV7pEyncPTxTO6mvywgaJJ0jFJWk4HEyrucA1NHYKck8Hex2Vh9Efob7OPYXjVRQR/HToeyZfkM7YNpOC5Ol6j78tBI3XNZFWKer41DC6+7xalzGkK7kwsA2Ane6HuBPMA+6deYqDZ+ad+BbeWD26axL2oImJ9nPIpLPglTV2AjEI5qQwYkUnvLjHiZaopEx2x8H6VVjgXaUjBjnFhHmA==
  • 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=bDlMveBBAUHf/Y3uWO8Xe/3OD+n9dn9XlcmUzw0yHjw=; b=obFayRyzoX3rsEICz8GinuA3HYtK6GmLwRTniRp3h/AyW+hm6Kjq3v/XV5UosEqCqq3lNSwAVvysAI7HDq+B9Jaf6c4r6shXb0Ky+3kHPhUl5IrMgn65kNTvUaK1REDyGi52OwwsSVMPvjMrbPe59AzIswCDs1e9GbB2KeOUdTlcQgFgEv8/UChLazIPBkMnBeDXj/WAY9hXvKGQhPTy/uEdhYJu+KWi12GsLMq3ZvH3NYw07zkKR6U+MubccjuBKnU4jFRXuWw5w02iVGqKwUuxrTgUKmfMUs8suAEIdXQNnPZuioDim5xwWuL641OQDVIRMZ/jEDKG5EqzolZyAQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=XZJ5Etjd2ZPbR6UYtjIxITaJeS69E/NopGVGYpo449LsWt+1wb4F171vDxQE8NlWSyGPjQgpr94Bco4CM9/WGTqBzPlg93ynjUigXkMrQpLVboqKe7QAg7SkSASbCGaUccZnNQoTLRLi6dqeFGb/N+NA0JN/sEO7Ne1ZmJ8G8vrLecUGd2wusi9HyUXhoHY7pxuN1cWGL146yLU8ID9P9wW/QwcsKmtvSq8alsOSZxbfnyxjpyVxsPQDy0NIhke9LjIDBUSEx5YszspY0UHBBV+x2womhHwMMHupLbqx8fTt3iKq+yl7433zI06ETxzxVbEE+8C7nh6ZEVZuuRKcuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EitUgIZNu9O+lgWDGtbZxC9KtgsqYDZ2rPxDAuFp8ZpPp+P+OgViOtujoEYDKQpIPaJFzjmnFpeHOZ4t9crB/6MphY8RG/frR35A5TBHqbZSbXSOR6bYaMRVrpXr2Gk/8SDJv01DDbFBIAyt/h8XB9QtJWS3kjK58IMKrUjtitATI8pjcte3CLNCsXQgY2mh/oYq9lTtXyA904fXza4JxMWCnpk9r1rLCVMB8ILyhdF3GkhYcUqccaXozEZ+vry26J5b4eXqiiwXk4l/TTB6mmfXW8i2JHh4n9khdHAdpcu8rXNChQidxaIYYdObPhwp0JHSUsASJx0mA0goclM0oQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 13 Nov 2023 14:17:56 +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: AQHaFijSS6ojbhl1Cke6ibm0yLAE1LB4S+mA
  • Thread-topic: [PATCH v4 3/5] arm/dom0less: put dom0less feature code in a separate module


> On 13 Nov 2023, at 11:58, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> Apart from pending question on static event channels code movement, a few 
> NITs.

Related to that, it seems to me that this part can be handled by a separate 
patch/serie from
this one, moving code from domain_build.c to a new module, so I’m wondering, is 
this point
a blocker for this serie?

> 
> On 13/11/2023 10:08, 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>
>> ---
>> Changes from v3:
>> - remove header in dom0less-build.h (Michal)
>> Changes from v2:
>> - move allocate_bank_memory back in domain_build.c, remove header
>>   from dom0less-build.c.
>> ---
>> xen/arch/arm/Makefile                     |    1 +
>> xen/arch/arm/dom0less-build.c             | 1018 +++++++++++++++++
>> xen/arch/arm/domain_build.c               | 1265 +++------------------
>> xen/arch/arm/include/asm/dom0less-build.h |   20 +
>> xen/arch/arm/include/asm/domain_build.h   |   60 +
>> xen/arch/arm/include/asm/setup.h          |    1 -
>> xen/arch/arm/setup.c                      |   33 +-
>> 7 files changed, 1240 insertions(+), 1158 deletions(-)
>> create mode 100644 xen/arch/arm/dom0less-build.c
>> create mode 100644 xen/arch/arm/include/asm/dom0less-build.h
>> 
> 
> [...]
> 
>> 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..022ae61ead7c
>> --- /dev/null
>> +++ b/xen/arch/arm/include/asm/dom0less-build.h
>> @@ -0,0 +1,20 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +
>> +#ifndef __ARM_DOM0LESS_BUILD_H_
> The majority of header files have a guard starting with __ASM so I would 
> stick to the scheme.

Sure, makes sense

> 
>> +#define __ARM_DOM0LESS_BUILD_H_
>> +
>> +#include <asm/kernel.h>
>> +
>> +void create_domUs(void);
>> +bool is_dom0less_mode(void);
>> +
>> +#endif  /* __ARM_DOM0LESS_BUILD_H_ */
> 1 space between #endif and comment

I’ll fix

> 
>> +
>> +/*
>> + * Local variables:
>> + * mode: C
>> + * c-file-style: "BSD"
>> + * c-basic-offset: 4
>> + * indent-tabs-mode: nil
>> + * End:b
> What does 'b' means here? Only 2 files have that.

Mmm... I think I’ve copied this part from smccc.h and I didn’t realised there 
is a typo (or at least I think it is)
because looking into CODING_STYLE, there is no ‘b’ in ‘End:’, I’ll fix it.


> 
> The comments apply to other files as well.
> 
> Apart from that, the movement LGTM.
> 
> ~Michal
> 


 


Rackspace

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