From nobody Mon Feb 9 14:16:49 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556739664; cv=none; d=zoho.com; s=zohoarc; b=YrZ4k3a5c8MeaItE3NTDWTqmrkF4gnoSs79PkNxbO2T8OxBTlJOZmgQjB9PaxkC6BunuVj9FyzMPXsxP9TyK1EWHiVOHWRUpc5QImcLuvv9C/o0CZUm2ZDd7kn6k8U+ksdHlw4m4BXC0Z9JlbNSoIikRRROlrmVYMx45oLYSf0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556739664; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=YAbUZAcaDNCtNBzUoJiwJ2xLFkZ3cJN7/PWi+phUX7E=; b=PCatll4EqvLD0hOWwLHLM1NC95NS2L4KpUllSGxKi/DLyLy1Q3yci8gVXTzgItyc935fzFbalwX2BHXX4HoXVCd5oPtd7L+V8qKd0dY3wfWIvkLv/kj1zhOvSkBzrO9hWRJS5vtZ3gfhdHPcxW94Ts8Y8RGn2RYOAGqq2oLYHFU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1556739664712505.119671356627; Wed, 1 May 2019 12:41:04 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLv4m-0005LS-5n; Wed, 01 May 2019 19:39:32 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLv4j-0005Kf-Rd for xen-devel@lists.xenproject.org; Wed, 01 May 2019 19:39:29 +0000 Received: from merlin.infradead.org (unknown [2001:8b0:10b:1231::1]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id d458816c-6c48-11e9-843c-bc764e045a96; Wed, 01 May 2019 19:39:27 +0000 (UTC) Received: from [2001:8b0:10b:1::425] (helo=i7.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLv4g-0002zh-7B for xen-devel@lists.xenproject.org; Wed, 01 May 2019 19:39:26 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hLv4f-0032Tn-B0 for xen-devel@lists.xenproject.org; Wed, 01 May 2019 20:39:25 +0100 X-Inumbo-ID: d458816c-6c48-11e9-843c-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Sender:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t9E7pu9at/53pp9oDXmZsG7ew0X0zcfFkOs5eiB10Ts=; b=FIZlNXSSzNGR5s8V3FQalgtBD CAWWWizN4+dh4+ZnqvFO5incJIe76cBDZ2JqK8JSQ3om8T7IH1JyO/F+Z6doPlvdsiHNsiXmJsLEr /FM9dIthl04uwTFbthz/w8EGL8uB2mN6s46eJD/PNNRwn12WDHFP0XBou4zyH7pNC80dK9stg2deg l0zggkaQH6NXhencnt8+PlM6FnaO7XFMA8AsL/hg3SWTwnQ47MnDosgVSB9XxJ6nc4nKP2tr578kP wm/Mcs20RSeNZmWeppuaQQ1gL96tEUuGR/KDSxm3HUQs/bQvTSiVBZT5JNoKKH0TMCueHqVM5zTXI XP2OFv0VA==; From: David Woodhouse To: xen-devel@lists.xenproject.org Date: Wed, 1 May 2019 20:39:23 +0100 Message-Id: X-Mailer: git-send-email 2.17.2 In-Reply-To: References: In-Reply-To: References: X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Subject: [Xen-devel] [RFC PATCH v2 5/7] x86/boot: Rename trampoline_{start, end} to boot_trampoline_{start, end} X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: David Woodhouse In preparation for splitting the boot and permanent trampolines from each other. Some of these will change back, but most are boot so do the plain search/replace that way first, then a subsequent patch will extract the permanent trampoline code. Signed-off-by: David Woodhouse --- xen/arch/x86/boot/head.S | 12 ++++++------ xen/arch/x86/boot/trampoline.S | 10 +++++----- xen/arch/x86/boot/video.S | 4 ++-- xen/arch/x86/efi/efi-boot.h | 4 ++-- xen/arch/x86/mm.c | 2 +- xen/arch/x86/setup.c | 4 ++-- xen/arch/x86/tboot.c | 6 +++--- xen/arch/x86/x86_64/mm.c | 2 +- xen/arch/x86/xen.lds.S | 6 +++--- xen/include/asm-x86/config.h | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 5b4f211a9b..82342769c7 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -753,20 +753,20 @@ trampoline_setup: cmpb $0, sym_fs(skip_realmode) jz 1f /* If no-real-mode, jump straight to trampoline_protmode_entry */ - lea trampoline_protmode_entry-trampoline_start(%edi),%eax + lea trampoline_protmode_entry-boot_trampoline_start(%edi),%eax /* EBX =3D=3D 0 indicates we are the BP (Boot Processor). */ xor %ebx,%ebx jmp 2f 1: /* Go via 16-bit code in trampoline_boot_cpu_entry */ - lea trampoline_boot_cpu_entry-trampoline_start(%edi),%eax + lea trampoline_boot_cpu_entry-boot_trampoline_start(%edi),%eax 2: pushl $BOOT_CS32 push %eax =20 /* Copy bootstrap trampoline to low memory, below 1MB. */ - mov $sym_offs(trampoline_start),%esi - mov $((trampoline_end - trampoline_start) / 4),%ecx + mov $sym_offs(boot_trampoline_start),%esi + mov $((boot_trampoline_end - boot_trampoline_start) / 4),%ecx rep movsl %fs:(%esi),%es:(%edi) =20 /* Jump into the relocated trampoline. */ @@ -778,8 +778,8 @@ cmdline_parse_early: reloc: #include "reloc.S" =20 -ENTRY(trampoline_start) +ENTRY(boot_trampoline_start) #include "trampoline.S" -ENTRY(trampoline_end) +ENTRY(boot_trampoline_end) =20 #include "x86_64.S" diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index e77b4bea36..0f4a740fcb 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -31,7 +31,7 @@ * to be used for AP startup. */ #undef bootsym -#define bootsym(s) ((s)-trampoline_start) +#define bootsym(s) ((s)-boot_trampoline_start) =20 #define bootsym_rel(sym, off, opnd...) \ bootsym(sym),##opnd; \ @@ -47,7 +47,7 @@ .long 111b - (off) - .; \ .popsection =20 -#define bootdatasym(s) ((s)-trampoline_start) +#define bootdatasym(s) ((s)-boot_trampoline_start) #define bootdatasym_rel(sym, off, opnd...) \ bootdatasym(sym),##opnd; \ 111:; \ @@ -56,7 +56,7 @@ .popsection =20 #undef trampsym -#define trampsym(s) ((s)-trampoline_start) +#define trampsym(s) ((s)-boot_trampoline_start) =20 #define trampsym_rel(sym, off, opnd...) \ trampsym(sym),##opnd; \ @@ -66,7 +66,7 @@ .popsection =20 #undef tramp32sym -#define tramp32sym(s) ((s)-trampoline_start) +#define tramp32sym(s) ((s)-boot_trampoline_start) =20 #define tramp32sym_rel(sym, off, opnd...) \ tramp32sym(sym),##opnd; \ @@ -226,7 +226,7 @@ start64: =20 /* The first page of trampoline is permanent, the rest boot-time only. */ /* Reuse the boot trampoline on the 1st trampoline page as stack for wakeu= p. */ - .equ wakeup_stack, trampoline_start + PAGE_SIZE + .equ wakeup_stack, boot_trampoline_start + PAGE_SIZE .global wakeup_stack =20 /* From here on early boot only. */ diff --git a/xen/arch/x86/boot/video.S b/xen/arch/x86/boot/video.S index 03907e9e9a..5087c6a4d5 100644 --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -15,8 +15,8 @@ =20 #include "video.h" =20 -/* Scratch space layout: trampoline_end to trampoline_end+0x1000. */ -#define modelist bootsym(trampoline_end) /* 2kB (256 entries) */ +/* Scratch space layout: boot_trampoline_end to boot_trampoline_end+0x1000= . */ +#define modelist bootsym(boot_trampoline_end) /* 2kB (256 entries)= */ #define vesa_glob_info (modelist + 0x800) /* 1kB */ #define vesa_mode_info (vesa_glob_info + 0x400) /* 1kB */ =20 diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index abc7d3e3b7..f6f435a4c5 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -232,7 +232,7 @@ static void __init noreturn efi_arch_post_exit_boot(voi= d) u64 cr4 =3D XEN_MINIMAL_CR4 & ~X86_CR4_PGE, efer; =20 efi_arch_relocate_image(__XEN_VIRT_START - xen_phys_start); - memcpy((void *)trampoline_phys, trampoline_start, cfg.size); + memcpy((void *)trampoline_phys, boot_trampoline_start, cfg.size); =20 /* Set system registers and transfer control. */ asm volatile("pushq $0\n\tpopfq"); @@ -565,7 +565,7 @@ static void __init efi_arch_memory_setup(void) cfg.addr =3D 0x100000; =20 if ( efi_enabled(EFI_LOADER) ) - cfg.size =3D trampoline_end - trampoline_start; + cfg.size =3D boot_trampoline_end - boot_trampoline_start; else cfg.size =3D TRAMPOLINE_SPACE + TRAMPOLINE_STACK_SPACE; =20 diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index e6a4cb28f8..7a2e188916 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -314,7 +314,7 @@ void __init arch_init_memory(void) */ BUG_ON(pvh_boot && trampoline_phys !=3D 0x1000); for ( i =3D 0; - i < (pvh_boot ? (1 + PFN_UP(trampoline_end - trampoline_start)) + i < (pvh_boot ? (1 + PFN_UP(boot_trampoline_end - boot_trampolin= e_start)) : 0x100); i++ ) share_xen_page_with_guest(mfn_to_page(_mfn(i)), dom_io, SHARE_rw); diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 5fa7d3b79c..b714e3c237 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1839,8 +1839,8 @@ int __hwdom_init xen_in_range(unsigned long mfn) if ( !xen_regions[0].s ) { /* S3 resume code (and other real mode trampoline code) */ - xen_regions[region_s3].s =3D bootsym_phys(trampoline_start); - xen_regions[region_s3].e =3D bootsym_phys(trampoline_end); + xen_regions[region_s3].s =3D bootsym_phys(boot_trampoline_start); + xen_regions[region_s3].e =3D bootsym_phys(boot_trampoline_end); =20 /* * This needs to remain in sync with the uses of the same symbols = in diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c index fb4616ae83..9e3d9c4c69 100644 --- a/xen/arch/x86/tboot.c +++ b/xen/arch/x86/tboot.c @@ -369,9 +369,9 @@ void tboot_shutdown(uint32_t shutdown_type) */ g_tboot_shared->num_mac_regions =3D 3; /* S3 resume code (and other real mode trampoline code) */ - g_tboot_shared->mac_regions[0].start =3D bootsym_phys(trampoline_s= tart); - g_tboot_shared->mac_regions[0].size =3D bootsym_phys(trampoline_en= d) - - bootsym_phys(trampoline_star= t); + g_tboot_shared->mac_regions[0].start =3D bootsym_phys(boot_trampol= ine_start); + g_tboot_shared->mac_regions[0].size =3D bootsym_phys(boot_trampoli= ne_end) - + bootsym_phys(boot_trampoline= _start); /* hypervisor .text + .rodata */ g_tboot_shared->mac_regions[1].start =3D (uint64_t)__pa(&_stext); g_tboot_shared->mac_regions[1].size =3D __pa(&__2M_rodata_end) - diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index cca4ae926e..ffe8ba2086 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -697,7 +697,7 @@ void __init zap_low_mappings(void) =20 /* Replace with mapping of the boot trampoline only. */ map_pages_to_xen(trampoline_phys, maddr_to_mfn(trampoline_phys), - PFN_UP(trampoline_end - trampoline_start), + PFN_UP(boot_trampoline_end - boot_trampoline_start), __PAGE_HYPERVISOR); } =20 diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 54ac0c0993..5f36b88b92 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -361,12 +361,12 @@ ASSERT(IS_ALIGNED(cpu0_stack, STACK_SIZE), "cpu0_stac= k misaligned") ASSERT(IS_ALIGNED(__init_begin, PAGE_SIZE), "__init_begin misaligned") ASSERT(IS_ALIGNED(__init_end, PAGE_SIZE), "__init_end misaligned") =20 -ASSERT(IS_ALIGNED(trampoline_start, 4), "trampoline_start misaligned") -ASSERT(IS_ALIGNED(trampoline_end, 4), "trampoline_end misaligned") +ASSERT(IS_ALIGNED(boot_trampoline_start, 4), "boot_trampoline_start misali= gned") +ASSERT(IS_ALIGNED(boot_trampoline_end, 4), "boot_trampoline_end misalign= ed") ASSERT(IS_ALIGNED(__bss_start, 8), "__bss_start misaligned") ASSERT(IS_ALIGNED(__bss_end, 8), "__bss_end misaligned") =20 -ASSERT((trampoline_end - trampoline_start) < TRAMPOLINE_SPACE - MBI_SPACE_= MIN, +ASSERT((boot_trampoline_end - boot_trampoline_start) < TRAMPOLINE_SPACE - = MBI_SPACE_MIN, "not enough room for trampoline and mbi data") ASSERT((wakeup_stack - wakeup_stack_start) >=3D WAKEUP_STACK_MIN, "wakeup stack too small") diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 9ef9d03ca7..9b7ed50825 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -91,11 +91,11 @@ #ifndef __ASSEMBLY__ extern unsigned long trampoline_phys; #define bootsym_phys(sym) \ - (((unsigned long)&(sym)-(unsigned long)&trampoline_start)+trampoline_p= hys) + (((unsigned long)&(sym)-(unsigned long)&boot_trampoline_start)+trampol= ine_phys) #define bootsym(sym) \ (*RELOC_HIDE((typeof(&(sym)))__va(__pa(&(sym))), \ - trampoline_phys-__pa(trampoline_start))) -extern char trampoline_start[], trampoline_end[]; + trampoline_phys-__pa(boot_trampoline_start))) +extern char boot_trampoline_start[], boot_trampoline_end[]; extern char trampoline_realmode_entry[]; extern unsigned int trampoline_xen_phys_start; extern unsigned char trampoline_cpu_started; --=20 2.17.2 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel