From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>
Cc: Jan Beulich <jbeulich@suse.com>,
michal.orzel@amd.com, xenia.ragiadakou@amd.com,
ayan.kumar.halder@amd.com, consulting@bugseng.com,
andrew.cooper3@citrix.com, roger.pau@citrix.com,
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 v4 3/8] x86: add deviation comments for asm-only functions
Date: Wed, 25 Oct 2023 16:04:47 +0200 [thread overview]
Message-ID: <d60e17379fbfdb1288288ee079113a17@bugseng.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2310241249080.271731@ubuntu-linux-20-04-desktop>
On 24/10/2023 21:50, Stefano Stabellini wrote:
> On Tue, 24 Oct 2023, Nicola Vetrini wrote:
>> On 24/10/2023 10:14, Jan Beulich wrote:
>> > On 24.10.2023 10:01, Nicola Vetrini wrote:
>> > > On 24/10/2023 09:50, Jan Beulich wrote:
>> > > > On 23.10.2023 11:56, Nicola Vetrini wrote:
>> > > > > As stated in rules.rst, functions used only in asm code
>> > > > > are allowed to have no prior declaration visible when being
>> > > > > defined, hence these functions are deviated.
>> > > > > This also fixes violations of MISRA C:2012 Rule 8.4.
>> > > > >
>> > > > > Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>> > > > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>> > > > > ---
>> > > > > Changes in v3:
>> > > > > - added SAF deviations for vmx counterparts to svm functions.
>> > > >
>> > > > Same comment regarding the R-b here as for patch 2.
>> > > >
>> > > > > --- a/xen/arch/x86/hvm/svm/intr.c
>> > > > > +++ b/xen/arch/x86/hvm/svm/intr.c
>> > > > > @@ -123,6 +123,7 @@ static void svm_enable_intr_window(struct vcpu *v,
>> > > > > struct hvm_intack intack)
>> > > > > vmcb, general1_intercepts | GENERAL1_INTERCEPT_VINTR);
>> > > > > }
>> > > > >
>> > > > > +/* SAF-1-safe */
>> > > > > void svm_intr_assist(void)
>> > > > > {
>> > > > > struct vcpu *v = current;
>> > > >
>> > > > Linux has the concept of "asmlinkage" for functions interfacing C and
>> > > > assembly. Was it considered to use that - even if expanding to nothing
>> > > > for all present architectures - as a way to annotate affected
>> > > > definitions
>> > > > in place of the SAF-*-safe comments?
>> > >
>> > > It was proposed by Julien a while ago (I think it the thread on
>> > > deviations.rst) to define
>> > > a macro asmcall that expands to nothing, to mark all such functions.
>> > > Right now, it's not
>> > > strictly necessary (given that there are already some uses of SAF in
>> > > Stefano's for-4.19 branch.
>> >
>> > Can this then be revisited please before any such reaches staging?
>> >
>> > Jan
>>
>> I'll let Stefano answer this one.
>
> Yes it can. If Nicola sends new patches I'll make sure to remove the
> corresponding ones from for-4.19.
>
> Nicola, you might want to send me privately the list of commits to take
> out from for-4.19.
Actually I checked: the involved SAF comments are already in staging,
specifically all
were part of commit 5a415ef2b24d578d29479e38abda3d5285b9afed
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-25 14:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 9:56 [XEN PATCH][for-4.19 v4 0/8] Fix or deviate various instances of missing declarations Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 1/8] xen: modify or add declarations for variables where needed Nicola Vetrini
2023-10-23 23:03 ` Stefano Stabellini
2023-10-24 6:18 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 2/8] x86: add deviations for variables only used in asm code Nicola Vetrini
2023-10-24 7:32 ` Jan Beulich
2023-10-24 7:58 ` Nicola Vetrini
2023-10-24 8:12 ` Jan Beulich
2023-10-24 13:40 ` Nicola Vetrini
2023-10-24 14:27 ` Jan Beulich
2023-10-24 7:35 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 3/8] x86: add deviation comments for asm-only functions Nicola Vetrini
2023-10-24 7:50 ` Jan Beulich
2023-10-24 8:01 ` Nicola Vetrini
2023-10-24 8:14 ` Jan Beulich
2023-10-24 13:41 ` Nicola Vetrini
2023-10-24 19:50 ` Stefano Stabellini
2023-10-25 14:04 ` Nicola Vetrini [this message]
2023-10-25 22:36 ` Stefano Stabellini
2023-10-26 9:42 ` Nicola Vetrini
2023-10-26 22:52 ` Stefano Stabellini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 4/8] x86/grant: switch included header to make declarations visible Nicola Vetrini
2023-10-24 7:54 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 5/8] x86/vm_event: add missing include for hvm_vm_event_do_resume Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 6/8] xen/console: remove stub definition in consoled.h Nicola Vetrini
2023-10-23 10:21 ` Jan Beulich
2023-10-23 10:29 ` Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 7/8] x86/mem_access: make function static Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 8/8] docs/misra: exclude three more files Nicola Vetrini
2023-10-23 10:23 ` Jan Beulich
2023-10-23 10:30 ` 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=d60e17379fbfdb1288288ee079113a17@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.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.