From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com, andrew.cooper3@citrix.com,
roger.pau@citrix.com,
Simone Ballarin <simone.ballarin@bugseng.com>,
Doug Goldstein <cardoe@cardoe.com>,
George Dunlap <george.dunlap@citrix.com>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Jun Nakajima <jun.nakajima@intel.com>,
Kevin Tian <kevin.tian@intel.com>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions
Date: Tue, 31 Oct 2023 09:22:36 +0100 [thread overview]
Message-ID: <0e96a194d77d89fbd65537b464664429@bugseng.com> (raw)
In-Reply-To: <20677a35-37ee-d959-78d5-d8f95f443912@suse.com>
On 2023-10-30 16:12, Jan Beulich wrote:
> On 30.10.2023 10:11, Nicola Vetrini wrote:
>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
>> @@ -163,6 +163,15 @@ Therefore the absence of prior declarations is
>> safe."
>> -config=MC3R1.R8.4,reports+={safe, "first_area(any_loc(file(gcov)))"}
>> -doc_end
>>
>> +-doc_begin="Recognize the occurrence of current_stack_pointer as a
>> declaration."
>> +-file_tag+={asm_defns, "^xen/arch/x86/include/asm/asm_defns\\.h$"}
>> +-config=MC3R1.R8.4,declarations+={safe,
>> "loc(file(asm_defns))&&^current_stack_pointer$"}
>> +-doc_end
>> +
>> +-doc_begin="asmlinkage is a marker to indicate that the function is
>> only used from asm modules."
>> +-config=MC3R1.R8.4,declarations+={safe,"loc(text(^.*asmlinkage.*$,
>> -1..0))"}
>> +-doc_end
>
> In the longer run asmlinkage will want using for functions used either
> way
> between C and assembly (i.e. C->asm calls as well as asm->C ones). I'd
> like
> to ask that the text please allow for that (e.g. s/from/to interface
> with/).
>
>> --- a/xen/arch/x86/hvm/svm/intr.c
>> +++ b/xen/arch/x86/hvm/svm/intr.c
>> @@ -123,7 +123,7 @@ static void svm_enable_intr_window(struct vcpu *v,
>> struct hvm_intack intack)
>> vmcb, general1_intercepts | GENERAL1_INTERCEPT_VINTR);
>> }
>>
>> -void svm_intr_assist(void)
>> +asmlinkage void svm_intr_assist(void)
>
> Nit (here and below): Attributes, unless impossible for some specific
> reason, should always go between type and identifier. Not all our code
> is conforming to that, but I think a majority is, and hence you should
> be able to find ample examples (taking e.g. __init).
>
>> --- a/xen/include/xen/compiler.h
>> +++ b/xen/include/xen/compiler.h
>> @@ -159,6 +159,9 @@
>> # define ASM_FLAG_OUT(yes, no) no
>> #endif
>>
>> +/* Mark a function or variable as used only from asm */
>> +#define asmlinkage
>
> I appreciate this being an immediately "natural" place, but considering
> what we know from Linux I think we ought to allow for arch overrides
> here
> right away. For that I'm afraid compiler.h isn't best; it may still be
> okay as long as at least an #ifndef is put around it. Imo, however,
> this
> ought to go into xen/linkage.h, as is being introduced by "common:
> assembly entry point type/size annotations". It's somewhat a shame that
> this and the rest of that series has missed 4.18 ...
>
> Jan
An #ifndef around what, exactly? Anyway, making (part of) this series
wait for approval
until the other has been accepted into 4.19 (for which I have no
specific timeframe)
does not seem that desirable to me.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-31 8:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 9:11 [XEN PATCH][for-4.19 v5 0/8] Fix or deviate various instances of missing declarations Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 1/8] xen: modify or add declarations for variables where needed Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions Nicola Vetrini
2023-10-30 11:29 ` Julien Grall
2023-10-30 22:54 ` Stefano Stabellini
2023-10-31 8:15 ` Nicola Vetrini
2023-10-30 15:12 ` Jan Beulich
2023-10-30 23:02 ` Stefano Stabellini
2023-10-31 7:50 ` Jan Beulich
2023-10-31 8:18 ` Nicola Vetrini
2023-10-31 8:22 ` Nicola Vetrini [this message]
2023-10-31 8:26 ` Jan Beulich
2023-10-31 22:56 ` Stefano Stabellini
2023-10-30 22:55 ` Stefano Stabellini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 3/8] x86: add asmlinkage macro to variables only used in asm code Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 4/8] x86/grant: switch included header to make declarations visible Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 5/8] x86/vm_event: add missing include for hvm_vm_event_do_resume Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 6/8] xen/console: remove stub definition in consoled.h Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 7/8] x86/mem_access: make function static Nicola Vetrini
2023-10-30 9:11 ` [XEN PATCH][for-4.19 v5 8/8] docs/misra: exclude three more files Nicola Vetrini
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=0e96a194d77d89fbd65537b464664429@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=cardoe@cardoe.com \
--cc=consulting@bugseng.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=simone.ballarin@bugseng.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.