From: "H. Peter Anvin" <hpa@zytor.com>
To: Andi Kleen <ak@linux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Kai Huang <kai.huang@intel.com>,
Sean Christopherson <seanjc@google.com>
Subject: Re: [PATCHv3, RESEND] x86/trampoline: Bypass compat mode in trampoline_start64() if not needed
Date: Thu, 25 Jan 2024 05:07:47 -0800 [thread overview]
Message-ID: <E4904B95-C2EC-4FAF-9CB7-8F377CEA6972@zytor.com> (raw)
In-Reply-To: <ZbIwfp-jOOlPNb1z@tassilo>
On January 25, 2024 1:57:18 AM PST, Andi Kleen <ak@linux.intel.com> wrote:
>> + /* Paging mode is correct proceed in 64-bit mode */
>> +
>> + LOCK_AND_LOAD_REALMODE_ESP lock_rip=1
>> +
>> + movw $__KERNEL_DS, %dx
>> + movl %edx, %ss
>> + addl $pa_real_mode_base, %esp
>> + movl %edx, %ds
>> + movl %edx, %es
>> + movl %edx, %fs
>> + movl %edx, %gs
>> +
>> + movl $pa_trampoline_pgd, %eax
>> + movq %rax, %cr3
>> +
>> + jmpq *tr_start(%rip)
>
>Still think we should add a far jump here so that we run on a defined
>code segment. It probably doesn't matter since there are likely no
>IRETs before reloading anyways, but it seems cleaner.
>
>-Andi
>
Agreed.
prev parent reply other threads:[~2024-01-25 13:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 13:15 [PATCHv3, RESEND] x86/trampoline: Bypass compat mode in trampoline_start64() if not needed Kirill A. Shutemov
2024-01-25 9:57 ` Andi Kleen
2024-01-25 11:44 ` Kirill A. Shutemov
2024-01-25 14:50 ` Andi Kleen
2024-01-25 13:07 ` H. Peter Anvin [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=E4904B95-C2EC-4FAF-9CB7-8F377CEA6972@zytor.com \
--to=hpa@zytor.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kai.huang@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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