All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 6/9] asm-generic: move some parts of Arm's domain_build.h to asm-generic header
Date: Mon, 3 Feb 2025 16:50:15 +0100	[thread overview]
Message-ID: <8ca2fe43-f698-4913-bb09-13093938fba9@gmail.com> (raw)
In-Reply-To: <347b4bb0-5fd1-439f-9e3b-ef13ac89bbe9@suse.com>

[-- Attachment #1: Type: text/plain, Size: 2580 bytes --]


On 1/27/25 12:23 PM, Jan Beulich wrote:
> On 08.01.2025 12:13, Oleksii Kurochko wrote:
>> Nothing changed. Only some functions declaration are moved to asm-generic
>> header as they are expected to be used by common code of domain builing or
>> dom0less.
>>
>> Signed-off-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>
>> ---
>>   xen/arch/arm/include/asm/domain_build.h | 19 ++----------
>>   xen/include/asm-generic/domain-build.h  | 41 +++++++++++++++++++++++++
>>   2 files changed, 43 insertions(+), 17 deletions(-)
>>   create mode 100644 xen/include/asm-generic/domain-build.h
> Again I question this movement under this name. "Domain building" is a pretty
> generic thing, yes, but what you move would e.g. be entirely inapplicable on
> x86 (as it is now). For example ...
>
>> --- /dev/null
>> +++ b/xen/include/asm-generic/domain-build.h
>> @@ -0,0 +1,41 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +#ifndef __ASM_GENERIC_DOMAIN_BUILD_H__
>> +#define __ASM_GENERIC_DOMAIN_BUILD_H__
>> +
>> +#include <xen/types.h>
>> +
>> +struct domain;
>> +struct page_info;
>> +struct kernel_info;
>> +struct membanks;
>> +
>> +typedef bool (*alloc_domheap_mem_cb)(struct domain *d, struct page_info *pg,
>> +                                     unsigned int order, void *extra);
>> +bool allocate_domheap_memory(struct domain *d, paddr_t tot_size,
>> +                             alloc_domheap_mem_cb cb, void *extra);
>> +
>> +bool allocate_bank_memory(struct kernel_info *kinfo, gfn_t sgfn,
>> +                          paddr_t tot_size);
> ... the term "bank" seems pretty closely tied to DT. Other stuff ...
>
>> +void allocate_memory(struct domain *d, struct kernel_info *kinfo);
>> +int construct_domain(struct domain *d, struct kernel_info *kinfo);
>> +int make_chosen_node(const struct kernel_info *kinfo);
>> +int make_cpus_node(const struct domain *d, void *fdt);
>> +int make_hypervisor_node(struct domain *d, const struct kernel_info *kinfo,
>> +                         int addrcells, int sizecells);
>> +int make_memory_node(const struct kernel_info *kinfo, int addrcells,
>> +                     int sizecells, const struct membanks *mem);
>> +int make_timer_node(const struct kernel_info *kinfo);
> ... here also falls in this category. Stuff like this may well live
> under asm-generic/, but the file name chosen then needs to reflect
> constraints.

Unfortunately, at least at the moment, this is not applicable to x86.

Partially, domain_build.h was chosen to have less changes in Arm code.

Would it be better to use domain-build-dt.h?

~ Oleksii

[-- Attachment #2: Type: text/html, Size: 3376 bytes --]

  reply	other threads:[~2025-02-03 15:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 11:13 [PATCH for 4.21 v1 0/9] Move parts of Arm's Dom0less to common code Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 1/9] xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS common Oleksii Kurochko
2025-01-27 11:12   ` Jan Beulich
2025-02-03 15:18     ` Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 2/9] asm-generic: move parts of Arm's asm/kernel.h to asm-generic Oleksii Kurochko
2025-01-27 11:15   ` Jan Beulich
2025-02-03 15:34     ` Oleksii Kurochko
2025-02-03 16:33       ` Jan Beulich
2025-01-08 11:13 ` [PATCH v1 3/9] arm/static-shmem.h: drop inclusion of asm/setup.h Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 4/9] asm-generic: move Arm's static-memory.h to asm-generic Oleksii Kurochko
2025-01-27 11:19   ` Jan Beulich
2025-02-03 15:45     ` Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 5/9] asm-generic: move Arm's static-shmem.h " Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 6/9] asm-generic: move some parts of Arm's domain_build.h to asm-generic header Oleksii Kurochko
2025-01-27 11:23   ` Jan Beulich
2025-02-03 15:50     ` Oleksii Kurochko [this message]
2025-02-03 16:38       ` Jan Beulich
2025-01-08 11:13 ` [PATCH v1 7/9] xen/common: dom0less: introduce common kernel.c Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 8/9] xen/common: dom0less: introduce common domain-build.c Oleksii Kurochko
2025-01-08 11:13 ` [PATCH v1 9/9] xen/common: dom0less: introduce common dom0less-build.c Oleksii Kurochko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ca2fe43-f698-4913-bb09-13093938fba9@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.