Message ID | 20240107122847.27740-1-kirill.shutemov@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp513885dyq; Sun, 7 Jan 2024 04:29:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPJqXKQlWWWxMhDHGcbGSKSQM7OC6UkgV46UsM/Gvc834qpWXZeGstsSoVH6aW+Y548UTB X-Received: by 2002:ac8:5f4c:0:b0:425:8d08:14f8 with SMTP id y12-20020ac85f4c000000b004258d0814f8mr2870379qta.35.1704630568281; Sun, 07 Jan 2024 04:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704630568; cv=none; d=google.com; s=arc-20160816; b=VLGxToiFdSdmDMH2KmLPfHpzCR8NEhE1IOW01A4ho417gOgaxP/ox5/9qVq2rPuWu2 LKcyHxsE5VPUEeVpz9b/qpI3wqH6J6s8uwTAebSlVz6FpVnDxZPUVaE/xPVB0FVFkkpl qUwccqCwXG6O9K062kWHY8iruJa9mQeKKzpUosAFR5g4jFVQUF3STyTPz92iJn7aTxVO HIgNqTgxcr4rQO+5TYubtnWpgSKxwR3H5o7pH8o9bEArHdXwbFretk953GzHXuBF/q37 SrkVy1MK6Wx/mt+jsG3ekYtzqUIUUfpbrnK1zT1AeQwfZu/hS6XaM0lUnXp8Pi0g9/Xt 4oHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yh9ryrFZKn8h9oolPLtUIk4cJ9v3hI2ynG7s/VJsUA8=; fh=OoRKjb2TylHnyV/boMqmij9jZddb+zOyNbbkz0GZ8TQ=; b=wuWqMPUGn92T/TUwq5+FFHUCRPkrYeakDyae6WEc6l7SxRgdBPp002ffCFHNA8jwuv Q5SIaoMz/jaL3p/nNizdb56DuqIM+z1X5TRkfUmiMq/35jOytkvuiu1VJxwhe3ckQ547 Fx8sQb7Lmbs14SE1B5oXdb001OW7moTf94niNir1j9Ji8se6oTbe+FzCZC+h9JLAQPaF /z5Px+rYJuyTrTE7iTl19wEcmh3v58QzOvq/MpviWhFfwRavrFvAw2pcbfytCiqbQvkn 4Qry2GltBovOTOfKfajuskb4rfjX8m7JhtnRoC4gcgpgfA/HMnROHGlJKS3BbwswJKoV ii0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fUZPqRDq; spf=pass (google.com: domain of linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f39-20020a05622a1a2700b0042994a41f0csi125607qtb.560.2024.01.07.04.29.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 04:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fUZPqRDq; spf=pass (google.com: domain of linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 180B41C20C68 for <ouuuleilei@gmail.com>; Sun, 7 Jan 2024 12:29:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D54C134CB; Sun, 7 Jan 2024 12:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fUZPqRDq" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6F06134BA for <linux-kernel@vger.kernel.org>; Sun, 7 Jan 2024 12:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704630542; x=1736166542; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VCDNpS4klszuxogddz8jC2xyn6frhvJkBET0nHWruIE=; b=fUZPqRDqDMXVLv6CgyEGiAj0YrfDxo4nv9pRVxVf7FjBtv/XGNE28o37 dk/GxU+xu6iTcU48wbZcoFITBRMOP3cjyGEJp7cmdGNz21+GUTUDFt6kJ G7k7txN60mmc4d0MunMaJ93o8LGlgmMoRapHCx7xxoszjiy2qfhUzghC3 fhPL3EJE4MxObALO586xWusRxKLO//6Z2/fqrg8RfUDnFoKw0Whg0lSab 3XNBxId+LkoxFO7vLVuXy88U3f7QjvF/jZsMNB3UUg6BIlSArmzCq3Wpe KHMnoQnpvoE9tLMSAapTssl4/ucXgAPEpCHm8fmAWy0dWN5tLH72xu8bJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="4523779" X-IronPort-AV: E=Sophos;i="6.04,338,1695711600"; d="scan'208";a="4523779" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2024 04:29:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="809972489" X-IronPort-AV: E=Sophos;i="6.04,338,1695711600"; d="scan'208";a="809972489" Received: from hoffbaue-mobl1.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.211.166]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2024 04:28:57 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id E8AC0109E5C; Sun, 7 Jan 2024 15:28:54 +0300 (+03) From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Andi Kleen <ak@linux.intel.com>, Sean Christopherson <seanjc@google.com> Subject: [PATCHv2] x86/trampoline: Bypass compat mode in trampoline_start64() if not needed Date: Sun, 7 Jan 2024 15:28:47 +0300 Message-ID: <20240107122847.27740-1-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787434702916756672 X-GMAIL-MSGID: 1787434702916756672 |
Series |
[PATCHv2] x86/trampoline: Bypass compat mode in trampoline_start64() if not needed
|
|
Commit Message
Kirill A. Shutemov
Jan. 7, 2024, 12:28 p.m. UTC
The trampoline_start64() vector is used when a secondary CPU starts in 64-bit mode. The current implementation directly enters compatibility mode. It is necessary to disable paging and re-enable it in the correct paging mode: either 4- or 5-level, depending on the configuration. The X86S[1] ISA does not support compatibility mode in ring 0, and paging cannot be disabled. The trampoline_start64() function is reworked to only enter compatibility mode if it is necessary to change the paging mode. If the CPU is already in the desired paging mode, it will proceed in long mode. This change will allow a secondary CPU to boot on an X86S machine as long as the CPU is already in the correct paging mode. In the future, there will be a mechanism to switch between paging modes without disabling paging. [1] https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Andi Kleen <ak@linux.intel.com> Cc: Sean Christopherson <seanjc@google.com> --- v2: - Fix build with GCC; --- arch/x86/realmode/rm/trampoline_64.S | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-)
Comments
On Sun, 2024-01-07 at 15:28 +0300, Kirill A. Shutemov wrote: > The trampoline_start64() vector is used when a secondary CPU starts in > 64-bit mode. The current implementation directly enters compatibility > mode. It is necessary to disable paging and re-enable it in the correct > paging mode: either 4- or 5-level, depending on the configuration. > > The X86S[1] ISA does not support compatibility mode in ring 0, and > paging cannot be disabled. > > The trampoline_start64() function is reworked to only enter compatibility > mode if it is necessary to change the paging mode. If the CPU is already > in the desired paging mode, it will proceed in long mode. > > This change will allow a secondary CPU to boot on an X86S machine as > long as the CPU is already in the correct paging mode. > > In the future, there will be a mechanism to switch between paging modes > without disabling paging. > > [1] https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > Reviewed-by: Andi Kleen <ak@linux.intel.com> > Cc: Sean Christopherson <seanjc@google.com> > > --- > v2: > - Fix build with GCC; > --- > arch/x86/realmode/rm/trampoline_64.S | 31 +++++++++++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S > index c9f76fae902e..c07354542188 100644 > --- a/arch/x86/realmode/rm/trampoline_64.S > +++ b/arch/x86/realmode/rm/trampoline_64.S > @@ -37,13 +37,15 @@ > .text > .code16 > > -.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 > +.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 lock_rip=0 > /* > * Make sure only one CPU fiddles with the realmode stack > */ > .Llock_rm\@: > .if \lock_pa > lock btsl $0, pa_tr_lock > + .elseif \lock_rip > + lock btsl $0, tr_lock(%rip) > .else > lock btsl $0, tr_lock > .endif > @@ -220,6 +222,33 @@ SYM_CODE_START(trampoline_start64) > lidt tr_idt(%rip) > lgdt tr_gdt64(%rip) > > + /* Check if paging mode has to be changed */ > + movq %cr4, %rax > + xorq tr_cr4(%rip), %rax > + andq $X86_CR4_LA57, %rax > + jnz .L_switch_paging This seems depends on the BIOS will always use 4-level paging. Can we make such assumption? > + > + /* 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) IIUC you won't be using __KERNEL_CS in this case? Not sure whether this matters though, because the spec says in 64-bit mode the hardware treats CS,DS,ES,SS as zero. > +.L_switch_paging: > + /* > + * To switch between 4- and 5-level paging modes, it is necessary > + * to disable paging. This must be done in the compatibility mode. > + */ > ljmpl *tr_compat(%rip) > SYM_CODE_END(trampoline_start64) >
On Mon, Jan 08, 2024 at 01:10:31PM +0000, Huang, Kai wrote: > On Sun, 2024-01-07 at 15:28 +0300, Kirill A. Shutemov wrote: > > The trampoline_start64() vector is used when a secondary CPU starts in > > 64-bit mode. The current implementation directly enters compatibility > > mode. It is necessary to disable paging and re-enable it in the correct > > paging mode: either 4- or 5-level, depending on the configuration. > > > > The X86S[1] ISA does not support compatibility mode in ring 0, and > > paging cannot be disabled. > > > > The trampoline_start64() function is reworked to only enter compatibility > > mode if it is necessary to change the paging mode. If the CPU is already > > in the desired paging mode, it will proceed in long mode. > > > > This change will allow a secondary CPU to boot on an X86S machine as > > long as the CPU is already in the correct paging mode. > > > > In the future, there will be a mechanism to switch between paging modes > > without disabling paging. > > > > [1] https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html > > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > > Reviewed-by: Andi Kleen <ak@linux.intel.com> > > Cc: Sean Christopherson <seanjc@google.com> > > > > --- > > v2: > > - Fix build with GCC; > > --- > > arch/x86/realmode/rm/trampoline_64.S | 31 +++++++++++++++++++++++++++- > > 1 file changed, 30 insertions(+), 1 deletion(-) > > > > diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S > > index c9f76fae902e..c07354542188 100644 > > --- a/arch/x86/realmode/rm/trampoline_64.S > > +++ b/arch/x86/realmode/rm/trampoline_64.S > > @@ -37,13 +37,15 @@ > > .text > > .code16 > > > > -.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 > > +.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 lock_rip=0 > > /* > > * Make sure only one CPU fiddles with the realmode stack > > */ > > .Llock_rm\@: > > .if \lock_pa > > lock btsl $0, pa_tr_lock > > + .elseif \lock_rip > > + lock btsl $0, tr_lock(%rip) > > .else > > lock btsl $0, tr_lock > > .endif > > @@ -220,6 +222,33 @@ SYM_CODE_START(trampoline_start64) > > lidt tr_idt(%rip) > > lgdt tr_gdt64(%rip) > > > > + /* Check if paging mode has to be changed */ > > + movq %cr4, %rax > > + xorq tr_cr4(%rip), %rax > > + andq $X86_CR4_LA57, %rax > > + jnz .L_switch_paging > > This seems depends on the BIOS will always use 4-level paging. Can we make such > assumption? What makes you think this? The check is basically if ((tr_cr4 ^ CR4) & X86_CR4_LA57) goto .L_switch_paging; It means if LA57 is not the same between tr_cr4 and CR4 we need to change paging mode. > > + > > + /* 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) > > IIUC you won't be using __KERNEL_CS in this case? Not sure whether this matters > though, because the spec says in 64-bit mode the hardware treats CS,DS,ES,SS as > zero. > secondary_startup_64() will set CS to __KERNEL_CS before jumping to C code. > > +.L_switch_paging: > > + /* > > + * To switch between 4- and 5-level paging modes, it is necessary > > + * to disable paging. This must be done in the compatibility mode. > > + */ > > ljmpl *tr_compat(%rip) > > SYM_CODE_END(trampoline_start64) > > >
On Sun, Jan 07, 2024, Kirill A. Shutemov wrote: > @@ -220,6 +222,33 @@ SYM_CODE_START(trampoline_start64) > lidt tr_idt(%rip) > lgdt tr_gdt64(%rip) > > + /* Check if paging mode has to be changed */ > + movq %cr4, %rax > + xorq tr_cr4(%rip), %rax This is buggy, tr_cr4 is only 4 bytes. And even if tr_cr4 were 8 bytes, the reason why nothing showed up in testing is also why only 4 bytes need to be XOR'd: the upper 32 bits of the result are never consumed. > + andq $X86_CR4_LA57, %rax Nit, this can be TEST instead of AND, e.g. I was looking to see if RAX was used anywhere in the flow. And in theory it's possible a CPU could support uop fusing for TEST+Jcc but not AND+Jcc, cause shaving a cycle in this code is obviously super important ;-) And as above, testl, not testq. > + jnz .L_switch_paging > + > + /* 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) > +.L_switch_paging: > + /* > + * To switch between 4- and 5-level paging modes, it is necessary > + * to disable paging. This must be done in the compatibility mode. > + */ > ljmpl *tr_compat(%rip) > SYM_CODE_END(trampoline_start64) > > -- > 2.41.0 >
On Mon, Jan 08, 2024 at 08:18:55AM -0800, Sean Christopherson wrote: > On Sun, Jan 07, 2024, Kirill A. Shutemov wrote: > > @@ -220,6 +222,33 @@ SYM_CODE_START(trampoline_start64) > > lidt tr_idt(%rip) > > lgdt tr_gdt64(%rip) > > > > + /* Check if paging mode has to be changed */ > > + movq %cr4, %rax > > + xorq tr_cr4(%rip), %rax > > This is buggy, tr_cr4 is only 4 bytes. And even if tr_cr4 were 8 bytes, the reason > why nothing showed up in testing is also why only 4 bytes need to be XOR'd: the > upper 32 bits of the result are never consumed. Oh. Good catch. Will fix. tr_cr4 will need to be changed to 8 bytes soonish. FRED uses bit 32 of the register. > > + andq $X86_CR4_LA57, %rax > > Nit, this can be TEST instead of AND, e.g. I was looking to see if RAX was used > anywhere in the flow. And in theory it's possible a CPU could support uop fusing > for TEST+Jcc but not AND+Jcc, cause shaving a cycle in this code is obviously > super important ;-) > > And as above, testl, not testq. Fair enough. Will use testl.
> This seems depends on the BIOS will always use 4-level paging. Can we make such > assumption? Yes I believe it's fine. All BIOS on 5 level capable systems currently only use 4-level when passing control to someone else. (although I cannot find the quote in the UEFI spec currently, will check on that) The UEFI run time environment is defined as 4-level. Changing that would break compatibility OS supprt at least for run time services. > > > + > > + /* 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) > > IIUC you won't be using __KERNEL_CS in this case? Not sure whether this matters > though, because the spec says in 64-bit mode the hardware treats CS,DS,ES,SS as > zero. That's a good catch. Might be better to use __KERNEL_CS. Otherwise if a IRET happens later and it tries to reload CS it might fault. Probably doesn't happen before another reload happens anyways, but it's better to avoid it. -Andi
diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S index c9f76fae902e..c07354542188 100644 --- a/arch/x86/realmode/rm/trampoline_64.S +++ b/arch/x86/realmode/rm/trampoline_64.S @@ -37,13 +37,15 @@ .text .code16 -.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 +.macro LOCK_AND_LOAD_REALMODE_ESP lock_pa=0 lock_rip=0 /* * Make sure only one CPU fiddles with the realmode stack */ .Llock_rm\@: .if \lock_pa lock btsl $0, pa_tr_lock + .elseif \lock_rip + lock btsl $0, tr_lock(%rip) .else lock btsl $0, tr_lock .endif @@ -220,6 +222,33 @@ SYM_CODE_START(trampoline_start64) lidt tr_idt(%rip) lgdt tr_gdt64(%rip) + /* Check if paging mode has to be changed */ + movq %cr4, %rax + xorq tr_cr4(%rip), %rax + andq $X86_CR4_LA57, %rax + jnz .L_switch_paging + + /* 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) +.L_switch_paging: + /* + * To switch between 4- and 5-level paging modes, it is necessary + * to disable paging. This must be done in the compatibility mode. + */ ljmpl *tr_compat(%rip) SYM_CODE_END(trampoline_start64)