Xen-Devel Archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Julien Grall <julien@xen.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org, bertrand.marquis@arm.com,
	michal.orzel@amd.com, Volodymyr_Babchuk@epam.com,
	andrew.cooper3@citrix.com, edgar.iglesias@amd.com
Subject: Re: [PATCH v3 6/9] xen/arm64: bpi: Add missing code symbol annotations
Date: Tue, 14 May 2024 09:17:49 +0200	[thread overview]
Message-ID: <5c456b29-f458-4cd2-b92d-edb530de6959@suse.com> (raw)
In-Reply-To: <35c8fbfb-8b09-4aae-8c98-402dcd65ca2e@xen.org>

On 07.05.2024 19:37, Julien Grall wrote:
> 
> 
> On 07/05/2024 17:55, Edgar E. Iglesias wrote:
>> On Tue, May 7, 2024 at 11:57 AM Julien Grall <julien@xen.org> wrote:
>> Hi Julien,
> 
> Hi Edgar,
> 
>>
>> The reason I choose FUNC for the start of the symbol is because these
>> symbols contain
>> executable code (not only a table of pointers to code somewhere else)
>> and the ELF spec
>> says that STT_FUNC means the symbol contains functions or other executable
>> code (not only callable functions IIUC):
>>
>> "STT_FUNC The symbol is associated with a function or other executable code."
>> https://refspecs.linuxbase.org/elf/elf.pdf
>> (Symbol Table 1-20).
> 
> Thanks for the pointer. I originally did intend to suggest the change, 
> but then I saw the use of LABEL in x86 (such as svm_stgi_label). There 
> are a few others example with LABEL_LOCAL.
> 
> AFAICT, this is also executable code which the only difference that it 
> is not meant to be called by someone else. Furthermore, LABEL is using 
> DO_CODE_ALIGN(...) for the alignment which imply that it is intended to 
> be used by executable code. So I thought the only difference was whether 
> the label was intended to be used as a function.

No. See below.

>> I think using LABEL instead of GLOBAL for the _end labels of these
>> code sequences makes sense.
>> I'm happy to change the _start labels to LABEL too if you guys feel
>> that's better.
> 
> I have to admit I am little confused with the difference between LABEL 
> vs FUNC. I think I will need some guidance from Jan (he introduced 
> linkage.h).

For annotations the question is what is a "unit" of code. That wants to
be enclosed in FUNC() / END(). Any "inner" entry points or markers would
use LABEL(). On x86 I think it's mainly markers (i.e. addresses pointing
into code which we need e.g. for comparison operations on what Arm would
call PC) where we use LABEL().

Jan


  parent reply	other threads:[~2024-05-14  7:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01  3:54 [PATCH v3 0/9] xen/arm: arm64: Annotate code symbols Edgar E. Iglesias
2024-05-01  3:54 ` [PATCH v3 1/9] xen/arm64: entry: Add missing code symbol annotations Edgar E. Iglesias
2024-05-01  3:54 ` [PATCH v3 2/9] xen/arm64: smc: " Edgar E. Iglesias
2024-05-03 23:30   ` Stefano Stabellini
2024-05-01  3:54 ` [PATCH v3 3/9] xen/arm64: sve: " Edgar E. Iglesias
2024-05-03 23:30   ` Stefano Stabellini
2024-05-01  3:54 ` [PATCH v3 4/9] xen/arm64: head: " Edgar E. Iglesias
2024-05-03 23:56   ` Stefano Stabellini
2024-05-06 12:49     ` Edgar E. Iglesias
2024-05-01  3:54 ` [PATCH v3 5/9] xen/arm64: debug: " Edgar E. Iglesias
2024-05-03 23:56   ` Stefano Stabellini
2024-05-01  3:54 ` [PATCH v3 6/9] xen/arm64: bpi: " Edgar E. Iglesias
2024-05-04  0:14   ` Stefano Stabellini
2024-05-06 12:54     ` Edgar E. Iglesias
2024-05-07  9:57       ` Julien Grall
2024-05-07 16:55         ` Edgar E. Iglesias
2024-05-07 17:37           ` Julien Grall
2024-05-10 16:26             ` Edgar E. Iglesias
2024-05-14  7:17             ` Jan Beulich [this message]
2024-05-01  3:54 ` [PATCH v3 7/9] xen/arm64: mmu/head: " Edgar E. Iglesias
2024-05-04  0:15   ` Stefano Stabellini
2024-05-01  3:54 ` [PATCH v3 8/9] xen/arm64: cache: Use the generic xen/linkage.h macros Edgar E. Iglesias
2024-05-04  0:15   ` Stefano Stabellini
2024-05-01  3:54 ` [PATCH v3 9/9] xen/arm64: lib: " Edgar E. Iglesias
2024-05-04  0:16   ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c456b29-f458-4cd2-b92d-edb530de6959@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=edgar.iglesias@amd.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).