Commit Graph
623 Commits
Author SHA1 Message Date
Dmytro Prokopchuk b07838dc46 automation/eclair: generalize the noreturn function-pointer deviation
The R11.1 safe cast only matched void noreturn (*)(void *). Accept a
conversion where noreturn is omitted and the signature is otherwise
compatible. canonical() covers typeof destinations, and
compatible_deep_unqualified keeps the parameter and return types aligned.

Discarding noreturn does not change the calling convention. Code after
the call is unreachable when every possible callee is noreturn. Leaving
that code in place is a tolerated Rule 2.1 violation. The full rationale
is in docs/misra/deviations.rst.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Acked-by: Nicola Vetrini <nicola.vetrini@bugseng.com> # automation/eclair_analysis/.*
Acked-by: Jan Beulich <jbeulich@suse.com>
2026-10-27 09:03:28 +01:00
Dmytro Prokopchuk 68224f49a0 Eclair: scan the last xen-syms linking pass on Arm
The hide pattern .xen-syms.[013] leaves pass 2 visible. On x86
LAST_LINKING_PASS is 2, so that is the final link. On Arm
LAST_LINKING_PASS is 3 and the final image is .xen-syms.3. Pass 2 is
usually only a symlink, so Eclair saw no program link and reported every
translation unit as unreachable.

During analysis preparation, read LAST_LINKING_PASS from the architecture
makefile and the pass numbers from the foreach list in
xen/scripts/Makefile.link. Hide every pass except that one. An earlier
pass that is a real link stays hidden. The generator runs from
generate_ecl.sh, together with the other ECLAIR configuration scripts.

Fixes: a401b5c9dc ("Eclair: re-enable scanning of the (almost) final linking step")
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Acked-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2026-10-27 08:50:01 +01:00
Nicola Vetrini 768d772e09 eclair: restrict scoping of guest copy deviation MISRA C Rule 11.8 violations
The file scoping restrictions were spelled out in the documentation comment,
but not enforced by the configuration.

Remove duplicated file tag asm_offsets while at it.

No functional change.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2026-09-30 08:50:36 +02:00
Dmytro Prokopchuk 2f67b00dde misra: deviate MISRA C Rule 5.5 for hypfs_alloc_dyndata()
MISRA C Rule 5.5 states: "Identifiers shall be distinct from macro
names".

Update ECLAIR configuration to deviate identifier and macro name
clashes by specifying the macros that should be ignored.
This includes hypfs_alloc_dyndata(), where the real function takes
an allocation size and the same-named macro is a typed convenience
wrapper that expands calls using sizeof(type).

Update deviations.rst and rules.rst accordingly.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2026-09-30 08:49:35 +02:00
Ayan Kumar Halder 24bd190cd9 xen/arm: gic: Add GIC SGI boot/self tests in Xen
Boot self-tests (also referred to as boot-time tests or power-on
self-tests) are intended to check that Xen has configured the hardware
correctly before bringing up any domains.

Introduce tests to confirm that, using a dedicated SGI (GIC_SGI_TEST):
1. A cpu can send the SGI to itself
2. A cpu can send the SGI to another specific CPU (CPU0)
3. A cpu can send the SGI to all the other CPUs

Each CPU counts the test SGIs it takes. A sender samples those counters
before sending and then waits for the count of every CPU it targeted to
change, which is how it tells that the SGI was really delivered. The
counters are never reset, so comparing against a sample rather than an
absolute value keeps concurrent senders from disturbing each other. The
snapshot is allocated rather than kept on the stack, as NR_CPUS can be
large enough for such an array to overflow it.

A test reports a failure by panic(), so Xen never continues on a
platform where SGI delivery is broken. When the tests pass, Xen carries
on booting normally.

Also introduce a config CONFIG_BOOT_SELFTEST which enables these
tests. It depends on DEBUG and is off unless explicitly enabled.

Also introduce a boolean command line parameter "gic-test", so that a
build with CONFIG_BOOT_SELFTEST enabled can be shipped but the tests
selected at boot. It is documented in
docs/misc/xen-command-line.pandoc.

