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

Re: [PATCH 4/5] multiboot2: parse console= option when setting GOP mode


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Mar 2023 10:52:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=t6z+q7IDztRnIlwyeJV+peCxcITcYbGX7wU+IOeUJbA=; b=KzxLZ3WbuzlMAUhclzN5fvmCjNIgzs00+/yPoo6g2AGnTWe8tUc1iHwDoewGubLqk1B/HzqeV5K+NRQb6mJ0Q50arw8lQb3sIThQ/F8M+mn3pg95r5LTVhmXYPoW4isDS2JokOjDvp4jVGZpGqM2JWiKT0+5bBJs/xAH+E8ws1/LBuzTP1GGgWJfALsPpNBZkP8twJt/ZJMDSsYXECJYaC6kwnyhdwLXRTsY8ZRhxWKkPo7T/bCKNXuyp9lMLB3DC3HzhxoANkAzQszHmwxxXX8gF8EmRYxLAGEQPZ3/r3fA4V4RELB0rx5gjs3HopZXND8BL1o8POvwyYOryOmxBQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=INCrI6aDkRRrcLLcNi6lolqi1ywpN+7aLG0/YB8t9LHWy/z5xPmta5hxGY9PhPKyN41dOpops037cG0uN/k7rLJ+24LkPuP+IBcrmZclHIKc2hsk4meGleOisesxbvC9mEpzxrk4OEfkpgDdlSkDDKDNkpTaLUWq2/0lrUtHzA3h88ElGudPeMxb1L4eqUo4qABgTEUMdoKH4MeY4mzd/oNnN+/um09+Gx2Sc2/gXUbUFLkMBbhx/tkVU4QFqOg0ueaJQjWWOZj5KTDUb1q5vuwJWpFrBgEpYgU8ZoWzhFImq3RjyPSHpcno9DUBBlxKmIVu9511jhUhnLObxcRKnA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: marmarek@xxxxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Daniel Kiper <daniel.kiper@xxxxxxxxxx>
  • Delivery-date: Thu, 30 Mar 2023 08:52:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.03.2023 10:11, Roger Pau Monné wrote:
> On Thu, Mar 30, 2023 at 08:24:20AM +0200, Jan Beulich wrote:
>> On 29.03.2023 18:29, Roger Pau Monné wrote:
>>> On Mon, Dec 05, 2022 at 04:10:28PM +0100, Jan Beulich wrote:
>>>> On 23.11.2022 16:45, Roger Pau Monne wrote:
>>>>> @@ -265,6 +266,15 @@ __efi64_mb2_start:
>>>>>          cmpl    $MULTIBOOT2_TAG_TYPE_END,MB2_tag_type(%rcx)
>>>>>          je      .Lrun_bs
>>>>>  
>>>>> +        /*
>>>>> +         * Get command line from Multiboot2 information.
>>>>> +         * Must be last parsed tag.
>>>>
>>>> Why? And how do you guarantee this?
>>>
>>> I think the comment is misleading, must be the last checked for tag in
>>> the loop that does this in assembly, because it's not using cmove.
>>> I've adjusted to:
>>>
>>>         /* Get command line from Multiboot2 information. */
>>>         cmpl    $MULTIBOOT2_TAG_TYPE_CMDLINE,MB2_tag_type(%rcx)
>>>         jne     .Lno_cmdline
>>>         lea     MB2_tag_string(%rcx),%rdx
>>>         jmp     .Lefi_mb2_next_tag
>>> .Lno_cmdline:
>>>
>>> Maybe there's some instruction I'm missing similar to a conditional
>>> lea?
>>
>> There isn't. If you want to get away without conditional branch, then
>> you'll need to LEA to a scratch register (unconditional) and then
>> CMOVcc from that scratch register.
> 
> Likely not worth it, unless you dislike the extra conditional branch.

Entirely up to you - I'm fine either way.

Jan



 


Rackspace

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