All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Ian Jackson" <iwj@xenproject.org>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86/kexec: Fix crash on transition to a 32bit kernel on AMD hardware
Date: Tue, 2 Nov 2021 13:54:18 +0100	[thread overview]
Message-ID: <225c0ac3-cc57-d26b-acd1-b62dbcffd002@suse.com> (raw)
In-Reply-To: <20211028232658.20637-1-andrew.cooper3@citrix.com>

On 29.10.2021 01:26, Andrew Cooper wrote:
> The `ljmp *mem` instruction is (famously?) not binary compatible between Intel
> and AMD CPUS.  The AMD-compatible version would require .long to be .quad in
> the second hunk.

From all sources I have the incompatibility is only with REX.W: Intel
honors it (allowing a mem64:16) operand, while AMD ignores it (using
the same mem32:16 operand form as without REX.W). All the same as for
L{F,G,S}S. Hence I do not see why the present form of (32-bit) LJMP
would be a problem anywhere.

> Switch to using lretq, which is compatible between Intel and AMD, as well as
> being less logic overall.

I certainly don't mind the switch to LRETQ, but then the reasoning
will imo need to change.

Jan



      parent reply	other threads:[~2021-11-02 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 23:26 [PATCH] x86/kexec: Fix crash on transition to a 32bit kernel on AMD hardware Andrew Cooper
2021-11-01 10:53 ` Ian Jackson
2021-11-01 11:10   ` Andrew Cooper
2021-11-01 12:13     ` Ian Jackson
2021-11-01 17:32       ` Andrew Cooper
2021-11-02 15:54         ` Ian Jackson
2021-11-02 12:54 ` Jan Beulich [this message]

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=225c0ac3-cc57-d26b-acd1-b62dbcffd002@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=roger.pau@citrix.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.