From: Richard Henderson <richard.henderson@linaro.org>
To: Ard Biesheuvel <ardb@kernel.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <eduardo@habkost.net>
Subject: Re: [RFC PATCH] target/i386: Truncate ESP when exiting from long mode
Date: Thu, 27 Jul 2023 10:56:31 -0700 [thread overview]
Message-ID: <173fb35e-a4c3-4112-afd9-b313c6d95b2e@linaro.org> (raw)
In-Reply-To: <67a8967e-338a-fbd1-1c06-d5a35f2db509@linaro.org>
On 7/26/23 08:01, Richard Henderson wrote:
> On 7/26/23 01:17, Ard Biesheuvel wrote:
>> Hints welcome on where the architectural behavior is specified, and in particular,
>> whether or not other 64-bit GPRs can be relied upon to preserve their full 64-bit
>> length values.
>
> No idea about chapter and verse, but it has the feel of being part and parcel with the
> truncation of eip. While esp is always special, I suspect that none of the GPRs can be
> relied on carrying all bits.
Coincidentally, I was having a gander at the newly announced APX extension [1],
and happened across
3.1.4.1.2 Extended GPR Access (Direct and Indirect)
... Entering/leaving 64-bit mode via traditional (explicit)
control flow does not directly alter the content of the EGPRs
(EGPRs behave similar to R8-R15 in this regard).
which suggests to me that the 8 low registers are squashed to 32-bit
on transition to 32-bit IA-32e mode.
I still have not found similar language in the main architecture manual.
r~
[1]
https://www.intel.com/content/www/us/en/content-details/784266/intel-advanced-performance-extensions-intel-apx-architecture-specification.html
next prev parent reply other threads:[~2023-07-27 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 8:17 [RFC PATCH] target/i386: Truncate ESP when exiting from long mode Ard Biesheuvel
2023-07-26 15:01 ` Richard Henderson
2023-07-27 17:56 ` Richard Henderson [this message]
2023-07-27 21:36 ` Ard Biesheuvel
2023-07-28 0:17 ` Richard Henderson
2023-07-28 16:47 ` Ard Biesheuvel
2023-07-31 8:35 ` Ard Biesheuvel
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=173fb35e-a4c3-4112-afd9-b313c6d95b2e@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ardb@kernel.org \
--cc=eduardo@habkost.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).