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

Re: [PATCH v5 05/12] x86/hyperlaunch: locate dom0 kernel with hyperlaunch


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Mon, 28 Apr 2025 12:05:07 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.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=bXu+t5vUw61xUGHFnAnZGPvjNSCX7BwA+lRXLFPTy0A=; b=s9hcOZs6VroCkXxYCc4ol9PKTrtLbPxotM9k+mGQ9/ELYb+YbIKOEB3NNI+49PT4WPSa1iIHFzEdlLS3RVD8mGAljwOQ7HTqeqBAkJyiffDJbVa6FXfFAQVYGb2c37My7zAb//F4uQWhbSLUprEOoWOkGq+PTUPKWJa5OaT/2rh/idlOVLIm8V/LrpHH3gdoG8hB/DGu3UPMsC57rRHQVwqJK8knXTW4KTPmJM+cloj57kTyN2NCSQwIdN32jQ2g3gannRCvjiQ04xJxiDKThko1baKsHdiugIxx5n9b+tTdY6fKLtSo/na6qtx1MkkdMY1G/MNBIbcg1EqbRZZQrg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=S2/G5O0qcSrHofL5elr+6oFqcEB/6Lr8PKTxtvdW4yaQmPvEI1mcEFEtDKzsVT1XYdRJ7cjwqj4NV09vJmDtg2oNNFVyPp4dCyp6TcIoEQ+QggTXVH8v+z+LStkyFxfxWT4HhdXe8UnjSv7ihFM6Rl3hBzeQ+AgULvrh8OA6CW6aFmQGQ2VZ5fK5G/5Rew9egAa4qTuSr64K/Melj3NgFzhztk/EuuG9ZMK9yHAG06oAUM0aqeDyujyCRSFnuYXJwOb6AosWO1iHXP5DJcDBLrY2vn89vu6xEgoPR6oNR13vOq2IBOO7rzrAxWWtO4bBotMv5V+VoNAuOmM/257Xdg==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Mon, 28 Apr 2025 11:05:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri Apr 25, 2025 at 11:32 PM BST, Daniel P. Smith wrote:
> On 4/24/25 12:10, Alejandro Vallejo wrote:
>> From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>> 
>> Look for a subnode of type `multiboot,kernel` within a domain node. If
>> found, locate it using the multiboot module helper to generically ensure
>> it lives in the module list. If the bootargs property is present and
>> there was not an MB1 string, then use the command line from the device
>> tree definition.
>> 
>> Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
>> Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>
>> ---
>> v5:
>>    * Add domain name to the error path on no-kernel.
>> ---
>>   xen/arch/x86/setup.c            |  1 +
>>   xen/common/domain-builder/fdt.c | 64 +++++++++++++++++++++++++++++++--
>>   2 files changed, 62 insertions(+), 3 deletions(-)
>> 
>> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
>> index bd13d9d196..7e756302ae 100644
>> --- a/xen/arch/x86/setup.c
>> +++ b/xen/arch/x86/setup.c
>> @@ -1290,6 +1290,7 @@ void asmlinkage __init noreturn __start_xen(void)
>>           i = first_boot_module_index(bi, BOOTMOD_UNKNOWN);
>>           bi->mods[i].type = BOOTMOD_KERNEL;
>>           bi->domains[0].kernel = &bi->mods[i];
>> +        bi->nr_domains = 1;
>>           bi->hyperlaunch_enabled = false;
>>       }
>>   
>> diff --git a/xen/common/domain-builder/fdt.c 
>> b/xen/common/domain-builder/fdt.c
>> index 11f0436e85..662c715483 100644
>> --- a/xen/common/domain-builder/fdt.c
>> +++ b/xen/common/domain-builder/fdt.c
>> @@ -99,9 +99,9 @@ static int __init fdt_prop_as_reg(const struct 
>> fdt_property *prop,
>>    * @return              -EINVAL on malformed nodes, otherwise
>>    *                      index inside `bi->mods`
>>    */
>> -int __init fdt_read_multiboot_module(const void *fdt, int node,
>> -                                     int address_cells, int size_cells,
>> -                                     struct boot_info *bi)
>> +static int __init fdt_read_multiboot_module(const void *fdt, int node,
>> +                                            int address_cells, int 
>> size_cells,
>> +                                            struct boot_info *bi)
>
> Shouldn't this belong to when the function was introduced? Though 
> looking there, you push it out into the header? Guess the real question 
> is it static or not?

It's to ensure MISRA compliance on the previous commit. See:

  
https://lore.kernel.org/xen-devel/173f7129e82958a9737627129ac3c5be@xxxxxxxxxxx/

Cheers,
Alejandro



 


Rackspace

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