From patchwork Wed Feb 7 13:36:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C09A8C4828D for ; Wed, 7 Feb 2024 13:36:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677560.1054224 (Exim 4.92) (envelope-from ) id 1rXi6Y-0008BD-1c; Wed, 07 Feb 2024 13:36:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677560.1054224; Wed, 07 Feb 2024 13:36:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi6X-0008B6-V4; Wed, 07 Feb 2024 13:36:45 +0000 Received: by outflank-mailman (input) for mailman id 677560; Wed, 07 Feb 2024 13:36:45 +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 1rXi6W-0007fa-W5 for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:36:44 +0000 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [2a00:1450:4864:20::42a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ede63ab8-c5bd-11ee-98f5-efadbce2ee36; Wed, 07 Feb 2024 14:36:42 +0100 (CET) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-33b189ae5e8so419539f8f.2 for ; Wed, 07 Feb 2024 05:36:42 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.36.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:36:41 -0800 (PST) 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: ede63ab8-c5bd-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313002; x=1707917802; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=XBbuaqP2Yx3a79KtXTeTOOaIP4tI4ggPxVsGqod4xkQ=; b=ZVNu3O41pUetosxip8Wp5bxVP7uETem9CWyYInQNeAyeshWY7otDXTEOvQwsp7RNfX nHRxuDiJK1laFyurwXq3baPc/+r6R6CnYL5LcfNjWMGMcfFEMaqX+RhnIBWNrYIxzGjb 5ZxX5JValVIYZmbS3oyczofzX5rDMiIV2xHngqbTPsjDbYyAHBfsbfNZnMuBWVKhSqdX 2Ki9cft4Bm9p1f+k3nufz+1Ff8u7Td1+c4q6KBvc2evs2tXRvQPE1QZcVDprgN5DJ5l0 phs76cPy/Fzr3fgTcEmvSJDSpMFRJzozNwCkSTQsFI5NSSQyhGkoN1g+AmbVdP3IF/3J 8MJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313002; x=1707917802; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XBbuaqP2Yx3a79KtXTeTOOaIP4tI4ggPxVsGqod4xkQ=; b=Dr9FjIEJ3NPQcqQZ53EyDt0WgHmv8AKYqXk4ikvMnMlXc6MAnZGzksQHQ68t3ft7aT 4vRGqnlAYT8QS74t72xFLUEC1tYoNWQL7k4Jnj6wBH/nalxNO1KEWX6TbACjjL3QqDT2 DscrzjU3B16sLGgFkPhKjSPXu6DhHN90Rg7JL/v/ONjkv/mCvlny2TRlJpdX5Civ7olW SBUPQxbJIOtEdjM3pViWP3uVKtAtCnDZqPjAYuML5lV3lxrPQ7UT7ZK7FWEKTY5PPj6I G+tDN+QBi4Syt4ipGUBmtzjx0R9pwADfOpLWwz5bgr5WKcUARZ8mW47NsHwjc8q5+ghC v0vg== X-Gm-Message-State: AOJu0Yy/gsW7w7sPYjTohME0eYl2jzr2+wyNPH+qx/iWY69OC1YIglj9 2VA8z/cLyaCN+R6UJLnlBd6GidI4qipBXaZvRbBRvW4D47Wb3SlYnn+z+UzOpyzO4MGcEOS5zp0 = X-Google-Smtp-Source: AGHT+IH1eErRkcqc/6EFZPgTTvBp8bktJo4gueEGOvOTR+LjDzxR9mUOdCImQ6XCeqPVisG8EIrdRQ== X-Received: by 2002:adf:e4cd:0:b0:33b:5192:53d0 with SMTP id v13-20020adfe4cd000000b0033b519253d0mr691003wrm.46.1707313002218; Wed, 07 Feb 2024 05:36:42 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW4dYHoFA87bhX0+CGTEUDvc+ruSx2ZcmhS90KX/uh3b/3xj7c3BjV5uttYUYAS5RMWLObvZEAoDhUYG6oFmaM1yfFtJ2vHZhoh0kNuKeSnsObb2iVQAIuMRps6P3s5kjFq7rLnLYJPIZCEUuQP1s64mDMhnajZNHCu4TeG9pgkZgevHIbklLsjoviVOoGKusX3rcUeI6IYA7ZGq5rO8TaGP5h61OHOtxF35Bt8BdejVJAaOHq+dcOJpUzBHeA5LMtVenrgpmAJcvQ2CO3fLB+bhYyLhjXv6Npky5QArSEl8Nsx6dE6S1l7nno9xWECDx9zXg4PLw+i5mONhB4rQggbDQD9dldfMDHrmc9S3TorMtg1T5vNlUst4cufz9OpjRY7IKCTlpufutOIVDneZIgdO/LvIXDXdmUQfT3DU6ynQAzlYHbAX7JR6ek= Message-ID: <782b911e-c40e-4e9c-b259-af287d968b3b@suse.com> Date: Wed, 7 Feb 2024 14:36:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 1/7] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap , Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Shawn Anastasio , Bobby Eshleman , Alistair Francis , Connor Davis References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Leverage the new infrastructure in xen/linkage.h to also switch to per- function sections (when configured), deriving the specific name from the "base" section in use at the time FUNC() is invoked. Signed-off-by: Jan Beulich --- TBD: Since we use .subsection in UNLIKELY_START(), a perhaps not really wanted side effect of this change is that respective out-of-line code now moves much closer to its original (invoking) code. TBD: Of course something with the same overall effect, but less impactful might do in Config.mk. E.g. $(filter-out -D%,$(3)) instead of $(firstword (3)). In fact Roger wants the detection to be in Kconfig, for LIVEPATCH to depend on it. Yet the whole underlying discussion there imo would first need settling (and therefore reviving). TBD: On top of Roger's respective patch (for livepatch), also respect CONFIG_FUNCTION_ALIGNMENT. Note that we'd need to split DATA() in order to separate r/w and r/o contributions. Further splitting might be needed to also support more advanced attributes (e.g. merge), hence why this isn't done right here. Sadly while a new section's name can be derived from the presently in use, its attributes cannot be. Perhaps the only thing we can do is give DATA() a 2nd mandatory parameter. Then again I guess most data definitions could be moved to C anyway. --- v6: Deal with x86'es entry_PF() and entry_int82() falling through to the next "function". Re-base. v5: Re-base over changes earlier in the series. v4: Re-base. v2: Make detection properly fail on old gas (by adjusting cc-option-add-closure). --- a/Config.mk +++ b/Config.mk @@ -102,7 +102,7 @@ cc-option = $(shell if $(1) $(2:-Wno-%=- # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6) cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3))) define cc-option-add-closure - ifneq ($$(call cc-option,$$($(2)),$(3),n),n) + ifneq ($$(call cc-option,$$($(2)),$(firstword $(3)),n),n) $(1) += $(3) endif endef --- a/xen/Makefile +++ b/xen/Makefile @@ -409,6 +409,9 @@ AFLAGS += -D__ASSEMBLY__ $(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack) +# Check to see whether the assembler supports the --sectname-subst option. +$(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--sectname-subst -DHAVE_AS_SECTNAME_SUBST) + LDFLAGS-$(call ld-option,--warn-rwx-segments) += --no-warn-rwx-segments CFLAGS += $(CFLAGS-y) --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -157,6 +157,9 @@ SECTIONS .init.text : { _sinittext = .; *(.init.text) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.init.text.*) +#endif _einittext = .; . = ALIGN(PAGE_SIZE); /* Avoid mapping alt insns executable */ *(.altinstr_replacement) --- a/xen/arch/ppc/xen.lds.S +++ b/xen/arch/ppc/xen.lds.S @@ -104,6 +104,9 @@ SECTIONS .init.text : { _sinittext = .; *(.init.text) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.init.text.*) +#endif _einittext = .; . = ALIGN(PAGE_SIZE); /* Avoid mapping alt insns executable */ } :text --- a/xen/arch/riscv/xen.lds.S +++ b/xen/arch/riscv/xen.lds.S @@ -104,6 +104,9 @@ SECTIONS .init.text : { _sinittext = .; *(.init.text) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.init.text.*) +#endif _einittext = .; . = ALIGN(PAGE_SIZE); /* Avoid mapping alt insns executable */ } :text --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -29,6 +29,9 @@ FUNC(entry_int82) mov %rsp, %rdi call do_entry_int82 +#ifdef CONFIG_CC_SPLIT_SECTIONS + jmp compat_test_all_events +#endif END(entry_int82) /* %rbx: struct vcpu */ --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -723,6 +723,9 @@ END(common_interrupt) FUNC(entry_PF) ENDBR64 movl $X86_EXC_PF, 4(%rsp) +#ifdef CONFIG_CC_SPLIT_SECTIONS + jmp handle_exception +#endif END(entry_PF) /* No special register assumptions. */ FUNC(handle_exception, 0) @@ -1023,8 +1026,11 @@ FUNC(entry_NMI) ENDBR64 pushq $0 movl $X86_EXC_NMI, 4(%rsp) +#ifdef CONFIG_CC_SPLIT_SECTIONS + jmp handle_ist_exception +#endif END(entry_NMI) - +/* No special register assumptions. */ FUNC(handle_ist_exception) ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP SAVE_ALL --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -86,6 +86,9 @@ SECTIONS . = ALIGN(PAGE_SIZE); _stextentry = .; *(.text.entry) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.text.entry.*) +#endif . = ALIGN(PAGE_SIZE); _etextentry = .; @@ -214,6 +217,9 @@ SECTIONS #endif _sinittext = .; *(.init.text) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.init.text.*) +#endif *(.text.startup) _einittext = .; /* --- a/xen/include/xen/linkage.h +++ b/xen/include/xen/linkage.h @@ -19,6 +19,14 @@ #define SYM_ALIGN(align...) .balign align +#if defined(HAVE_AS_SECTNAME_SUBST) && defined(CONFIG_CC_SPLIT_SECTIONS) +# define SYM_PUSH_SECTION(name, attr) \ + .pushsection %S.name, attr, %progbits; \ + .equ .Lsplit_section, 1 +#else +# define SYM_PUSH_SECTION(name, attr) +#endif + #define SYM_L_GLOBAL(name) .globl name; .hidden name #define SYM_L_WEAK(name) .weak name #define SYM_L_LOCAL(name) /* nothing */ @@ -33,7 +41,14 @@ SYM_ALIGN(align); \ name: -#define END(name) .size name, . - name +#define END(name) \ + .size name, . - name; \ + .ifdef .Lsplit_section; \ + .if .Lsplit_section; \ + .popsection; \ + .equ .Lsplit_section, 0; \ + .endif; \ + .endif /* * CODE_FILL in particular may need to expand to nothing (e.g. for RISC-V), in @@ -47,6 +62,7 @@ #endif #define FUNC(name, align...) \ + SYM_PUSH_SECTION(name, "ax"); \ SYM(name, FUNC, GLOBAL, DO_CODE_ALIGN(align)) #define LABEL(name, align...) \ SYM(name, NONE, GLOBAL, DO_CODE_ALIGN(align)) @@ -54,6 +70,7 @@ SYM(name, DATA, GLOBAL, LASTARG(DATA_ALIGN, ## align), DATA_FILL) #define FUNC_LOCAL(name, align...) \ + SYM_PUSH_SECTION(name, "ax"); \ SYM(name, FUNC, LOCAL, DO_CODE_ALIGN(align)) #define LABEL_LOCAL(name, align...) \ SYM(name, NONE, LOCAL, DO_CODE_ALIGN(align)) From patchwork Wed Feb 7 13:37:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24E00C4828F for ; Wed, 7 Feb 2024 13:37:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677564.1054234 (Exim 4.92) (envelope-from ) id 1rXi6s-0000BD-FM; Wed, 07 Feb 2024 13:37:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677564.1054234; Wed, 07 Feb 2024 13:37:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi6s-0000AR-Ba; Wed, 07 Feb 2024 13:37:06 +0000 Received: by outflank-mailman (input) for mailman id 677564; Wed, 07 Feb 2024 13:37:05 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi6r-00007V-Gq for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:37:05 +0000 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [2a00:1450:4864:20::430]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fb1c2f07-c5bd-11ee-8a49-1f161083a0e0; Wed, 07 Feb 2024 14:37:04 +0100 (CET) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-33b0f36b808so485883f8f.3 for ; Wed, 07 Feb 2024 05:37:04 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.37.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:37:04 -0800 (PST) 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: fb1c2f07-c5bd-11ee-8a49-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313024; x=1707917824; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Y42iGpChZ2+X/wNXWYFaYLa/ywLQuM+ANdY+in144ps=; b=d44bpYhtKeJew4D/SmArcLYoQG4aPDe9wAh1y4VcB2zTDoXkYUQl4XJIYZ0c4xcOh4 AzUOMe17WRhoMEMyA/uwnyvuHhBwVmqrDCP3wONQwzdvlz3W6IneZw3fB9DC4Sc4se9r cGVQeb018pLHOsFLSYzmRq7CmpCJNwuhLZkI7LTdeEZhTLuwXNln7NZRmv7nXQ5SU9DB QFih9OYvtHIfH3naO44ZwICIWh5byCzCdiT9hZH8gPHXxaZRMxg93m55/cLdgOnHi2+y Ttbfuq5mIPiaX0JtEgjTzmMy3hLxkQtsy4hKJst6MnYjcqxPdKGfnsVmxIKaOtZIpAGg C7kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313024; x=1707917824; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y42iGpChZ2+X/wNXWYFaYLa/ywLQuM+ANdY+in144ps=; b=Cbm5oJwWz5+as8uj6bacx4kW+kZmkLJ/MivaVI/3I6ZGrXaNAKJjuGlYzyCOTFGvKi MHNoe7ltIBu9RskWk+pcIrOp4TpDHhcfx5JcohcQKqA7WcwNLytB0LOZw6Gz6NFE4sjt 3K/w5rMosXuwUoKrc77lLB/iLI8t79YLiosCrddWs2PQSXd8m4jmmApuevCtZ2E2wZfd pjBg9HMWx/rgHlr1aU2wBtLUlLOijwYItypWEvDZi86MYrqtXAE5YGu0lhoFxeZR2fvO A3slfkh9CVSYkwpYAtARa+ArvOEqVPe0JtaZGy0j/R8MtV3oaJrpiu84tYYrrvTO4nep D4/Q== X-Gm-Message-State: AOJu0YxuRy8i17yZrgYJZSD4AAZTAJcOP4RkfLM33WwI/BcdOTVXoJfl Yfx9LLnQMc81qiBI/GbWgpn02baZByqVcnnvMA/QljAvtOT8QxUvzCewTb2HyTHn0YltsJVY7GQ = X-Google-Smtp-Source: AGHT+IGqEj83M/D2sQzNE34YqcaSeXT63U2jm74FPmYefn3qGCzpuoeUh9bblWZ+cxInNq8cnsRdxw== X-Received: by 2002:a5d:4b02:0:b0:33b:2c2a:934f with SMTP id v2-20020a5d4b02000000b0033b2c2a934fmr3907458wrq.44.1707313024408; Wed, 07 Feb 2024 05:37:04 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUDjdr0j/18mr6bOOe4ACIO6K6mAv7beJONhQU9byqRqWrNr6kVo35NwOvtTSCtDBbj3+umFFufEChtn8U6cOMN3v46yLOG8DnmdYv9i6dN8BbfEakK+M/vzjx00qfGLcqY210b7qPQiTVi Message-ID: <4be8669e-bea7-49a7-9a56-f043c76d2f72@suse.com> Date: Wed, 7 Feb 2024 14:37:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 2/7] SVM: convert entry point annotations Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- v6: New. --- a/xen/arch/x86/hvm/svm/entry.S +++ b/xen/arch/x86/hvm/svm/entry.S @@ -24,7 +24,7 @@ #include #include -ENTRY(svm_asm_do_resume) +FUNC(svm_asm_do_resume) GET_CURRENT(bx) .Lsvm_do_resume: call svm_intr_assist @@ -132,7 +132,7 @@ __UNLIKELY_END(nsvm_hap) * to safely resolve any Spectre-v1 concerns in the above logic. */ stgi -GLOBAL(svm_stgi_label) +LABEL(svm_stgi_label, 0) call svm_vmexit_handler jmp .Lsvm_do_resume @@ -140,6 +140,4 @@ GLOBAL(svm_stgi_label) sti call do_softirq jmp .Lsvm_do_resume - - .type svm_asm_do_resume, @function - .size svm_asm_do_resume, . - svm_asm_do_resume +END(svm_asm_do_resume) From patchwork Wed Feb 7 13:37:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B8CFC4828F for ; Wed, 7 Feb 2024 13:37:35 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677568.1054244 (Exim 4.92) (envelope-from ) id 1rXi7E-0000pK-Mx; Wed, 07 Feb 2024 13:37:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677568.1054244; Wed, 07 Feb 2024 13:37:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi7E-0000pD-KR; Wed, 07 Feb 2024 13:37:28 +0000 Received: by outflank-mailman (input) for mailman id 677568; Wed, 07 Feb 2024 13:37:27 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi7D-00007V-44 for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:37:27 +0000 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [2a00:1450:4864:20::42a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 079c2b0f-c5be-11ee-8a49-1f161083a0e0; Wed, 07 Feb 2024 14:37:25 +0100 (CET) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-33b4e6972f6so428495f8f.2 for ; Wed, 07 Feb 2024 05:37:25 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.37.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:37:25 -0800 (PST) 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: 079c2b0f-c5be-11ee-8a49-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313045; x=1707917845; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Y82MohMyrcgLEJtzsSnSC+KLl8n5qIEw59SpPMusgXQ=; b=AUhN+VJOqRSomyX1XdT0sXVjPEG5IJSfHLljALSePrOEe2lmMzl5RLEM3B+xB0rLv+ qOYEY6tVW9OwvRwsUf3IJtU6ES8N2JajpZnKUjXZF2H4Xrc1d7ys+c33kIhauuYvJDZJ n2Sk9aA3rFkFAT4lpzMx0w4lZMFQwoaEHaZM7R2Wk5yKcCEQobS4jH0sV9wqbMiXaj/w 0kRwncGmH5Wtew8AJG/1AK/aE4eQPA02ZamRHBZHuV5iCI77vfvwAF0ShJqLdoBKj9S7 N+vRRbDxIlIH8+7RSF78vf0N5AqfcwTXm5cWGyf7JTyYoLLl5TfJCqArwHawO5wrgoke eHvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313045; x=1707917845; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y82MohMyrcgLEJtzsSnSC+KLl8n5qIEw59SpPMusgXQ=; b=ls0qIPIjYH3GslGtlRVYvHSx1LpYHRQ4in49qn6P2cERw05nhafdqlbmB4PMhBhhSW Z0DaVzkBSwg545AucnXm87N52ckMtdrEUuHBF6Cnvstw32t4JbcJZX2QHBhovmWEKB4q eLqrDlT29IMiDbMDHBLBQzZmKvoyBO39ZarrVu8j0B8sFgHBydLvbGp4pwZofv4gUsbc oUNbeRntEljeKa6DF8XnAzmIWTg9hiWGczLptHkl3jm5jXq5NgXnAGFHtlJAYYFAMXiA bpfg3tckEHNXtbGUlmN5qfDij7LK5Y2koAb/TFiaAWc8/oRCzwPpS9gbznmG0Ue1gQ0m VtKg== X-Gm-Message-State: AOJu0YyjUxxZfhp6CkYfe0x1Kgv4Rnip5DgKylsK76L35liai4GquQ3a EjW3jv2Bqo/R7H7nBSyDVoxQmzjGTI/+RMggkAaG2DTOtC96FYu6iUVNchIUmj5Y0uAYUdc99/0 = X-Google-Smtp-Source: AGHT+IFUN/uUEJTFN2yjSewFuBdgBOu537B/gJx5tTd1flGr1zhH3Prm3E38ihIpLr4G4/lXhZ0KUA== X-Received: by 2002:a5d:6d88:0:b0:337:c454:81a8 with SMTP id l8-20020a5d6d88000000b00337c45481a8mr3845735wrs.55.1707313045482; Wed, 07 Feb 2024 05:37:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWgCqCvdwRAAtY3jDnLko+pXIr43NzcubyFc10vabDAJBB1OM609Uvscdtj9CEijIijeyy49nyWr3JVGcQR2xNtaDetaDEYK/TZMJuGerHmTXzEnJdYhO9KJFcWbumv7SOMrU0nwtnfIR8bH1RsKPtVfiSfMxG7ohnl+Xb8EXC4JR0y9r8Uu012OK9SBCuhkU8tyaB5HyPhZA== Message-ID: <5fc304c0-be1f-46dd-a783-4030ec76a2f8@suse.com> Date: Wed, 7 Feb 2024 14:37:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 3/7] VMX: convert entry point annotations Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap , Kevin Tian , Jun Nakajima References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich --- v6: New. --- a/xen/arch/x86/hvm/vmx/entry.S +++ b/xen/arch/x86/hvm/vmx/entry.S @@ -24,7 +24,7 @@ #define VMRESUME .byte 0x0f,0x01,0xc3 #define VMLAUNCH .byte 0x0f,0x01,0xc2 -ENTRY(vmx_asm_vmexit_handler) +FUNC(vmx_asm_vmexit_handler) SAVE_ALL mov %cr2,%rax @@ -132,7 +132,7 @@ UNLIKELY_END(realmode) call vmx_vmentry_failure jmp .Lvmx_process_softirqs -ENTRY(vmx_asm_do_vmentry) +LABEL(vmx_asm_do_vmentry) GET_CURRENT(bx) jmp .Lvmx_do_vmentry @@ -150,6 +150,4 @@ ENTRY(vmx_asm_do_vmentry) sti call do_softirq jmp .Lvmx_do_vmentry - - .type vmx_asm_vmexit_handler, @function - .size vmx_asm_vmexit_handler, . - vmx_asm_vmexit_handler +END(vmx_asm_vmexit_handler) From patchwork Wed Feb 7 13:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1072EC4828D for ; Wed, 7 Feb 2024 13:38:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677573.1054256 (Exim 4.92) (envelope-from ) id 1rXi7j-0001pO-0t; Wed, 07 Feb 2024 13:37:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677573.1054256; Wed, 07 Feb 2024 13:37:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi7i-0001pH-S3; Wed, 07 Feb 2024 13:37:58 +0000 Received: by outflank-mailman (input) for mailman id 677573; Wed, 07 Feb 2024 13:37:57 +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 1rXi7h-0000oU-Aj for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:37:57 +0000 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [2a00:1450:4864:20::32e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 195b303c-c5be-11ee-98f5-efadbce2ee36; Wed, 07 Feb 2024 14:37:55 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40f033c2e30so5412265e9.0 for ; Wed, 07 Feb 2024 05:37:55 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.37.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:37:54 -0800 (PST) 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: 195b303c-c5be-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313075; x=1707917875; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=YjmnSJwKzDpM0u5Pn+iHXjwC2VYerV7wNfCIIKzoSdk=; b=a/XQdWITxE3GaPINMKu5S+GDaSDA+tn5jzD+GuTUWliYQl9s5+NrwqYG5rCJwCaPda f6g/BbH/4WCvStQly0uIna22yFXHjUzaZxpaZ9Akw/zgmItM9kc3yfT/s3L2afMpHVV6 uWYVwTIxnoJy2vn+VoS6T+i90k7qZn5kKAAyHeTIKkc598MW5Qcy69TtqDZIScdeljMt GBrJVxr9VAHX5y57yPiiN2XJ4rGXVggNDyciValHbbIYKHj30fBJEGqSuCmEIho5xmcS Kq9anCNVqaI7rcxTa+Clq9ayKbRpw6E9coF2F+kXYzMwZX6RzyNrCF4b07a9IEi/VK81 ofrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313075; x=1707917875; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YjmnSJwKzDpM0u5Pn+iHXjwC2VYerV7wNfCIIKzoSdk=; b=mQpKeqIJO/XsbDPaFR55janBjD1lVSqkAAV4l0XqaAAFlU2LMIz/l5x3hjAk4E7XLE s1jNP/R1CxJoWeFkI8N8U0gK7weoRU9MZmcXrWi7Tc+EacWUc0PU0WpjNQ9KgESibIqT Q8bpwsVhU0ciKcd419kooQNPmZxU6+xrgtiEubzW7ohCPyXhNW0rssuKo1SDqQtVorHt 9CE4zvh+oDryfvJ6tYUIF/tSOhGZCHLCzzs33T+G3cKfHwAFitJTH43kyOpvjmTImkUU 2DH4+mUnnm8YVnIG3GO20M/YiQWEFm+1JepoT7NDioxZ+KtMHIxriGvHZw7iEYwdT953 LVEQ== X-Gm-Message-State: AOJu0YwgGudOvkAgljd8xGw7UQaEAbd0Wgry7rWN8Y/itPgEnu9531Tl V5raSUlM++JXCgAM4BBjK2S0552FSAXs5Khqyv5eFWWEGUGxUJd+YCKoVOj35G0bDALSD30+ktg = X-Google-Smtp-Source: AGHT+IFIHCSmXG0T6Q2bGWzEPV7V0mNOStg32L3BpcsG4d89iHLOwNJgqR5ZSsZMIA8DmFvMvAimpw== X-Received: by 2002:adf:f410:0:b0:33b:3fe8:6413 with SMTP id g16-20020adff410000000b0033b3fe86413mr4042855wro.27.1707313075072; Wed, 07 Feb 2024 05:37:55 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXXpQ+thZHgfpMWIr7AbathifGsjYNkr2ViU0JJR0dAKbtDRfTUvw0iSXnDeixeMRkyHCKnIWgVcl6rcXp3APL74VONGyJ50qXo1p/d9EEZ+CvatvWYoNSKMznKtwYMq4Y2QFCCOEkpqVER Message-ID: Date: Wed, 7 Feb 2024 14:37:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 4/7] x86/ACPI: annotate assembly functions with type and size Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich --- The .Lsuspend_err label is used in a cross-function manner here, but it's not clear to me what - if anything - to do about this. --- v6: New. --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -7,7 +7,7 @@ .text .code64 -ENTRY(do_suspend_lowlevel) +FUNC(do_suspend_lowlevel) push %rbp push %rbx push %r12 @@ -32,6 +32,7 @@ ENTRY(do_suspend_lowlevel) /* It seems we didn't suspend. Get out of here. */ jmp .Lsuspend_err +END(do_suspend_lowlevel) /* * do_suspend_lowlevel() is arranged to behave as a regular function @@ -43,7 +44,7 @@ ENTRY(do_suspend_lowlevel) * * Everything else, including the stack, needs restoring. */ -ENTRY(s3_resume) +FUNC(s3_resume) lgdt boot_gdtr(%rip) mov saved_cr0(%rip), %rax @@ -132,6 +133,7 @@ ENTRY(s3_resume) pop %rbx pop %rbp ret +END(s3_resume) .data .align 16 @@ -142,5 +144,4 @@ saved_cr0: .quad 0 saved_ssp: .quad 0 #endif -GLOBAL(saved_magic) - .long 0x9abcdef0 +ASM_INT(saved_magic, 0x9abcdef0) From patchwork Wed Feb 7 13:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B79E3C4828D for ; Wed, 7 Feb 2024 13:38:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677577.1054265 (Exim 4.92) (envelope-from ) id 1rXi8G-0002SX-8P; Wed, 07 Feb 2024 13:38:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677577.1054265; Wed, 07 Feb 2024 13:38:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi8G-0002SQ-3k; Wed, 07 Feb 2024 13:38:32 +0000 Received: by outflank-mailman (input) for mailman id 677577; Wed, 07 Feb 2024 13:38:31 +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 1rXi8F-0002S8-Ku for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:38:31 +0000 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [2a00:1450:4864:20::430]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2d9b36f8-c5be-11ee-98f5-efadbce2ee36; Wed, 07 Feb 2024 14:38:29 +0100 (CET) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-33929364bdaso429933f8f.2 for ; Wed, 07 Feb 2024 05:38:29 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.38.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:38:28 -0800 (PST) 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: 2d9b36f8-c5be-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313109; x=1707917909; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=XZ8E4NCSVP15aCKtBvXW1WrLdgMyh/zRv3UNW3vt5Qc=; b=ejMoMTrlgFVyOskBb4n2ZZg2Gc0mJvo83SEoqeVY6SldeZx/eCDYkOppXuhkBDQ3QI pv/nOdVSvXlWmLWH1cw+7nPXDYMR7EaT5E0p+uzeAOyhK2jzo+7KhAy2UAjYw1LF+ofd rRIcbAS4XaVbahmtf6VfErYxM7YyOYvZbGL0DQY2v7IW554sp+ehuAS9MBsPaF+eX7Er SRqdYWXvdRdG7vv60QXnXLfOuapKMtrzOSWFo4Vf6lzwKTp36XfkWNXeXjPkYLga6K9u 3ngDXeWF1C2aZtyP6ehovVcpOBoO1nq2TFP2LLqf3W5ng4w/FrE4s4yoNhBt9slFnU9V FBCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313109; x=1707917909; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XZ8E4NCSVP15aCKtBvXW1WrLdgMyh/zRv3UNW3vt5Qc=; b=TBCQN1c/oI4PMzSLfxfYhJRCUEOgxNaswNPzwkRLRN3hknj10VS+/oiTdVDpkxCmJm 3B0ykFs1XMyhfAMTS92bwMjZ0CBk/b4oookzxkgUGvH2Mhco/XsPmI2x/em6HhoUb7/G 7T9ExA1C+wBadnZjTddMCP2xU8OREklX7oWeunKYIFVoQNCMhWYv3/SFF1DlrkMgpSJ2 inHgQ6wrNh+Y+Cr8hIogY/NrnIK9+4ze6RT8PDNzXueii2ySkOhSwyDcDR1A+Tk2FNb/ /Hh7SoIO1fPpUWTmbv7XM2m3U4HBtzuqvkZzyIMTZWHCixoVonQowLtSGcCDWzaeJmsz 0HOQ== X-Gm-Message-State: AOJu0YzmyjdfWZL6TBCxlBgmTVNu85bbfxXI2wsyh6iqdbtBXxAgUsqL FmtaoHTOgQyMGh5apZxr1GNJ21O3Ltlxf+CoFaYySeto4uZOOD0F/PVF1YlBPe7s22MkjBllX5Y = X-Google-Smtp-Source: AGHT+IGR06n/2V+cnjT9rh5AURC/vp9SxGx6kbg+I20kRXd6mNNxweTRBk0aiO1Os0kvTevB74O8fA== X-Received: by 2002:adf:ec84:0:b0:33a:e526:3a49 with SMTP id z4-20020adfec84000000b0033ae5263a49mr3451729wrn.23.1707313109062; Wed, 07 Feb 2024 05:38:29 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWAdXI5+RWS6xEYY7Cc2hdkIRfrrGk9gWx6/LEAc7GOqeFlyonCbnqtaapIcpNz61nL5szCdCqgqT0XgqtWnWG4wuDXyMo5e3brj26mBcIsMC+syEvtHPnxVot976HjBBmf8RcZ6By7MRL7 Message-ID: <50c0bcbb-e46e-4777-a7e8-20ee4b979b05@suse.com> Date: Wed, 7 Feb 2024 14:38:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 5/7] x86/kexec: convert entry point annotations Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich --- Using the linker script like this feels fragile. Maybe it's better to suppress (#undef) CONFIG_CC_SPLIT_SECTIONS for this one file? --- v6: New. --- a/xen/arch/x86/x86_64/kexec_reloc.S +++ b/xen/arch/x86/x86_64/kexec_reloc.S @@ -21,10 +21,9 @@ #include .section .text.kexec, "ax", @progbits - .align PAGE_SIZE .code64 -ENTRY(kexec_reloc) +FUNC(kexec_reloc, PAGE_SIZE) /* %rdi - code page maddr */ /* %rsi - page table maddr */ /* %rdx - indirection page maddr */ @@ -91,8 +90,9 @@ ENTRY(kexec_reloc) push $0x10 push %rax lretq +END(kexec_reloc) -relocate_pages: +FUNC_LOCAL(relocate_pages) /* %rdi - indirection page maddr */ pushq %rbx @@ -138,10 +138,11 @@ relocate_pages: .L_done: popq %rbx ret +END(relocate_pages) .code32 -compatibility_mode: +FUNC_LOCAL(compatibility_mode) /* Setup some sane segments. */ movl $0x0008, %eax movl %eax, %ds @@ -168,39 +169,29 @@ compatibility_mode: /* Call the image entry point. This should never return. */ call *%ebp ud2 +END(compatibility_mode) - .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) - .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) - .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) /* * 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) --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -92,7 +92,10 @@ SECTIONS . = ALIGN(PAGE_SIZE); _etextentry = .; - *(.text.kexec) /* Page aligned in the object file. */ + /* Page aligned in the object file. */ + *(.text.kexec.kexec_reloc) + *(.text.kexec.*) + *(.text.kexec) kexec_reloc_end = .; *(.text.cold) From patchwork Wed Feb 7 13:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED7D9C4828D for ; Wed, 7 Feb 2024 13:38:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677581.1054275 (Exim 4.92) (envelope-from ) id 1rXi8b-0002y3-J7; Wed, 07 Feb 2024 13:38:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677581.1054275; Wed, 07 Feb 2024 13:38:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi8b-0002xw-G7; Wed, 07 Feb 2024 13:38:53 +0000 Received: by outflank-mailman (input) for mailman id 677581; Wed, 07 Feb 2024 13:38:52 +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 1rXi8a-0002S8-1A for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:38:52 +0000 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [2a00:1450:4864:20::42d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 39f6b48d-c5be-11ee-98f5-efadbce2ee36; Wed, 07 Feb 2024 14:38:50 +0100 (CET) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33b1d7f736bso526476f8f.3 for ; Wed, 07 Feb 2024 05:38:50 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.38.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:38:49 -0800 (PST) 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: 39f6b48d-c5be-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313130; x=1707917930; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=aBpoZSGBreowDhO2VF/qZrHAAevqhsPVyooMAssUAG4=; b=cCNK7Vm59Z9mYsC6ky0LYdvDjldX1QdIXbCpcodAtt3mZ6TiKqUBMXlQAQDAeo6y2s K/wXi6CTUr0u0DlZ2ZekFrzQG+0SsVh7uVfclDZBMy3L7ZyA6O2I2vBcW5hG2X5xbRKX IaaZBrnJvN7JMt1xZpKzzrLBFUmWgPdAINpfnXn7dSAmzKXpWr2GyvVNtXUEwN4CoUWZ bjKepR6sxN1dbz0CmA4YuFe9iDPfljExY6ySvxzs5ks9hyupgMFfvLnOJPgE5HMzsoEi t/3W98V7JRz2DNk+kfzZ3raIiujOf1dO0Rlc7hZb5Hn+Vfc/qMTVDuMCWZaCClSs0f0T WphQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313130; x=1707917930; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aBpoZSGBreowDhO2VF/qZrHAAevqhsPVyooMAssUAG4=; b=PowgE0pHl8BgdZCKtPZq9HUqFQ58J/anIOUozXS0HkTfidNt+76wRLgR2sL3qp0dkL Y/jokecZWwiG1eArsh4h1Ew6AECB90ubGjZQ1epw64nikhG9DvgZiG+wl686HG/CUIjx SLEgJh8NaqAV45L96M48gL0+yNqmLfvleToluELQ4ZhDRDeaMKOhH/IJfwJRSn9oTwGR 0u5Ya+Eiszjd2JEpzdPJAm8JeKdoc4fuiFf8wFfjc2Gc8HP4wND3THWZReGBV21JDcsx o+wMpW7i9P8qx0JKgwngSjO7wTnSnkk/ckcbBzGEP6gmZHRThHZXG1BtM6YiOxHmYw16 403A== X-Gm-Message-State: AOJu0Ywr7xDswFqBW0/rEd+C6gSOf+m9l1Qne9epxWcELe4MnUlyvpfi ihwnM+m2RtBwJjiOVRT5Hfn/AaK6+Skv0SkkpvPb/GnT0jJkqixcDKnVUcCxT7bsUqugiA47TIo = X-Google-Smtp-Source: AGHT+IGSFfXYOZS+6DKecgfnZokmK4eRCNKXhnba6Cmtvw/CVLUogCftvpuW1Dwd4a5QpImfyVFPZA== X-Received: by 2002:a5d:468a:0:b0:33b:4382:c54 with SMTP id u10-20020a5d468a000000b0033b43820c54mr2970345wrq.62.1707313129835; Wed, 07 Feb 2024 05:38:49 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUxK+RGJLlk2fIeOCc43MT2CekBJEHPKSMDl3gENroZYzOzyMUa0IIWTboi+ObE+9JEuEB6PcJlIOzgRAK0W75rzR3tAQTAfspOzqfChrJlVA3f0t8iwHEpyqcy7JJgyPlY2VeufF5k4mjm Message-ID: <4b0a581d-be2b-444d-a044-668b5e2e2279@suse.com> Date: Wed, 7 Feb 2024 14:38:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 6/7] x86: convert misc assembly function annotations Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Use the generic framework from xen/linkage.h. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- v6: New. --- a/xen/arch/x86/clear_page.S +++ b/xen/arch/x86/clear_page.S @@ -1,8 +1,9 @@ .file __FILE__ +#include #include -ENTRY(clear_page_sse2) +FUNC(clear_page_sse2) mov $PAGE_SIZE/32, %ecx xor %eax,%eax @@ -16,6 +17,4 @@ ENTRY(clear_page_sse2) sfence ret - - .type clear_page_sse2, @function - .size clear_page_sse2, . - clear_page_sse2 +END(clear_page_sse2) --- a/xen/arch/x86/copy_page.S +++ b/xen/arch/x86/copy_page.S @@ -1,5 +1,6 @@ .file __FILE__ +#include #include #define src_reg %rsi @@ -10,7 +11,7 @@ #define tmp3_reg %r10 #define tmp4_reg %r11 -ENTRY(copy_page_sse2) +FUNC(copy_page_sse2) mov $PAGE_SIZE/(4*WORD_SIZE)-3, %ecx prefetchnta 2*4*WORD_SIZE(src_reg) @@ -41,6 +42,4 @@ ENTRY(copy_page_sse2) sfence ret - - .type copy_page_sse2, @function - .size copy_page_sse2, . - copy_page_sse2 +END(copy_page_sse2) --- a/xen/arch/x86/guest/xen/hypercall_page.S +++ b/xen/arch/x86/guest/xen/hypercall_page.S @@ -3,13 +3,11 @@ #include .section ".text.page_aligned", "ax", @progbits - .p2align PAGE_SHIFT -GLOBAL(hypercall_page) +DATA(hypercall_page, PAGE_SIZE) /* Poisoned with `ret` for safety before hypercalls are set up. */ .fill PAGE_SIZE, 1, 0xc3 - .type hypercall_page, STT_OBJECT - .size hypercall_page, PAGE_SIZE +END(hypercall_page) /* * Identify a specific hypercall in the hypercall page --- a/xen/arch/x86/indirect-thunk.S +++ b/xen/arch/x86/indirect-thunk.S @@ -35,15 +35,13 @@ .macro GEN_INDIRECT_THUNK reg:req .section .text.__x86_indirect_thunk_\reg, "ax", @progbits -ENTRY(__x86_indirect_thunk_\reg) +FUNC(__x86_indirect_thunk_\reg) ALTERNATIVE_2 __stringify(IND_THUNK_RETPOLINE \reg), \ __stringify(IND_THUNK_LFENCE \reg), X86_FEATURE_IND_THUNK_LFENCE, \ __stringify(IND_THUNK_JMP \reg), X86_FEATURE_IND_THUNK_JMP int3 /* Halt straight-line speculation */ - - .size __x86_indirect_thunk_\reg, . - __x86_indirect_thunk_\reg - .type __x86_indirect_thunk_\reg, @function +END(__x86_indirect_thunk_\reg) .endm /* Instantiate GEN_INDIRECT_THUNK for each register except %rsp. */ --- a/xen/arch/x86/pv/gpr_switch.S +++ b/xen/arch/x86/pv/gpr_switch.S @@ -10,7 +10,7 @@ #include /* Load guest GPRs. Parameter in %rdi, clobbers all registers. */ -ENTRY(load_guest_gprs) +FUNC(load_guest_gprs) movq UREGS_rdx(%rdi), %rdx movq UREGS_rax(%rdi), %rax movq UREGS_rbx(%rdi), %rbx @@ -27,13 +27,10 @@ ENTRY(load_guest_gprs) movq UREGS_rcx(%rdi), %rcx movq UREGS_rdi(%rdi), %rdi ret - - .size load_guest_gprs, . - load_guest_gprs - .type load_guest_gprs, STT_FUNC - +END(load_guest_gprs) /* Save guest GPRs. Parameter on the stack above the return address. */ -ENTRY(save_guest_gprs) +FUNC(save_guest_gprs) pushq %rdi movq 2*8(%rsp), %rdi movq %rax, UREGS_rax(%rdi) @@ -52,6 +49,4 @@ ENTRY(save_guest_gprs) movq %rdx, UREGS_rdx(%rdi) movq %rcx, UREGS_rcx(%rdi) ret - - .size save_guest_gprs, . - save_guest_gprs - .type save_guest_gprs, STT_FUNC +END(save_guest_gprs) --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -599,7 +599,7 @@ domain_crash_page_fault_0x8: ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP movq %rsi,%rdi call show_page_walk -ENTRY(dom_crash_sync_extable) +LABEL(dom_crash_sync_extable, 0) ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP # Get out of the guest-save area of the stack. GET_STACK_END(ax) From patchwork Wed Feb 7 13:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13548532 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63D10C4828D for ; Wed, 7 Feb 2024 13:39:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.677583.1054285 (Exim 4.92) (envelope-from ) id 1rXi92-0003X2-RG; Wed, 07 Feb 2024 13:39:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 677583.1054285; Wed, 07 Feb 2024 13:39:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi92-0003Wv-Nl; Wed, 07 Feb 2024 13:39:20 +0000 Received: by outflank-mailman (input) for mailman id 677583; Wed, 07 Feb 2024 13:39:19 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rXi91-0003WW-5C for xen-devel@lists.xenproject.org; Wed, 07 Feb 2024 13:39:19 +0000 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [2a00:1450:4864:20::42c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4a920ba9-c5be-11ee-8a49-1f161083a0e0; Wed, 07 Feb 2024 14:39:18 +0100 (CET) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33aea66a31cso412730f8f.1 for ; Wed, 07 Feb 2024 05:39:18 -0800 (PST) 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 z12-20020a056000110c00b0033b4ebc3c8fsm1328999wrw.2.2024.02.07.05.39.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Feb 2024 05:39:17 -0800 (PST) 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: 4a920ba9-c5be-11ee-8a49-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707313157; x=1707917957; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ivg8xh0fXC1hxH27jiq7v5DWoiDVmbEsIYwYYVUpzS4=; b=Obgnlhr+f1zii/+AoaP0+kIaDXOavp/kmgUd0fuQwpRvGvscBnhDHuQTU8Ji1fz63r 18n6NqP2G0KEPpKIPiZHlrOs5868yBl6Cj4czuFNRE0b/F/PbIloMZhW2mrNOn8yiwcA bnLBsWkMuVDiYmj/lbA6djNS0Enqm6t8S83C6nxPdmG4c/eOkxl4HmYCgzc8QKBqEZmH 51odUB04VCewZANTdxd7N2r4plSiUHBniS3BqCYEXTzCUFX7GyAeq/bMubdbrnQFFq1L 2iAr8oBWg692CRDUEftWx5zFjPRo2n809ICZnRkQJau+Iuc3tjLwuHPf4tU3W1tm77Q6 oHmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707313158; x=1707917958; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ivg8xh0fXC1hxH27jiq7v5DWoiDVmbEsIYwYYVUpzS4=; b=FpDz14eODr9EKnF/opvADi0X5VyTK/VKH4nxAVZmHzzO8T+xNXWQLCeU/Ewip4Wb/4 MAnM7WqyVTMXszkYX1Csa+Cmu01tqdYpM7ywG4P2xqBqL4VqcOqqto5U9SHWLjsT9iuK TtbbLbqJex2vjnUzOydojdrFpz3VOuE5MQZQXw+8vL5YRlXDi+/Ze8e0pgJxnmBzkKJE WFa2PJDI4obfXQeQc7WV4x6PeybrxfVcuouLbcVhzZdkQKmcp+OWGzyqCrMaN2gjc0kY Sfu/X/jzvtoJuCT52ynLGjMHV3FT+5LXmrsEiD3iaDchS8Xom/manFGBV+PThPpPCeyR ijGA== X-Gm-Message-State: AOJu0Yyc3Zku/4YjhdsL9DRoUOnJ8+GZagq3ELpS5tzh9wf3N/JSOCBd 7w6Q92Ds57qaajMZmmkCu4WoZT9zvQ/O4tqwvd3qPgNUKlSKqiQNIHXAygVDfU8Bf2xJlVuVA2c = X-Google-Smtp-Source: AGHT+IHmlckhq6dGHNx2qssCV2e0/bynu+ZfTWcsbiepMstmyGqYumdOaKYcN9bbm1jkuYUM2agbWQ== X-Received: by 2002:a5d:67d1:0:b0:33b:51d8:17d7 with SMTP id n17-20020a5d67d1000000b0033b51d817d7mr483477wrw.60.1707313157792; Wed, 07 Feb 2024 05:39:17 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXSnUDo8ufld7OrDNYBTm/ECVPFis4JzxZm2xiWvmlQlLYJxgTEiubKkMLhgYGe66j7m6cvF6G+f10orkR7VeNSWAx0sb/9K5lMdXHHlmumazQoy0FIq77hAjZyJKLAJ+qHMFDRZIkFgDcC Message-ID: <64785449-1ca6-41f7-9012-2f432c171e3a@suse.com> Date: Wed, 7 Feb 2024 14:39:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v6 7/7] x86: move ENTRY(), GLOBAL(), and ALIGN Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap References: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <3ba82c3a-ff95-43d0-8672-a63b23bc2cdc@suse.com> ... to boot code, limiting their scope and thus allowing to drop respective #undef-s from the linker script. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- An obvious alternative would be to convert boot code right away too, but I think this has lower priority for now. --- v6: New. --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -10,6 +10,15 @@ #include #include +#define ALIGN .align CODE_ALIGN, CODE_FILL +#define ENTRY(name) \ + ALIGN; \ + GLOBAL(name) +#define GLOBAL(name) \ + .globl name; \ + .hidden name; \ + name: + .section .text.header, "ax", @progbits .code32 --- a/xen/arch/x86/include/asm/config.h +++ b/xen/arch/x86/include/asm/config.h @@ -45,14 +45,6 @@ #ifdef __ASSEMBLY__ #define CODE_ALIGN 16 #define CODE_FILL 0x90 -#define ALIGN .align CODE_ALIGN, CODE_FILL -#define ENTRY(name) \ - ALIGN; \ - GLOBAL(name) -#define GLOBAL(name) \ - .globl name; \ - .hidden name; \ - name: #endif #define NR_hypercalls 64 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -1199,7 +1199,7 @@ FUNC_LOCAL(autogen_stubs, 0) /* Automati .if vec >= FIRST_IRQ_VECTOR #endif - ALIGN + .align CODE_ALIGN, CODE_FILL 1: ENDBR64 pushq $0 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -5,8 +5,6 @@ #include #include #include -#undef ENTRY -#undef ALIGN #ifdef EFI