In order to keep all the boot self-tests together in the binary, a
separate section "initcallboottest" is introduced. Tests are registered
using __initcallboottest() and run once on every CPU by
do_init_boottests(), bracketed by begin/end messages. They run before
any domain is created on the primary core, and before the idle loop is
entered on a secondary core.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Julien Grall <julien@xen.org>
2026-09-28 13:11:52 -07:00
Jan Beulich f6ccb8effe automation/Eclair: tag directive 4.3 as well as rules 17.2 and 21.17 as clean
These have been clean for a while already, without being marked so.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger@xenproject.org>
2026-09-23 10:01:38 +02:00
Jan Beulich 5b063007d5 automation/Eclair: tag rule 13.1 as clean
Remaining violations were addressed.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-09-22 09:17:04 +02:00
Jan Beulich 40ad6282e2 Arm/guestcopy: deviate copy_guest() uses just like their x86 counterparts
Like x86/HVM's __hvm_copy(), Arm's copy_guest() is used for both to-guest
and from-guest copying. Naturally in the latter case the hypervisor buffer
needs writing to, hence the function parameter cannot be pointer-to-const.

No functional change intended.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-09-22 09:13:19 +02:00
Jan Beulich a401b5c9dc Eclair: re-enable scanning of the (almost) final linking step
The real final binaries are now no longer created by a linker invocation,
but by renaming an intermediate file (each). Arrange for linking pass 2
outputs to be scanned instead, yet continue to exclude the auxiliary
.xen.efi.alt.* binaries.

Fixes: da944a72fd ("x86: split xen-syms/xen.efi linking rules"))
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-09-21 10:09:45 +02:00
Jan Beulich 68c3f7fb3a Eclair: relax long <-> function-pointer conversion deviation
What is true for unsigned long is also true for plain/signed long, thus
also taking care of two instances of __x86_return_thunk() being cast to
long.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-09-21 09:59:08 +02:00
Jan Beulich 13d1c89e04 Eclair: deviate BUILD_ERROR() wrt rule 2.1 and introduce variants
BUILD_ERROR() is even stronger a guard than assertions in general, and
ASSERT_UNREACHABLE() (or BUG()) in particular. Deviate it just like those
to allow use for marking unreachable portions of code.

In some cases code being unreachable is dependent upon configuration.
Introduce two variants, as constructs like

    if ( IS_ENABLED(CONFIG_...) )
        BUILD_ERROR("...");

results in the if() still being reported as unreachable. Sadly these two
new macros introduce a new 20.12 violation each, which hence also needs
deviating.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-09-01 10:00:34 +02:00
Anthony PERARD d14794c332 automation/eclair: Restrict where eclair jobs are auto-started
This will prevent eclair jobs from been started automatically
everywhere but in the main push repo, but still have the option to
start a jobs manually.

Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-08-10 17:06:41 +02:00
Jan Beulich f2cac32029 x86: SHADOW_PAGING is deprecated
Addressing certain issues, in particular related to operations which may
take excessively long and therefore would need preemption, has turned out
overly costly. Since alternatives (HVM/PVH: HAP, PV: shim) are commonly
available, the decision was to deprecate the functionality, while still
retaining it for people to use at their own (security) risk. Memory-wise
small enough guests may still be okay to run.

Some CI testing depends on SHADOW_PAGING.  Explicitly enable it when needed.

This is CVE-2026-42493 / XSA-495.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
2026-07-28 12:40:10 +01:00
Marek Marczykowski-Górecki d9e36605ff CI: Enable FRED on the PTL runner
Add new job-level EXTRA_XEN_OPTS variable, in addition to CONSOLE_OPTS.

FRED is not yet enabled by default on Intel systems, but is expected to
function.  Explicitly turn it on for added test coverage in the short term.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-07-10 19:35:49 +01:00
Marek Marczykowski-Górecki 77ed730bfb CI: Add the new Panther Lake runner
For now run similar set of tests as ADL.

Exclude suspend test for now. While firmware claims S3 is supported,
suspend attempt fails (power LED blinks for a few seconds, and
then system reboots). With no messages on the serial console, even with
`sync_console`.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-07-10 19:35:49 +01:00
Andrew Cooper c109c7aa44 CI: Remove x86 microcode from arm32 jobs
All build containers are non-root now.  Complete the todo by dropping the
workaround.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 18:04:20 +01:00
Andrew Cooper 66f59e7657 CI: Fix inconsistent use of x86-{64,32} vs x86_{64,32}
The configuration uses a mix of dashes and underscores, which is irritating to
develop for.  Switch to using the underscore form consistently; it is the more
common form and it has the benefit that it allows splitting on dashes to work
sensibly.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 18:04:20 +01:00
Andrew Cooper cfaaf09a5e CI: Update the Alpine arm64 container to 3.24
Perform standard syntax cleanup and make it a non-root container.  Switch yajl
for json-c given the deprecation of the former.  Drop dev86 which is an
x86-only dependency, and QEMU dependencies as we don't build QEMU in this
environment any more.

