From nobody Fri Nov 22 08:46:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1727795724; cv=none; d=zohomail.com; s=zohoarc; b=JYNQYciowoU6Dgbd+T9OhtxKXUjhb48BrUzQVmEOZpOZIqlhdIxsLMFK/D/pJnQfr7yQ5ipj14R3hP2H+XaP5ROqsxxYIhTWSzpk5IbxlXB0TQ71ycT1ZPmgQI0eChDvL8pUl+T/cYQAakXQPuWS/Lrx09OtYD/W6gMDDtveDKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727795724; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rufSU9IFyOi2Hu7y05gtjyGOO2lB8zNytXCa+p88a/8=; b=QGRE14NNRV/GyCNlu/82chkTj5y/1hkb/+38cbh/RcEM+zya1GMLfVfC7snbJkRX32xIv1UYpEjkeW7aHq4EQQUAJM9cv0ndKut+5iAaawxhOXbC32ZfYCgJaGlMRwrP1QHDk5IhTiCNYIn+6rapfO1RgYtjJdoczd2g+drf+FA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1727795724114843.2364861739463; Tue, 1 Oct 2024 08:15:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.808236.1220091 (Exim 4.92) (envelope-from ) id 1sveai-0006Ec-C3; Tue, 01 Oct 2024 15:15:08 +0000 Received: by outflank-mailman (output) from mailman id 808236.1220091; Tue, 01 Oct 2024 15:15:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sveai-0006EV-97; Tue, 01 Oct 2024 15:15:08 +0000 Received: by outflank-mailman (input) for mailman id 808236; Tue, 01 Oct 2024 15:15:07 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sveah-000652-Fi for xen-devel@lists.xenproject.org; Tue, 01 Oct 2024 15:15:07 +0000 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [2a00:1450:4864:20::630]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f06c1a44-8007-11ef-99a2-01e77a169b0f; Tue, 01 Oct 2024 17:15:06 +0200 (CEST) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a8a789c4fc5so1141308466b.0 for ; Tue, 01 Oct 2024 08:15:06 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c29481edsm723426566b.131.2024.10.01.08.15.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2024 08:15:05 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f06c1a44-8007-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1727795705; x=1728400505; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rufSU9IFyOi2Hu7y05gtjyGOO2lB8zNytXCa+p88a/8=; b=eArXq2/ZvPLJZ9BmLXPKk7I/Pllh8f3sG99FBFNGu0GDIGRv10lH+oc/8V24nBXCZk 0KDYK0+JVTe48P1DpEfeRpCK2gxVZAorDWCbOJyql8XlN6ySjbeGcX9GMA4Bflj/vaPf Z+XsBN6jQH4rzezGbUMhuQWJPDHqzqYBwmn5ktibKcfNpcvaCY1v1EaPGRS1Y6nm4Hpv gaVgesvfNdBlZKdP1jcJaw66E0+pehMUQcbmRgEsOr7n10CkvSty3gTzaHxD5PFdCn7j sxgg8QIPQ3pnJGAxC+az+UfFR49Usa3bt+B1/bBsvF9MLz7RtCUWqXRo7R9SLsMWZJNZ jO2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727795705; x=1728400505; h=content-transfer-encoding:in-reply-to:autocrypt:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rufSU9IFyOi2Hu7y05gtjyGOO2lB8zNytXCa+p88a/8=; b=nIpHxcZLu0JY+Wr/HcUl+5Dh/FUNw36/UzWbTIyB4fH4ryaqusepC16O7mhle8WQ0b Nj3liu0aB47z65i3cUaq5oZVAyTMSXGb3/ZSHIQjIH5YhNCk66CIwybmADg/OOxl6pRM VFYY9cqbWT9SAoUmtCcXkUkgpQyy/xg+ClW2XcSj5GX6DG+CKII0wDe9RK08WwQehVhA AAd6873T2qMxuMZDMt4/Umj4lssLZhhGOZ/BD6071AIj4GFEHlOsjpjQFkPSKlw2UXlk Rd4XvwcCPi4YZQBBDY2Br+qljvhAN8nuEzDhdC0j1cOI9NqkDdUOSazaccyfRZstYeF8 dHQw== X-Gm-Message-State: AOJu0Yw/KHZnlClM2La/ewWSbVDmuzXuDdOskYW+Vox1UFObBTrEOk8N LEwxjLBrcrvPXdkzc+UXz3c46101/2wOGORrc+qM+rXlNUQmByLOTzLNAjQmFwxk8nakmIE4+Vw = X-Google-Smtp-Source: AGHT+IHd/zr4PPoUeuPQMUipHdxm8EYs/MIwjHh9EhCFeRC1P/5NbxohnSK5+Dl64gnvHUT0/tp/3w== X-Received: by 2002:a17:907:3e85:b0:a8d:505a:5458 with SMTP id a640c23a62f3a-a967bf10f20mr463446266b.10.1727795705438; Tue, 01 Oct 2024 08:15:05 -0700 (PDT) Message-ID: <6b66c48e-241e-4a8f-9221-4693e92f50ba@suse.com> Date: Tue, 1 Oct 2024 17:15:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v7 04/11] x86/kexec: convert entry point annotations From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <98590a41-cee7-4ba3-a723-4e3ee3b55357@suse.com> Content-Language: en-US Cc: Andrew Cooper Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSu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t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <98590a41-cee7-4ba3-a723-4e3ee3b55357@suse.com> Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1727795725667116600 Content-Type: text/plain; charset="utf-8" Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- v7: Use alternative approach, un-defining CONFIG_CC_SPLIT_SECTIONS. v6: New. --- a/xen/arch/x86/x86_64/kexec_reloc.S +++ b/xen/arch/x86/x86_64/kexec_reloc.S @@ -13,6 +13,9 @@ =20 .file __FILE__ =20 +/* All contents of .text.kexec wants to be kept together. */ +#undef CONFIG_CC_SPLIT_SECTIONS + #include =20 #include @@ -21,10 +24,9 @@ #include =20 .section .text.kexec, "ax", @progbits - .align PAGE_SIZE .code64 =20 -ENTRY(kexec_reloc) +FUNC(kexec_reloc, PAGE_SIZE) /* %rdi - code page maddr */ /* %rsi - page table maddr */ /* %rdx - indirection page maddr */ @@ -91,8 +93,9 @@ ENTRY(kexec_reloc) push $0x10 push %rax lretq +END(kexec_reloc) =20 -relocate_pages: +FUNC_LOCAL(relocate_pages) /* %rdi - indirection page maddr */ pushq %rbx =20 @@ -138,10 +141,11 @@ relocate_pages: .L_done: popq %rbx ret +END(relocate_pages) =20 .code32 =20 -compatibility_mode: +FUNC_LOCAL(compatibility_mode) /* Setup some sane segments. */ movl $0x0008, %eax movl %eax, %ds @@ -168,39 +172,29 @@ compatibility_mode: /* Call the image entry point. This should never return. */ call *%ebp ud2 +END(compatibility_mode) =20 - .align 4 -compat_mode_gdt_desc: +DATA_LOCAL(compat_mode_gdt_desc, 4) .word .Lcompat_mode_gdt_end - compat_mode_gdt -1 .quad 0x0000000000000000 /* set in call_32_bit above */ +END(compat_mode_gdt_desc) =20 - .type compat_mode_gdt_desc, @object - .size compat_mode_gdt_desc, . - compat_mode_gdt_desc - - .align 8 -compat_mode_gdt: +DATA_LOCAL(compat_mode_gdt, 8) .quad 0x0000000000000000 /* null = */ .quad 0x00cf93000000ffff /* 0x0008 ring 0 data = */ .quad 0x00cf9b000000ffff /* 0x0010 ring 0 code, compatibility = */ .Lcompat_mode_gdt_end: +END(compat_mode_gdt) =20 - .type compat_mode_gdt, @object - .size compat_mode_gdt, . - compat_mode_gdt - -compat_mode_idt: +DATA_LOCAL(compat_mode_idt) .word 0 /* limit */ .long 0 /* base */ - - .type compat_mode_idt, @object - .size compat_mode_idt, . - compat_mode_idt +END(compat_mode_idt) =20 /* * 16 words of stack are more than enough. */ - .align 8 -reloc_stack: +DATA_LOCAL(reloc_stack, 8) .fill 16,8,0 .Lreloc_stack_base: - - .type reloc_stack, @object - .size reloc_stack, . - reloc_stack +END(reloc_stack)