[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] x86/kexec: Annotate functions with ELF metadata
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 21 Feb 2023 11:54:05 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TmXT8biT7yqitiSgV4ZytugcbZRYwWDboWRvFMT3RYI=; b=Y1Nfd9AHBqPDbX9boltRV8tzCF54JjsvyWsjbyBbqHSewWOH8LGqDAuAqHV3kLumjaBGIPb7hb7ulcpoAM/LmUXnxb+37NAgOGpDsm12SUGJ2+f6DmhyW9aN+mGdgEaITyG+vY57VLxW1/nYKkyNkcZrf4BryHZ8HwOL+u0J3OSzAsu7DNFKAkDefHPUcR+lXjIcTppkkbG4L3Ewr9SltT2VlOlzHkHDv+HR0waGoqJ1rhpdkNzQYOVph6S6pvjJxON4DYkaQ3c5xTpkWVzJt3nFVJ7U0BJbML6S5K2kRVXCzfAI91gLKzwlmhfMcgiFTYEUUjOHbUnXtgplU/QZXA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UoeZMT5pdVWWhdCOCfDXOBHPG4mLSc21vRlzAxa/fvWnpTHQwV3fm226IgHzgETAL0Ya2r5zpdShrez6eqmgl5OaxtNmzxoACf7rFdKxPaS+2pOVobp2jq52mQSpC+p9XjTEnU/rNhdhoLXB3Z4HhGdK7IShSVSguHFQSveAqpnFPGVwqacq9e1cfk8WTbxYcun8jI53MB0nw4tM3YXAahdJpCSqrZRDC/ti1m9QvIReDoJDhrthhspdZ1FXQylRO7HRjYeWMP9g+ODxFQCp1QY1+mYC68MTfRLlLkYnqkOMgi5ZCRy8b3UlYw+cQjR17NmyC08a2MbpL/neZW/KQQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 21 Feb 2023 10:54:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 17.02.2023 18:48, Andrew Cooper wrote:
> @@ -90,7 +91,10 @@ ENTRY(kexec_reloc)
> push %rax
> lretq
>
> -relocate_pages:
> + .type kexec_reloc, @function
> + .size kexec_reloc, . - kexec_reloc
> +
> +ENTRY(relocate_pages)
> /* %rdi - indirection page maddr */
> pushq %rbx
>
> @@ -137,9 +141,12 @@ relocate_pages:
> popq %rbx
> ret
>
> + .type relocate_pages, @function
> + .size relocate_pages, . - relocate_pages
> +
> .code32
>
> -compatibility_mode:
> +ENTRY(compatibility_mode)
Do you really mean to make both labels global, thus potentially risking
a link-time name collision down the road? In C files we try to move the
other direction after all, making symbols static which can be.
> @@ -167,7 +174,14 @@ compatibility_mode:
> call *%ebp
> ud2
>
> - .align 4
> + .type compatibility_mode, @function
> + .size compatibility_mode, . - compatibility_mode
> +
> + /*
> + * Ensure data is in a different cache line to code.
> + */
Nit (style): Strictly speaking this is a single-line comment.
Jan
> + .align SMP_CACHE_BYTES, 0
> +
> compat_mode_gdt_desc:
> .word .Lcompat_mode_gdt_end - compat_mode_gdt -1
> .quad . - kexec_reloc /* Relocated before use */
|