When updating the job names, also rename some for consistency so the arm64
fragment comes before the compiler.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 18:04:20 +01:00
Andrew Cooper 694302cc84 CI: Update the Alpine x86_64 container to 3.24
Perform standard syntax cleanup and make it a non-root container.  Switch yajl
for json-c given the deprecation of the former.

Add an x86_64 suffix for naming consistency with everything else.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 18:04:20 +01:00
Andrew Cooper 4dff3f89c1 CI: Introduce new qubes-hw-runner.dockerfile
This container is tied to gitlab-runner environment in the RPis driving the
test systems, not a specific version of Alpine.  Intentionally give it a
generic name so it need not change in the future.

Switch to Alpine 3.24 right away, as it doesn't interact with the 3.18 builds
under test.

The container needs to remain a root container.  By no longer using the
arm64v8 build container for dual-purpose, we can finally make the build
containers be non-root.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 18:04:20 +01:00
Andrew Cooper efcb4c5e2f CI: Use more specific Xilinx runner tags
In order to avoid serialising the testing on both boards, the runner
configuration is being adjusted.

Have the .xilinx-arm64 and .xilinx-x86_64 templates choose the board directly
using a more specific tag.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Victor Lira <victorm.lira@amd.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-15 12:42:55 +01:00
Andrew Cooper ffb9c3016b CI: Rename xenial-xilinx to xilinx-hw-runner
The container is tied to the runner, not a version of Ubuntu.  Intentionally
give it a generic name so it need not change in the future.

Apply standard cleanup to the dockerfile, except that it must continue to be a
root container to drive real hardware.  Explicitly install ca-certificates to
compensate for --no-install-recommends.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-12 15:00:38 +01:00
Andrew Cooper 3ddcb957b5 CI: Rework the archlinux container
Rename it to have an x86_64 suffix, updating the build job names and scheduled
rebuild task.

Apply standard cleanups.  Trim the package list down to what is actually
needed.  Archlinux's base-devel contains most libraries, but some of the
listed packages have never been dependenices for Xen, and a lot are QEMU
dependenices which aren't useful owing to the lack of the ninja package.

This shrinks the container from 533MB to 380MB.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-12 15:00:38 +01:00
Andrew Cooper 2a52894017 CI: Fixes to containerize
These were missed from prior changes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-12 15:00:38 +01:00
Andrew Cooper 37df17d2f9 CI: Update Opensuse 15.6 to 16.0
The default version of python is 3.13, so drop the 3.11 overrides.

Swap yajl for json-c, given the deprecation of the former.  Add lz4.

bin86/dev86 are no longer available.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper 58eaf63b82 CI: Update Fedora to 43
Swap yajl for json-c, given the deprecation of the former.  Add lz4.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper 58d797e1ac CI: Add Ubuntu 26.04
Swap yajl for json-c, given the deprecation of the former.  Add lz4.

Add 26.04 GCC/Clang debug/non-debug jobs.  Drop the 24.04 debug jobs to keep
the overall job count down.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper def7f9ef58 CI: Drop Ubuntu 16.04
Ubuntu 16.04 is now fully out of support.

Introduce an 18.04 GCC Debug job in lieu of losing the 16.04 job.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper fdcc559661 CI: Swap ocaml-nox for ocaml in newer Debian/Ubuntu
Ocaml 4.08 and earlier had the compiler package depend on graphics, and
therefore on X.  Ocaml 4.09 and later dropped this dependency.

Debian and Ubuntu versions with Ocaml 4.08 and earlier (which are Debian
Bullseye/11, and Ubuntu Focal/20.04 and earlier) had ocaml-nox packages with
this dependency stripped, which we use to keep the size of the containers
down.

