[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH][for-4.19 v4 3/8] x86: add deviation comments for asm-only functions


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, sstabellini@xxxxxxxxxx
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 24 Oct 2023 10:14:44 +0200
  • 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=lClNo14qIxOXDeccmGf18BEwqsElUsggSzrtG1z4XxY=; b=Nx+05zA5ZM2r0tB7gCd62BwD07XEsCvAcsvxRjBJSEiBxANWky15hoJRk4VMTPWdd7FPxaQfLdkiTOKl6/uIxK1hhEa1ZEVEI2Wy8J/CAebrsER1d/MTG5Yg5K5r3gXskHBSY7mEaBOH7ZQbFFwsjMHZIw6fXmimozA8EX4hM91Y3pTrAE3MyXejgAVK3baWlhsRpN2PqSBPwcIuPW3toe0YKkpItKxVFDPvzwgvfzyQxI6BuOPW5lu2Ac6nQICkeX/OpH6Nxv6FcScO1/UpCsKRWChaALnvAzukq5w0xOYl0HTM/1IgxYEL8SSrXtOfuAKNOubGT9dVzgZ1h7NIVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NpJNjQsQfsIiK2GSasugVnYC6g5t4kWv+2+/zVXpqK5CPhMwCLN/EVX1xGKWwqMnQMZUEO9ow8OsuCACvXlfd0k4Qe0jOuGVsV0vOIurJjEt8YYZhc2mNfRTFQwEMca+5ribn2+skvS1uW7io/rKDtKzAVrIF1Ewe7rjaHN0UuylW/Vz7DosGG3dml5cDl2X37vY0CR4SQBIFJdik1gTJqOrGuCWlF2WAGr2qSwJrP6HguJBV3asVfqUwB6Nu7a2eMbIBe+fzBdbn357CYy0tR4+tK0GJ47wlt3d0eoVCmORIQ119ifc1/IVRSbkdVdLjccZawrBxgq0/v3TpH8TVA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 24 Oct 2023 08:14:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxx>
>>> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>> ---
>>> 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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.