[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Thu, 23 Nov 2023 04:27:50 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bwwSzmEFpTDjUkKsCDAyhfQUejIhYOg2eQ3O2CUWYwc=; b=HMR6L0NuowG8Iyjb6lGUIj+D5uSNB8xZIT2Xympwk1i0TeTGXz0PIZ9mShJqD6LdVjzfVeXNg1nCTjU/umhOvCRNamxUEWEShO/QpevTi1Egr3vbdxZVgg2dYHEsVpFGYlJaDHzeNXFyO6jaoW7vOZb7qQ78moqJHoAMTyJVwFRZwiJ0nTdG4fip5oQppn9b/LH/2i8oNtOUwZCMC4Vp4NP5HXwdceNxlAf7SgkWzLIAlm5kIlNoGsC91wLtN4T5wVx1WTWlwrPuqSikJ2QCrnOBZ6iiUrwoTVXM0FBiQWA3tywBWFiseJrG/ky5Y3MNPCfaZqJYLsV/ahiHOXwd5A==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bwwSzmEFpTDjUkKsCDAyhfQUejIhYOg2eQ3O2CUWYwc=; b=NHd9r0doYnl3uPdvR270Evy9MflbrO96bVIhWXOLbR1wprvydetfHLGLaVFLzBGNAgQrsCndYaIFlxurMHeuVCZjZohYJ1YzLf2KRD2KUetoV8+6Y4Q1T1euSrmTNsY4keJPUDhPj2HywP66hlKHBQoVy348hxg1kPUm0SwG+vbxBGR0xAsVnWEGgpYnjXi2EtyzkuwDXlmCBzgmdIBnnV0yKvD64P3yR3uYInQX7tGxxp76uy5nupLO3DW27irIg+r7l9woQDfe/TCpPZLUS3zmo/sXN4n91vjnElvg0dm+h5JUtaYNjc5VQXQ+Ej9dBnwZR0jNL7rY1mN2wiUXmg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eZ4uuua9y1AM61UZnEeoYBRCTLs3l62j2rfPF2wUkKKhugSS4DCLBKmQ5KIydTj9IpMzg7z9wq1iaBbsbhamthkGzNbzahJFkrcFNWcoOrR/hrLacLjSOCMU+ydLMibe3pf6mR1u3GymupMzwAwA9ivc5ZNocXqNyzIaZmuYDvjLgKC+Omw2T78ylhcw5Vf466un7NhBAP9higdf3kK7KGXiP8VG3I6fPHWEXVechWmbO17wN/MwcK6zJg/v3WjwJEAYkitON/U6ZOYgruRxKtudzkJcEVWAo0XcV7ytDD0f2ESaLpCAyQz6iy8a6VxGALsdR7S2zKnE4wMVDMSoQw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E8CfH0bKQSuFIlOslWF+PlKqeputtVi0WvLqWvUwpDy/4g3NWH8WSkXOUzQW2H4s8WMNSgMQUXcPYM4DhP/6tHB/XixgV+jgvqIWyETJr5z0NrDt5PqCZapiUDKJiQQZk/dTWXZ5w4DEOLeYBD5fGTyVBa1jDRzWME28ltGlA/ExbxT9bdVJwM42HpoZ+dth4i8hnLyRzBp+Zee/CRq6DIIT/io5+YTi7QJGYhZeugGaU3/jQnm8eARipYf8+3Ax/dLz9kokxrJw7W2eCqr9hAFu1fiZ6oMJCPZYrJqn5QukT2WrQLtCscRHN1ud/yXTFi8gJhzqG4Ne5h2qvo36pg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Thu, 23 Nov 2023 04:28:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHaHLke0d1pJZFGt0mE36h4hBLGpbCFOo4AgAACQQCAAUC2AIAAJVIAgACsX4CAAAIggA==
- Thread-topic: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()
Hi,
> On Nov 23, 2023, at 12:20, Henry Wang <Henry.Wang@xxxxxxx> wrote:
>
> Hi,
>
>> On Nov 23, 2023, at 02:03, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>>
>> On 22/11/2023 3:49 pm, Luca Fancellu wrote:
>>>
>>>> On 21 Nov 2023, at 20:41, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>>>>
>>>> On 21/11/2023 8:33 pm, Luca Fancellu wrote:
>>>>> + CC henry
>>>>>
>>>>>> On 21 Nov 2023, at 20:15, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>>>> wrote:
>>>>>>
>>>>>> -Wwrite-strings is unhappy with assigning "xen" to a mutable pointer,
>>>>>> but this
>>>>>> logic looks incorrect. It was inherited from the x86 side, where the
>>>>>> logic
>>>>>> was redundant and has now been removed.
>>>>>>
>>>>>> In the ARM case it inserts the image name into "xen,xen-bootargs" and
>>>>>> there is
>>>>>> no logic at all to strip this before parsing it as the command line.
>>>>>>
>>>>>> The absence of any logic to strip an image name suggests that it
>>>>>> shouldn't
>>>>>> exist there, or having a Xen image named e.g. "hmp-unsafe" in the
>>>>>> filesystem
>>>>>> is going to lead to some unexpected behaviour on boot.
>>>>>>
>>>>>> No functional change.
>>>>>>
>>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>>>> ---
>>>>>> v2:
>>>>>> * New.
>>>>>>
>>>>>> I'm afraid that all of this reasoning is based on reading the source
>>>>>> code. I
>>>>>> don't have any way to try this out in a real ARM UEFI environment.
>>>>> I will test this one tomorrow on an arm board
>>> I confirm that booting though UEFI on an arm board works
>>>
>>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>> Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>
>> Thanks, and you confirmed that the first cmdline parameter is still usable?
>
> Today I tried this series on an N1SDP board using UEFI boot. I had a device
> tree with
> xen,xen-bootargs = "console=dtuart dtuart=serial0:115200n8 noreboot
> dom0_mem=1024M bootscrub=0 iommu=no";
>
> Xen can be successfully boot on the board with the series applied, and I got
> ```
> (XEN) Command line: console=dtuart dtuart=serial0:115200n8 noreboot
> dom0_mem=1024M bootscrub=0 iommu=no
> […]
> ```
>
> Also I can interact with the board:
> ```
> n1sdp login: root
> root@n1sdp:~# ^C
> root@n1sdp:~# ^C
> root@n1sdp:~# ^C
> ```
>
> So I think the first cmdline parameter is still usable. I will wait for Luca
> to confirm on his
> side as I believe he used a different board in his test.
Also I tried to switch the order of the cmdline parameter in the device tree,
for example use:
xen,xen-bootargs = “dom0_mem=512M console=dtuart dtuart=serial0:115200n8
noreboot bootscrub=0 iommu=no”;
This time I had:
```
[...]
(XEN) Command line: dom0_mem=512M console=dtuart dtuart=serial0:115200n8
noreboot bootscrub=0 iommu=no
[…]
(XEN) Allocating 1:1 mappings totalling 512MB for dom0:
[…]
```
So I think we are fine.
Kind regards,
Henry
>
> Tested-by: Henry Wang <Henry.Wang@xxxxxxx>
>
> Kind regards,
> Henry
>
>>
>> ~Andrew
>
|