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

Re: [XEN PATCH v2 07/13] x86/vmx: fix violations of MISRA C:2012 Rule 7.2


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 7 Jul 2023 08:44:33 +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=VZ79/PeRiZAXUpkz5BPKVLnJPRfqrgVQQWfTaOLvyz8=; b=HpQc0Etj/qt12e02rMUFh8bD8qR93v0zKjebSFrPvWgDe/qWaYOc1MIFMvMTyAWEr98l8unSElZjYonU2F2RgmcFds1d3l/RFAc/yHAXw/jf6/75vPHqRdTFssdAzdEdbXzpuRQSTeCQBeCBnLTXbrwk+ieVZsfxT2dyU48XvMs5cYChEAPR9uN1HzslW8SVDnBySOxM8xJKwAteac+GvJ4vfBlXT0rZRwYGPEANDDyOM5pzVPU6rjgklOzbd1HGMR4ySRPMDCERuDKrf40MoTIsylnG/f1NobvIJMQRmEJeMbKCiyQL2cc4hMpUI6D9YQ+UpESLKLo7ZQcEn6ZoHQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BipA2udUgxs7lHWnrnpbhY/7CclQICXkmKIZ0r+k8Kje+cE2o5qsmQcJ93YrgsiJPLHWmGcOGHAgcKy+jm/XK17wIOhGnainXEA0vYXmWt+s5IvQijgnAy6/lzbqB3/TgLOX0rPrSt77MkGKclPo+vis+79PpbdO2cy4iHQOBiZG1VgXLL1y2MZcxNp02CMeN52wuDl2zSj+dQz5cnXKfKpeMSMSoWd3+jXKkm6lGS4wmGFtzSORTeZ6Q8XFPEnW919z0IUoo2L13BglSx9ZktmZLk7qbKKPcLq7pmIJloK6lAqhG+8py7TzCVCfYX6GQwsYf84eZTMqKZhvosFvDQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, consulting@xxxxxxxxxxx, Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <Xenia.Ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 07 Jul 2023 06:45:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2023 00:17, Stefano Stabellini wrote:
> On Thu, 6 Jul 2023, Jan Beulich wrote:
>> On 05.07.2023 17:26, Simone Ballarin wrote:
>>> --- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
>>> @@ -207,7 +207,7 @@ void vmx_vmcs_reload(struct vcpu *v);
>>>  #define CPU_BASED_ACTIVATE_MSR_BITMAP         0x10000000
>>>  #define CPU_BASED_MONITOR_EXITING             0x20000000
>>>  #define CPU_BASED_PAUSE_EXITING               0x40000000
>>> -#define CPU_BASED_ACTIVATE_SECONDARY_CONTROLS 0x80000000
>>> +#define CPU_BASED_ACTIVATE_SECONDARY_CONTROLS 0x80000000U
>>
>> Interesting - you don't change adjacent #define-s here, nor ...
>>
>>> @@ -257,7 +257,7 @@ extern u32 vmx_vmentry_control;
>>>  #define SECONDARY_EXEC_XSAVES                   0x00100000
>>>  #define SECONDARY_EXEC_TSC_SCALING              0x02000000
>>>  #define SECONDARY_EXEC_BUS_LOCK_DETECTION       0x40000000
>>> -#define SECONDARY_EXEC_NOTIFY_VM_EXITING        0x80000000
>>> +#define SECONDARY_EXEC_NOTIFY_VM_EXITING        0x80000000U
>>
>> ... here. May I ask why that is? (I'm not opposed, but the
>> description suggests otherwise.)
> 
> Like I wrote in the other email, the requirement is only to add U where
> the top bit is set (0x80000000). Adding U to the other constant is
> optional and for us to decide.

Right, but as said then the description shouldn't suggest things are
being done consistently everywhere. (Likely this is going to become
easy when splitting by maintainership area, by then simply omitting
the respective sentence from the description.)

Jan



 


Rackspace

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