All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <agarciav@amd.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 01/10] x86: Replace arch-specific boot_module with common one
Date: Wed, 2 Jul 2025 17:02:37 +0200	[thread overview]
Message-ID: <DB1NSBHY1P9Q.3HCNTHXLCEZX5@amd.com> (raw)
In-Reply-To: <1a2faa5c-9dcd-4d09-a5d5-dc692eef8c8c@suse.com>

On Wed Jul 2, 2025 at 2:43 PM CEST, Jan Beulich wrote:
> On 01.07.2025 12:56, Alejandro Vallejo wrote:
>> These types resemble each other very closely in layout and intent,
>> and with "struct boot_module" already in common code it makes perfect
>> sense to merge them. In order to do so, add an arch-specific area for
>> x86-specific tidbits, and rename identical fields with conflicting
>> names.
>> 
>> No functional change intended.
>> 
>> Signed-off-by: Alejandro Vallejo <agarciav@amd.com>
>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>
> I'm largely okay with this change, just one question:
>
>> --- a/xen/include/xen/bootfdt.h
>> +++ b/xen/include/xen/bootfdt.h
>> @@ -7,6 +7,10 @@
>>  #include <xen/macros.h>
>>  #include <xen/xmalloc.h>
>>  
>> +#if __has_include(<asm/bootfdt.h>)
>> +#include <asm/bootfdt.h>
>> +#endif
>> +
>>  #define MIN_FDT_ALIGN 8
>>  
>>  #define NR_MEM_BANKS 256
>> @@ -108,6 +112,10 @@ struct boot_module {
>>      bool domU;
>>      paddr_t start;
>>      paddr_t size;
>> +
>> +#if __has_include(<asm/bootfdt.h>)
>> +    struct arch_boot_module arch;
>> +#endif
>>  };
>
> The pre-existing domU field isn't used by x86. Shouldn't that move into Arm's
> (to be created) struct arch_boot_module? Or is that intended to become
> dependent upon CONFIG_DOM0LESS_BOOT? (While we apparently didn't adopt Misra
> rule 2.2, this is imo precisely the situation where we would better follow it:
> An unused struct field raises questions.)

That can be moved to an arch-specific header, yes.

I expect that domU field to eventually drop after dom0less adopts the
more powerful hyperlaunch bindings for privilege separation. At that point
it doesn't matter whether a domain is a domU or not, it's jut a domain to be
constructed.

Cheers,
Alejandro


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

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 10:56 [PATCH v5 00/10] Allow x86 to unflatten DTs Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 01/10] x86: Replace arch-specific boot_module with common one Alejandro Vallejo
2025-07-02 12:43   ` Jan Beulich
2025-07-02 15:02     ` Alejandro Vallejo [this message]
2025-07-01 10:56 ` [PATCH v5 02/10] xen: Refactor kernel_info to have a header like boot_domain Alejandro Vallejo
2025-07-02 12:56   ` Jan Beulich
2025-07-02 16:04     ` Alejandro Vallejo
2025-07-03  6:01       ` Jan Beulich
2025-07-03  9:57         ` Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 03/10] x86: Replace arch-specific boot_domain with the common one Alejandro Vallejo
2025-07-02 13:15   ` Jan Beulich
2025-07-02 15:04     ` Alejandro Vallejo
2025-07-02 15:09     ` Alejandro Vallejo
2025-07-02 15:15       ` Jan Beulich
2025-07-02 15:34         ` Alejandro Vallejo
2025-07-03  6:04           ` Jan Beulich
2025-07-07 14:49             ` Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 04/10] xen/dt: Move bootfdt functions to xen/bootfdt.h Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 05/10] xen/dt: Move bootinfo functions to a new bootinfo.h Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 06/10] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 07/10] xen/dt: Extract helper to map nodes to module kinds Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 08/10] xen: Split HAS_DEVICE_TREE in two Alejandro Vallejo
2025-07-02 13:30   ` Jan Beulich
2025-07-02 15:28     ` Alejandro Vallejo
2025-07-03  5:55       ` Jan Beulich
2025-07-03 10:04         ` Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 09/10] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h} Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 10/10] xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/ Alejandro Vallejo

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=DB1NSBHY1P9Q.3HCNTHXLCEZX5@amd.com \
    --to=agarciav@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dpsmith@apertussolutions.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.