Skip to content

Address violations of MISRA C:2012 Rule 7.2

Simone Ballarin xen-devel 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 2 repliesIn review
  2. v74 patches 4 repliesSuperseded
  3. v67 patches 11 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v54 patches2 repliesSuperseded
v44 patches10 repliesSuperseded
v315 patches13 repliesSuperseded
v213 patches45 repliesSuperseded
v113 patches37 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/vmx: address violations of MISRA C:2012 Rule 7.2xen/arch/x86/cpu/vpmu_intel.c xen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vvmx.c +2 more+58 -580 replies
2/3x86/hvm: address violations of MISRA C:2012 Rule 7.2xen/arch/x86/hvm/hypercall.c xen/arch/x86/hvm/pmtimer.c xen/arch/x86/hvm/stdvga.c +10 more+136 -1361 reply
3/3xen/x86: address violations of MISRA C:2012 Rule 7.2xen/arch/x86/apic.c xen/arch/x86/cpu-policy.c xen/arch/x86/cpuid.c +4 more+23 -231 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchStefano StabelliniJan Beulich
1/3R-b R-b
2/3R-b A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [XEN PATCH v8 0/3][for-next] Address violations of MISRA C:2012 Rule 7.2

The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states:
"A 'u' or 'U' suffix shall be applied to all integer constants that are represented in an unsigned type".

These violations are caused by the missing "u" or "U" suffix in unsigned integer constants, such as:

xen/arch/x86/hvm/hypercall.c:132.17-132.26
if ( (eax & 0x80000000) && is_viridian_domain(currd) )

If a rule is not met, changes are needed in order to achieve compliance. The patches in this series achieve compliance for MISRA C:2012 Rule 7.2 by adding the 'U' suffix to integers literals with unsigned type and also to other
literals used in the same contexts or near violations, when their positive nature is immediately clear. The latter changes are done for the sake of uniformity.

This series only adds an U suffix on a newly introduced macro in "x86/hvm: address violations of MISRA C:2012 Rule 7.2". No changes in the other commits.

Gianluca Luparini (1):
x86/vmx: address violations of MISRA C:2012 Rule 7.2

Simone Ballarin (2):
x86/hvm: address violations of MISRA C:2012 Rule 7.2 xen/x86: address violations of MISRA C:2012 Rule 7.2

 xen/arch/x86/apic.c                     |   2 +-
 xen/arch/x86/cpu-policy.c               |  18 +--
 xen/arch/x86/cpu/vpmu_intel.c           |   2 +-
 xen/arch/x86/cpuid.c                    |   8 +-
 xen/arch/x86/extable.c                  |   2 +-
 xen/arch/x86/hvm/hypercall.c            |   2 +-
 xen/arch/x86/hvm/pmtimer.c              |   4 +-
 xen/arch/x86/hvm/stdvga.c               |  32 ++---
 xen/arch/x86/hvm/vlapic.c               |   6 +-
 xen/arch/x86/hvm/vmx/vmcs.c             |   6 +-
 xen/arch/x86/hvm/vmx/vvmx.c             |   8 +-
 xen/arch/x86/include/asm/apicdef.h      |   2 +-
 xen/arch/x86/include/asm/config.h       |   2 +-
 xen/arch/x86/include/asm/hpet.h         |   2 +-
 xen/arch/x86/include/asm/hvm/trace.h    |   4 +-
 xen/arch/x86/include/asm/hvm/vioapic.h  |   2 +-
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h |  84 +++++------
 xen/arch/x86/include/asm/hvm/vmx/vmx.h  |  16 +--
 xen/arch/x86/include/asm/msi.h          |   2 +-
 xen/arch/x86/include/asm/msr-index.h    | 184 ++++++++++++------------
 xen/arch/x86/include/asm/pci.h          |   8 +-
 xen/arch/x86/include/asm/x86-defns.h    |  22 +--
 xen/arch/x86/percpu.c                   |   2 +-
 xen/arch/x86/psr.c                      |   2 +-
 xen/arch/x86/spec_ctrl.c                |  12 +-
 25 files changed, 217 insertions(+), 217 deletions(-)
Signature · 1 line
2.34.1