All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: marmarek@invisiblethingslab.com,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	xen-devel@lists.xenproject.org,
	Daniel Kiper <daniel.kiper@oracle.com>
Subject: Re: [PATCH 4/5] multiboot2: parse console= option when setting GOP mode
Date: Thu, 30 Mar 2023 10:11:50 +0200	[thread overview]
Message-ID: <ZCVERoX9+LdQ/GIL@Air-de-Roger> (raw)
In-Reply-To: <8fb2f771-3354-3f52-f923-e7fe7861cfbf@suse.com>

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.

Thanks, Roger.


  reply	other threads:[~2023-03-30  8:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 15:45 [PATCH 0/5] gfx: improvements when using multiboot2 and EFI + misc Roger Pau Monne
2022-11-23 15:45 ` [PATCH 1/5] x86/platform: introduce hypercall to get initial video console settings Roger Pau Monne
2022-12-05 13:00   ` Jan Beulich
2022-11-23 15:45 ` [PATCH 2/5] efi: only set a console mode if the current one is invalid Roger Pau Monne
2022-12-05 14:19   ` Jan Beulich
2023-03-30 15:44     ` Roger Pau Monné
2023-03-30 16:07       ` Jan Beulich
2023-03-30 16:17         ` Roger Pau Monné
2023-03-31  6:51           ` Jan Beulich
2023-03-31  7:37             ` Roger Pau Monné
2023-04-03 11:03               ` Jan Beulich
2022-11-23 15:45 ` [PATCH 3/5] efi: try to use the currently set GOP mode Roger Pau Monne
2022-12-05 14:32   ` Jan Beulich
2022-11-23 15:45 ` [PATCH 4/5] multiboot2: parse console= option when setting " Roger Pau Monne
2022-12-05 15:10   ` Jan Beulich
2022-12-05 16:01     ` Jan Beulich
2022-12-13 11:41     ` Daniel Kiper
2023-03-29 16:29     ` Roger Pau Monné
2023-03-30  6:24       ` Jan Beulich
2023-03-30  8:11         ` Roger Pau Monné [this message]
2023-03-30  8:52           ` Jan Beulich
2022-11-23 15:45 ` [PATCH 5/5] multiboot2: parse vga= " Roger Pau Monne
2022-12-05 16:26   ` Jan Beulich
2022-11-24  5:15 ` [PATCH 0/5] gfx: improvements when using multiboot2 and EFI + misc Marek Marczykowski-Górecki
2022-11-24  8:11   ` Jan Beulich
2022-11-24  8:59   ` Roger Pau Monné
2022-11-24  9:56     ` Roger Pau Monné
2022-11-24 15:00       ` Marek Marczykowski-Górecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZCVERoX9+LdQ/GIL@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.