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

Re: [PATCH v5 01/10] x86: Replace arch-specific boot_module with common one


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Wed, 2 Jul 2025 17:02:37 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.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=arcselector10001; 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=nILOuudRu0zZK7VGZvWtxD1HRqomg/c3ZslAFDarehE=; b=lL8DllkHPWXuqKVduR44y+CccrRLdpfdfaW+RQiLJHg6xZwjvbfQrHFrkh7FT79Rn2PtZudHiGWYzgnvbgWAqnP+Qci/wq+yRQR191dzZctuWZNzOyGr+gT17ZqNY6PEjgKCwIMWGQgFnxamTx9jaUMlstlb77AuvA/6f0CNWBGQvIeJ7reTqybIiU6QkwxYZ96wgiXziZd2vELRyCp9S1KjDaNlG2x1YqygLGNu0DpyxPp0CK94BxBxeKS6KTjHTQ7uToJSPw5NDiQuKSbr9MK6bWfmomZNhpWYfVLTy2kQekMUUyyN+eqWpcCVB78R2gSQ6/L1AMFa6Vu1cjbDLA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T7RUxPvze4HGKDfSbWOSP+VRpNxyL0hC/BwZXQykqUf5AlqpKlYNRrewocCja1JPt3jyCR+7Wl/0FKUStPPAotTl/t71CIu+DzuICtEY+VtVvV/LYREbZfRNLZci+91Qs4yw28OUn/avX8ZlAiDLtvi6yeKxMQyhmLAEFW6T8X6/eZQhqfC9i2sY//DH/C7juAR+WCqvmzXYj+gZaFocs7eoYO+ixiu83mkYLW6v5JiX5XUnMT+KdC2zKKGs0IAuN4+AHGOWp5Q+jn0evbH+L9xv1hPCt5tlwcppGg35YJF6s0w9Yo159d2/k1b5JRqVc2/l1Ze2Bfo/7eUsZAA27Q==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 02 Jul 2025 15:02:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxx>
>> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>
> 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



 


Rackspace

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