From: Andi Kleen <ak@linux.intel.com>
To: "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, "H. Peter Anvin" <hpa@zytor.com>,
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 01:57:18 -0800 [thread overview]
Message-ID: <ZbIwfp-jOOlPNb1z@tassilo> (raw)
In-Reply-To: <20240124131510.496803-1-kirill.shutemov@linux.intel.com>
> + /* 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
next prev parent reply other threads:[~2024-01-25 9:57 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 [this message]
2024-01-25 11:44 ` Kirill A. Shutemov
2024-01-25 14:50 ` Andi Kleen
2024-01-25 13:07 ` H. Peter Anvin
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=ZbIwfp-jOOlPNb1z@tassilo \
--to=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.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 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.