[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/5] x86: Add in-scope files under cpu/ to MISRA scans
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Wed, 18 Nov 2026 18:17:51 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=aHYyEvK/4hmjKji09uiriCo5p7j7RsCBETyKs1bAt0M=; b=aI/pGgqJMYxwdXaCrnyW7vOQP27MjO935SlAj/spNVBSsgz8wPjkQewks9vJw7yP5O6F/FTdI7nayNVhc74PWDFeKAlqK62g4qRTKPu3qMGVpDyCM4eK4u4DgN8DgHLCdBbRGYROyEFq8U044RHpTNighlqIDcatUHP6b8p1/QrWVqDjybXhwXscFHALe1XVLSVqL+ExS6MXb5tuZ85vcIAnp4RtF2b6Nmeaye9f2UBsz5OrUqqQe5Q0M0+adKjLaR/5fkCj9/qsVnp9NzY4XprIOkAHvJXx5s9suSk3SLXR/Rc//+3BaWa5rFSY4wzg1FuvXnPbIs0008fWozV97w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uK0ouI8DAotcTeV3KgitU8nINlZ2H+FEdroW854hOUiuX4rY/cUbDZS9GZgkwhnDh26P85sB1xWGTTmEYsGSfJDBolAo+B0wqI/EAdYicIpJl5lwS8WnTVoag6XX/qE7nCW1aVFzHodt5Zco8q8YDLw1zhAoJ+1QzhkEqmCgy+pFQyNKQzvreMr0AwryemtoxBOTwFXdKL7ndVb8NOS0E+jnqkhSfWKN2c4zIebaz+zXEjnne4uJuAuWYOws3zWiqrOP+wb8ksQBov6tsRGZ8OH2JMBy1I866QV1UYm7IMAISDRxntBjxvpcu+G0QfjaMgvDp3ssCN8f9aEYBtgvIA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, "Doug Goldstein" <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>
- Delivery-date: Wed, 18 Nov 2026 17:20:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi,
The files under cpu/ are excluded from MISRA scans due to their Linux
provenance but they aren't kept in close sync. At best they get
semiregular updates (mwait_idle.c), but most often the files grow with
Xen specifics bops that get a free pass on MISRA scans merely due to
colocation with ancient Linux code. Some files just were never part of
Linux (hygon.c) to begin with, which makes the blanket exclusion even
less credible.
This series brings everything under the MISRA scan umbrella, with the
surprisingly few fixes involved.
eclair pipeline:
https://gitlab.com/xen-project/people/agvallejo/xen/-/jobs/18149225087
regular pipeline (still running):
https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/3085381461
Alejandro Vallejo (5):
x86/cpu: Add break to early_cpu_init() switch
x86/mtrr: Address MISRA C Rules 5.3, 8.3 and 8.4
x86/cpu: Use U suffixes on integer constants
x86/amd: Make cpu_has_amd_erratum() non-variadic
eclair/x86: Scan in-scope files inside cpu/
.../eclair_analysis/ECLAIR/deviations.ecl | 3 -
docs/misra/exclude-list.json | 36 -----------
xen/arch/x86/cpu/amd.c | 62 +++++++++----------
xen/arch/x86/cpu/centaur.c | 4 +-
xen/arch/x86/cpu/common.c | 49 ++++++++-------
xen/arch/x86/cpu/hygon.c | 8 +--
xen/arch/x86/cpu/mtrr/generic.c | 6 +-
xen/arch/x86/cpu/mtrr/main.c | 4 +-
xen/arch/x86/include/asm/amd.h | 11 ++--
9 files changed, 73 insertions(+), 110 deletions(-)
--
2.43.0
|