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

Re: [PATCH v4 01/13] x86/boot: add cmdline to struct boot_domain


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Thu, 17 Apr 2025 17:06:25 +0100
  • 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=zjDC+Ukrj5uJKnfLceqL6VPO/rMZW8zSW7MpcHiCdRE=; b=nPsDBuFqUdOg2dVTmylYeC9j/ysjvXjDSlT2bb5RjuaG2EPuumWlVlE7VvgSCLcyI/AZuNWNJcrRTE2snK65izbk/C3IrL+GPW8pQYvNHZ9y2M2Xslh3qpwiAKkJ83b7ZnRfNH4ibT0TAcU9IhkdHu6sjtBR1/aOMBhS8JT/lAHEOyvvZr2gpb7g6c9gsWYQrsGFYbpdOPhMMb/aCDObM5YgYfNcwHf7coSxCjPSxAThw/fsr3xmT2qXT5SnHn8FYxA47y3esSxtjzCG7QGTXKju3Cx1t3UqT2srySa9s2lHfAaq9yzFd2TcaJdcuJbT6MBcJo0AYN3pf4MQtH10xQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mR8yDWC/z9mH+65o1zH9RCfUVs6pSoTW+A14mlJjpWJzER0NIe4EK8rHM8IBdstZlwhisywAmHUjPSZulRBIdNFIm7p+qPO7Oqyi5KbG+zxP3oG/7VbOWcXpd4zR5mp9yrtH8oGCCqsDAJEF/bcvbOqRK5cEDfjBf/oY0Px3Z2E1xSsyOjxPvxlxjMuwzUYOC0CcrRZQhQm78xIW6q9BEwN1k/fGESatB7PCS+yfTMPbhHRp4INe++TcO1feKXZBD2j54uGDLCS9v4ebfexKEag6sm1rBjtykLDn66ZDLzyJOkiQE0XTrINoyA1pAJPJpZhpASSeTHcgU0w8Qx8eTw==
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 17 Apr 2025 16:06:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Apr 17, 2025 at 3:54 PM BST, Jan Beulich wrote:
> On 17.04.2025 14:48, Alejandro Vallejo wrote:
>> From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>> 
>> Add a container for the "cooked" command line for a domain. This
>> provides for the backing memory to be directly associated with the
>> domain being constructed.  This is done in anticipation that the domain
>> construction path may need to be invoked multiple times, thus ensuring
>> each instance had a distinct memory allocation.
>> 
>> Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
>> Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>
>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks,

> preferably with ...
>
>> --- a/xen/arch/x86/hvm/dom0_build.c
>> +++ b/xen/arch/x86/hvm/dom0_build.c
>> @@ -653,7 +653,7 @@ static int __init pvh_load_kernel(
>>      void *image_start = image_base + image->headroom;
>>      unsigned long image_len = image->size;
>>      unsigned long initrd_len = initrd ? initrd->size : 0;
>> -    const char *cmdline = image->cmdline_pa ? __va(image->cmdline_pa) : 
>> NULL;
>> +    unsigned long cmdline_len = bd->cmdline ? strlen(bd->cmdline) + 1 : 0;
>
> ... this becoming either size_t (as you have it elsewhere) or unsigned int.
> Happy to make the adjustment while committing, so long as you agree with
> either of the suggested variants.
>
> Jan

Yes, sounds good. I'd rather it be size_t seeing as it's the output type
of strlen()

Cheers,
Alejandro



 


Rackspace

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