In newer versions of Debian and Ubuntu, ocaml-nox is just a transitional
package referring back to ocaml.  Ubuntu Resolute/26.04 has finally removed
this transitional package.  For all versions where ocaml-nox is just a
transitional package, swap to the ocaml package.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper e58d8aa171 CI: Drop test-artifacts/Makefile
This is unused since commit 3c0c177ff9 ("CI: Switch qemu-arm* jobs to using
the distro provided QEMU"), and wants never to return.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper 924c0ff17f tools/configure: Detect the presence of liblz4
As with other compression libraries, group liblz4 into ZLIB_{CFLAGS,LIBS}.

Add the packages to the Debian Trixie build containers for coverage.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-08 14:06:40 +01:00
Andrew Cooper 0b03d96373 CI: Mark eclair-x86_64-allcode as blocking now that it's clean
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-03 10:23:21 +01:00
Jan Beulich c866569ce1 CI: disable debug info for analysis jobs
Its generating and linking takes time (and space), while at the same time
Eclair should be entirely independent of its presence.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-06-03 08:15:55 +02:00
Andrew Cooper 3c0c177ff9 CI: Switch qemu-arm* jobs to using the distro provided QEMU
This removes qemu-system-aarch64-6.0.0-*-export and fixes the outstanding
TODOs about efi-virtio.rom, now that the QEMU in use has it's /usr/share/
properly packaged.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2026-05-29 23:13:02 +01:00
Andrew Cooper eac95d129d CI: Add a Debian 13 (Trixie) arm64 container
Exactly as per the Bookworm container, but additionally with the ipxe-qemu and
qemu-system-aarch64 packages.  These will be used to remove the export jobs.

Switch qemu-arm{32,64} test jobs to use this container, and add two new build
tests.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2026-05-29 23:13:02 +01:00
Javi Merino 4d8aa53ed1 CI: Refresh the Debian 12 arm64 container
Rework the container to user heredocs for readability, derive from
bookworm-slim and use apt-get --no-install-recommends to keep the size down.

Additionally:

 * Make it a non-root container.
 * Drop libext2fs-dev which is an x86-only dependency.
 * Add libncurses5-dev for xentop and zlib1g-dev which was missing from the
   libxenguest decompressors.
 * As there's no ninja, the container can no loger build QEMU so drop
   libglib2.0-dev and libpixman-1-dev too.
 * Swap libyajl-dev for libjson-c-dev given the deprecation of the former.

Rename the job to debian-12-arm64-* to follow the naming scheme of all the
other CI jobs.

This reduces the size of the debian:12-arm64v8 from 2.25GB down to 1.62GB.

Signed-off-by: Javi Merino <javi.merino@cloud.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2026-05-29 23:13:02 +01:00
Javi Merino 81c9fa421d CI: Refresh the Debian 12 arm32 cross compile container
Rework the container to user heredocs for readability, derive from
bookworm-slim and use apt-get --no-install-recommends to keep the size down.

Convert it to being a non-root container.  Add checkpolicy as FLASK is an
available build option for arm32 under Randconfig testing.

Rename the CI jobs to debian-12-arm32-* to follow the naming scheme of all the
other CI jobs.

No functional change.

Signed-off-by: Javi Merino <javi.merino@cloud.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2026-05-29 23:13:02 +01:00
Andrew Cooper 2ca218af23 CI: Adjust test needs[] to ensure binaries/ is non-root
The binaries/ directory is a composition from the artefacts, and also used as
a working directory for most of the tests.  If the very first artefact is from
a root container, then the test must also be a root container to use it as a
working directory.

For arm64, the existing linux-arm64 artefact suffices.  For arm32, pull in the
microcode-x86 artefact as it's the smallest available.  This bodge can be
removed when all build containers have become non-root.

For the qemu-xtf-dom0less-arm64-*-xen-version jobs, use *arm64-test-needs
ahead of alpine-3.18-gcc-* (as it's a root container), and to deduplicate
the *-export dependency.

This will allow us to change containers to being non-root one at a time,
rather than all in one go.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2026-05-29 23:13:02 +01:00
Jan Beulich aaa34f23ac x86/time: don't exclude from Eclair scanning
The justification is wrong, and the file hence shouldn't really be
excluded.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2026-05-22 12:18:00 +02:00
Jan Beulich 1615934e29 CI: collect certain intermediate files as artifacts (part 2)
Build issues may also surface for analysis jobs. Collect intermediate
files (if any) there as well. Include xen/.config too, since it's not
otherwise collected.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-05-22 08:17:34 +02:00
Jan Beulich fa2544bbe4 x86/shadow: deviate guest_va_t wrt Misra C:2012 rule 5.6
... ("A `typedef' name shall be a unique identifier"). Much like already
done for guest_intpte_t and guest_l[12]e_t, but limited to shadow/multi.c.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-05-18 09:01:56 +02:00
Nicola Vetrini 79e060ea03 CI/ECLAIR: avoid intercepting intermediate linking steps
These do not add any value to the analysis other than duplicating some reports
in whole-program analysis, as the intermediate linking steps are only used to
build the symbol table.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-05-14 13:38:04 +01:00
Jan Beulich 2121f89503 CI: collect certain intermediate files as artifacts
When one of the linking passes fails, additional intermediate files are
still in place. Having them available for analysis of the underlying
problem can be pretty helpful. Collect some into a new intermediates/
directory. (Nothing new will be collected if linking succeeds.)

As the script is run with -e passed to bash, defer exit if the main
"make" (or substituent script thereof) failed. This way more artifacts
are collected, potentially making it easier to analyze the failure.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-05-11 18:40:58 -07:00
Jan Beulich 87dd994a3e CI: re-work Xen artifacts collection
There's no need to do this separately from three places. Once moved to the
bottom of the script, the need for this to be a function also disappears.

While there also make sure xen-syms is collected. This is rather more
useful for analysis of possible problems than its stripped counterpart.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-05-11 18:40:53 -07:00
Javi Merino e8c1feab33 CI: Refresh the Debian 12 cppcheck container
Rework the container to derive from bookworm-slim, and to build and run
cppcheck as a normal user.  User heredocs for readability and use apt-get
--no-install-recommends to keep the size down.

Changed the libpcre3-dev dependency to libpcre3, as the -dev package
is only needed for building, not for running.

Signed-off-by: Javi Merino <javi.merino@cloud.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-05-06 13:14:36 +01:00
Roger Pau Monne 278953f6c1 automation/gitlab: introduce macOS build jobs
With the imminent decommission of CirrusCI we will lose the limited macOS
build testing done there.  Introduce two Gitlab macOS build jobs that
reproduce the ones present on CirrusCI.

According to the "Community programs" Gitlab documentation [0] we get
50,000 compute minutes per month.  The arm64 job takes ~1m 15s, and the
x86_64 one ~2m.  I think it's likely enough given the amount of minutes we
have available.  We might need to reconsider if we add more tasks that
consume compute minutes.

[0] https://docs.gitlab.com/subscriptions/community_programs/#gitlab-for-open-source

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-05-05 20:52:48 +02:00
Anthony PERARD 61f957d48c CI: use --platform on docker build and push
Without --platform, it seems recent versions of docker ignores the
platform of the image when pushing, and it's pushed as the platform of
the runner.

If we happen to build an arm64 image on x86, with recent version of
docker, the image will be push as if it was an x86 image, then
`docker run --platform=linux/arm64 ...` fails. Even if it would
work without --platform, gitlab-runner will not be able to use the
image.

To go back to the previous behavior, we will extract --platform from
the dockerfiles, and use it on the command line.

--platform= is needed on both docker-build and docker-push. The first
one so that the image is tagged with the right platform, and the
second one so that we can push a "generic" image without been tagged
to a particular platform. --platform on docker-push allow to easly use
the container on any arch, without having to use --platform on
docker-pull or docker-run.

`docker push --platform` seem to have been added to 1.46, according to
the [doc], and doesn't exist on Podman. So we need to check that we
are using `docker` and that the API version is new enough.

[doc] https://docs.docker.com/reference/cli/docker/image/push/

Also, introduce the $img variable, to make the lines a bit shorter.

Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-05-01 10:51:19 +01:00
Michal Orzel 16579c5503 xen/dt-overlay: support phandle-based targeting in overlay_get_nodes_info
overlay_get_nodes_info() is called before fdt_overlay_apply() to extract
target paths from the overlay. This fails for overlays using phandle-based
targeting (target = <&label>) because DTC compiles these as unresolved
fixups (target = <0xffffffff>), causing fdt_overlay_target_offset() to
return -FDT_ERR_BADPHANDLE. Prior to this change users were forced to
manually modify the dtbo (even for hwdom) to switch from target to
target-phandle by manually inspecting also the host DTB.

Introduce overlay_get_target_path() which directly handles the two
targeting cases that occur before fixup resolution:
 - target-path: the string property is returned directly.
 - target = <&label>: the label is found in the overlay's __fixups__
   node, then resolved to a path via the base DTB's __symbols__ node.

Libfdt fdt_for_each_property_offset() violates MISRA R20.7. Despite
libfdt being excluded from the analysis, this causes ECLAIR scan to
report a regression because the violation introduced by a macro is
reported at the call site. Deviate R20.7 for libfdt.h.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
2026-04-29 07:37:58 +02:00
Marek Marczykowski-Górecki a183f7fbe7 CI: introduce BUILD_FOR_TESTS_ONLY
When the variable is set, only build jobs that are used in tests are
scheduled. This saves a lot of time, for example when scheduling a test
pipeline with alternative linux branch.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
2026-04-23 17:39:55 +02:00
Marek Marczykowski-Górecki 48b6cd64dc CI: make test-artifacts repo/branch/job customizable
Allow choosing which artifacts branch and job to use for Linux. This
allows running the same tests for different Linux versions, without
duplicating a lot of yaml sections.

Similarly, make the repo path itself configurable too. The main purpose
is to ensure the test pipeline triggered from any repo will fetch linux
artifact from the right repo. But with a minor change of using that
variable for rootfs and microcode artifacts too, it allows testing
test-artifacts repo changes without needing to modify gitlab-ci.yml in
xen.git at all.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
2026-04-23 17:39:55 +02:00