[RFC TEST_ARTIFACTS PATCH 1/2] artifacts: Initial commit

2024-10-22 Thread victorm.lira
From: Stefano Stabellini Create new repository to produce common artifacts for Xen tests Requested-by: Andrew Cooper Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Marek Marczykowski-Górecki Cc: Doug Goldstein Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org --- .gitlab-ci.

[RFC XEN PATCH 2/2] automation: add xilinx test (linux argo)

2024-10-22 Thread victorm.lira
From: Victor Lira Add x86_64 hardware test that creates a Xen Argo communication connection between two PVH domains. In the test, dom0 creates a domU and listens for messages sent by the domU through Argo. To accomplish this, build Xen with CONFIG_ARGO=y. Update the xilinx x86_64 test script to

[RFC TEST_ARTIFACTS PATCH 0/2] artifacts: Initial commit

2024-10-22 Thread victorm.lira
From: Victor Lira This patch series is a proof of concept that a separate repository can be used to generate kernel, rootfs, and other commonly used binary artifacts, and have Xen test jobs load these instead of generating them every run. The current configuration of Xen CI generates these using

[XEN PATCH v2] automation: add x86_64 test (linux argo)

2024-10-28 Thread victorm.lira
From: Victor Lira Add x86_64 hardware test that creates a Xen Argo communication connection between two PVH domains. In the test, dom0 creates a domU and listens for messages sent by the domU through Argo. To accomplish this, build Xen with CONFIG_ARGO=y and create a CI test job. Update the xil

[XEN PATCH v3] automation: add x86_64 test (linux argo)

2024-10-28 Thread victorm.lira
From: Victor Lira Add x86_64 hardware test that creates a Xen Argo communication connection between two PVH domains. In the test, dom0 creates a domU and listens for messages sent by the domU through Argo. To accomplish this, build Xen with CONFIG_ARGO=y and create a CI test job. Update the xil

[TEST_ARTIFACTS PATCH v1 1/1] build: add x86_64 xen artifacts (argo)

2024-10-24 Thread victorm.lira
From: Victor Lira Add container image build files: - alpine/x86_64-build - alpine/x86_64-rootfs - Makefile Add CI configuration and jobs to produce binaries for xen tests: - xen-argo Linux Xen Argo kernel module - bzImage Linux kernel - libargo Linux Argo shared libr

[TEST_ARTIFACTS PATCH v1 0/1] build: add x86_64 xen artifacts (argo)

2024-10-24 Thread victorm.lira
From: Victor Lira The current configuration of Xen CI generates test binaries using "export" jobs in every pipeline. This unecessarily uses a large amount of storage and network traffic because artifacts are duplicated over each project and branch that uses this configuration. Instead, use a sep

[XEN PATCH v1 1/3] automation: add linux 6.6.56 artifact

2024-10-17 Thread victorm.lira
From: Victor Lira Add dockerfile for building container image that holds linux 6.6.56 bzImage for x86_64, using the same build process as the current 6.1.19 image Signed-off-by: Victor Lira --- Cc: Doug Goldstein Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org --- .../tests-artifac

[XEN PATCH v1 3/3] automation: add x86_64 test (linux argo)

2024-10-17 Thread victorm.lira
From: Victor Lira Add x86_64 hardware test that creates a Xen Argo communication connection between two PVH domains. In the test, dom0 creates a domU and listens for messages sent by the domU through Argo. To accomplish this, add Xen build jobs to export Linux and argo artifacts, and build Xen w

[XEN PATCH v1 2/3] automation: add linux argo test artifacts

2024-10-17 Thread victorm.lira
From: Victor Lira Add dockerfile for building container image that holds test binaries for Xen Argo test on Linux 6.6.56 x86_64 The build produces the following: - xen-argo.ko Linux kernel module - lib/libargo* Linux shared library - argo-exec Linux user test program Signed-o

[XEN PATCH v1 0/3] automation: add x86_64 test (linux argo)

2024-10-17 Thread victorm.lira
From: Victor Lira Add x86_64 hardware test that creates a Xen Argo communication connection between two PVH domains. To accomplish this, add new build artifacts for Linux and Argo, and update the xilinx x86_64 test script. Victor Lira (3): automation: add linux 6.6.56 artifact automation: a

[RFC PATCH] automation: add linker symbol name script

2024-07-23 Thread victorm.lira
From: Victor Lira Add a script that extracts the names of symbols in linker scripts. Signed-off-by: Victor Lira --- Note: Not included are the "." location name or symbol names enclosed in quotes since the files dont't use any. --- Cc: Stefano Stabellini Cc: roberto.bagn...@bugseng.com Cc: con

[RFC PATCH v2] automation: add linker symbol name script

2024-07-24 Thread victorm.lira
From: Victor Lira Signed-off-by: Victor Lira Requested-by: Stefano Stabellini --- Notes: This is a utilty script for help with the MISRA process. This script matches all linker symbol names in linker script files for arm and x86. Not included are symbol names starting with "." or symbol names e

[RFC PATCH v3] automation: add linker symbol name script

2024-07-25 Thread victorm.lira
From: Victor Lira Requested-by: Jan Beulich Signed-off-by: Victor Lira --- Notes: This is a utilty script for help with the MISRA process. This script matches all linker symbol names in linker script files for arm or x86. Not included are symbol names starting with "." or symbol names enclosed

[PATCH v1] automation: add x86_64 xilinx smoke test

2024-07-26 Thread victorm.lira
From: Victor Lira Add a test script and related job for running x86_64 dom0 tests. Signed-off-by: Victor Lira --- Cc: Stefano Stabellini Cc: Doug Goldstein --- automation/gitlab-ci/test.yaml| 24 +++ .../scripts/xilinx-smoke-dom0-x86_64.sh | 144 ++ 2 f

[XEN][PATCH v1] automation: update xilinx test scripts config

2024-08-20 Thread victorm.lira
From: Victor Lira Change xen command line parameters to support new test board. Abstract serial port device name and tftp boot directory. Signed-off-by: Victor Lira --- Cc: Stefano Stabellini --- .../scripts/xilinx-smoke-dom0-x86_64.sh | 29 +++ .../scripts/xilinx-smoke-

[XEN][PATCH v2] automation: update xilinx test scripts (tty)

2024-08-23 Thread victorm.lira
From: Victor Lira Update serial device names from ttyUSB* to test board specific names. Update xilinx-smoke-dom0-x86_64 with new Xen command line console options, which are now set as Gitlab CI/CD variables. Abstract the directory where binaries are stored. Increase the timeout to match new setu

[PATCH v1] automation: fix xilinx test timeout length

2024-08-23 Thread victorm.lira
From: Victor Lira The timout is too short which causes the test to sometimes fail. --- Cc: Stefano Stabellini --- automation/scripts/xilinx-smoke-dom0-x86_64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh b/automation/scri

[PATCH v1] automation: update xilinx tests to use expect

2024-08-26 Thread victorm.lira
From: Victor Lira Fixes the CI failure introduced by 95764a0817. Update xilinx-smoke tests to use the "expect" utility for early exit from tests. Generalize the script "qemu-key.exp" to be used by both QEMU and hardware tests. Add a missing "-continue_timer" flag for the expect script to properl

[PATCH v1] automation: fix false success in qemu tests

2024-08-28 Thread victorm.lira
From: Victor Lira Fix flaw in qemu-*.sh tests that producess a false success. The following lines produces success despite the "expect" script producing nonzero exit status. set +e ... ./automation/scripts/qemu-key.exp | sed 's/\r\+$//' (end of file) The "set +e" is sometimes needed

[XEN PATCH v2 0/2] automation: test script fixes (pipefail)

2024-08-29 Thread victorm.lira
From: Victor Lira Separated into two patches to improve clarity and updated to use the "pipefail" function instead of "mkfifo". Victor Lira (2): automation: fix qemu test false success automation: use expect utility in xilinx tests .../build/ubuntu/xenial-xilinx.dockerfile | 1 + auto

[PATCH v2 2/2] automation: use expect utility in xilinx tests

2024-08-29 Thread victorm.lira
From: Victor Lira Fixes: 95764a0817a5 (automation: update xilinx test scripts (tty)) This patch introduced a CI failure due to a timeout in xilinx-x86_64 test. Change xilinx-x86_64 and xilinx-arm64 scripts to use "expect" utility to determine test result and allow early exit from tests. Add "exp

[PATCH v2 1/2] automation: fix false success in qemu tests

2024-08-29 Thread victorm.lira
From: Victor Lira Fix flaw in qemu-*.sh tests that producess a false success. The following lines produces success despite the "expect" script producing nonzero exit status: set +e ... ./automation/scripts/qemu-key.exp | sed 's/\r\+$//' (end of file) The default exit status for a pi

[XEN PATCH] common/sched: address a violation of MISRA C Rule 8.8

2024-06-20 Thread victorm.lira
From: Victor Lira Rule 8.8: "The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage" This patch fixes this by adding the static specifier. No functional changes. Reported-by: Stewart Hildebrand Signed-off-by: Victor Lira --- Cc

[XEN PATCH v2] common/sched: address a violation of MISRA C Rule 8.8

2024-06-21 Thread victorm.lira
From: Victor Lira Rule 8.8: "The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage" This patch fixes this by adding the static specifier. No functional changes. Reported-by: Stewart Hildebrand stewart.hildebr...@amd.com Signed-o

[XEN PATCH] common/sched: address a violation of MISRA C Rule 17.7

2024-06-24 Thread victorm.lira
From: Victor Lira Rule 17.7: "The value returned by a function having non-void return type shall be used" This patch fixes this by adding a check to the return value. No functional changes. Signed-off-by: Victor Lira --- Cc: George Dunlap Cc: Dario Faggioli Cc: Juergen Gross Cc: xen-devel@l

[XEN PATCH v1] automation: fix xilinx test console settings

2024-09-09 Thread victorm.lira
From: Victor Lira The test showed unreliable behavior due to unsupported console settings. Update the baud rate and I/O port used to connect to the UART. Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.o

[XEN PATCH v2] automation: fix xilinx test console settings

2024-09-09 Thread victorm.lira
From: Victor Lira The test showed unreliable behavior due to unsupported console settings. Update the baud rate used to connect to the UART. Signed-off-by: Victor Lira --- Changes v2: - restore I/O port address --- Cc: Andrew Cooper Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc

[PATCH v1] misra: add deviation of Rule 10.1 for unary minus

2025-04-23 Thread victorm.lira
From: Nicola Vetrini MISRA C Rule 10.1 states: "Operands shall not be of an inappropriate essential type" The unary minus operator applied to an unsigned quantity has a semantics (wrap around) that is well-known to all Xen developers. Thus, this operation is deemed safe. No functional change.

[PATCH v1] misra: add deviation for rules 21.1 and 21.2

2025-04-23 Thread victorm.lira
From: Nicola Vetrini MISRA C Rules 21.1 ("#define and #undef shall not be used on a reserved identifier or reserved macro name") and R21.2 ("A reserved identifier or reserved macro name shall not be declared") violations are not problematic for Xen, as it does not use the C or POSIX libraries. X

[PATCH v1 3/3] automation/eclair: tag Rule 19.1 as clean

2025-04-25 Thread victorm.lira
From: Federico Serafini Tag MISRA C Rule 19.1 as clean to avoid regressions. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall Cc: Roger Pau Monné Cc: Stefano Stabellini Cc: Nicola Vetri

[PATCH v1] misra: add deviation of Rule 5.5

2025-04-23 Thread victorm.lira
From: Federico Serafini MISRA C Rule 5.5 states that: "Identifiers shall be distinct from macro names". A common pattern in Xen is to have a function-like macro that acts as a "wrapper" for the function to be called: before calling the function, the macro adds additional checks or increase/decre

[PATCH v1 1/3] x86: x86_emulate: address violations of MISRA C Rule 19.1

2025-04-25 Thread victorm.lira
From: Nicola Vetrini Rule 19.1 states: "An object shall not be assigned or copied to an overlapping object". Since the "call" and "compat_call" are fields of the same union, reading from one member and writing to the other violates the rule, while not causing Undefined Behavior due to their relat

[PATCH v1 2/3] compat: address violations of MISRA C Rule 19.1

2025-04-25 Thread victorm.lira
From: Nicola Vetrini Rule 19.1 states: "An object shall not be assigned or copied to an overlapping object". Since the "call" and "compat_call" are fields of the same union, reading from one member and writing to the other violates the rule, while not causing Undefined Behavior due to their relat

[PATCH v1 2/2] automation/eclair: add Rule 14.3 to the monitored set

2025-04-25 Thread victorm.lira
From: Federico Serafini MISRA C Rule 14.3 is already tagged as clean: add it to the monitored set to avoid regressions. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall Cc: Roger Pau Monn

[PATCH v1 1/2] xen/page_alloc: address violation of Rule 14.3

2025-04-25 Thread victorm.lira
From: Federico Serafini MISRA C Rule 14.3 states that "Controlling expressions shall not be invariant". Add a SAF comment to deviate the rule for build configurations without CONFIG_LLC_COLORING enabled. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: An

[PATCH v2 1/2] x86: x86_emulate: address violations of MISRA C Rule 19.1

2025-05-02 Thread victorm.lira
From: Nicola Vetrini Rule 19.1 states: "An object shall not be assigned or copied to an overlapping object". In the function like macro "get_rep_prefix", one member of a union is assigned the value of another member. Reading from one member and writing to the other violates the rule, while not ca

[PATCH v2 2/2] automation/eclair: tag Rule 19.1 as clean

2025-05-02 Thread victorm.lira
From: Federico Serafini Tag MISRA C Rule 19.1 as clean to avoid regressions. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira Acked-by: Stefano Stabellini --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall Cc: Roger Pau Monné Cc: Stefa

[PATCH v2 1/2] x86: x86_emulate: address violations of MISRA C Rule 19.1

2025-05-02 Thread victorm.lira
From: Nicola Vetrini Rule 19.1 states: "An object shall not be assigned or copied to an overlapping object". In the function like macro "get_rep_prefix", one member of a union is assigned the value of another member. Reading from one member and writing to the other violates the rule, while not ca

[PATCH v2 2/2] automation/eclair: tag Rule 19.1 as clean

2025-05-02 Thread victorm.lira
From: Federico Serafini Tag MISRA C Rule 19.1 as clean to avoid regressions. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira Acked-by: Stefano Stabellini --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall Cc: Roger Pau Monné Cc: Stefan

[PATCH v1 1/2] x86: x86_emulate: address violation of MISRA C Rule 13.2

2025-05-07 Thread victorm.lira
From: Nicola Vetrini Rule 13.2 states: "The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders". The full expansion of macro "commit_far_branch" contains an assignment to variable "rc", which is also assigned to the result of the GNU st

[PATCH v1 2/2] automation/eclair: tag Rule 13.2 as clean

2025-05-07 Thread victorm.lira
From: Federico Serafini Update ECLAIR configuration to consider Rule 13.2 as clean so as to avoid regressions. Signed-off-by: Federico Serafini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall Cc: Roger Pau Monné Cc: St

[PATCH 2/3] xen/arm: add missing noreturn attributes

2025-06-04 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute, therefore causing a violation of MISRA C Rule 2.1: "A project shall not contain unreachable code". No functional change. Signed-off-by: Nicola Vetrini Signed-off-by: Victor Lira --- Cc:

[PATCH 3/3] xen/x86: add missing noreturn attributes

2025-06-04 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute, therefore causing a violation of MISRA C Rule 2.1: "A project shall not contain unreachable code". No functional change. Signed-off-by: Nicola Vetrini Signed-off-by: Victor Lira --- Cc:

[PATCH 1/3] xen/keyhandler: add missing noreturn attribute

2025-06-04 Thread victorm.lira
From: Nicola Vetrini Function `reboot_machine' does not return, but lacks the `noreturn' attribute, therefore causing a violation of MISRA C Rule 2.1: "A project shall not contain unreachable code". No functional change. Signed-off-by: Nicola Vetrini Signed-off-by: Victor Lira --- Cc: Andrew

[PATCH v1] automation: disable terminal echo in xilinx test scripts

2025-06-17 Thread victorm.lira
From: Victor Lira The default terminal settings in Linux will enable echo which interferes with these tests. Set the value in the script to avoid failure caused by a settings reset. Signed-off-by: Victor Lira --- Cc: Michal Orzel Cc: Stefano Stabellini --- automation/scripts/xilinx-smoke-dom

[PATCH v2 2/3] xen/arm: add missing noreturn attributes

2025-06-06 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2

[PATCH v2 1/3] xen/keyhandler: add missing noreturn attribute

2025-06-06 Thread victorm.lira
From: Nicola Vetrini Function `reboot_machine' does not return, but lacks the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2.1: "A

[PATCH v2 3/3] xen/x86: add missing noreturn attributes

2025-06-06 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2

[PATCH 2/2] xen/x86: address violations of Rule 11.3

2025-06-23 Thread victorm.lira
From: Nicola Vetrini Use {get,put}_unaligned_t to ensure that reads and writes are safe to perform even on potentially misaligned pointers. Signed-off-by: Nicola Vetrini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall C

[PATCH 1/2] xen/arm: address violations of Rule 11.3

2025-06-23 Thread victorm.lira
From: Nicola Vetrini Use {get,put}_unaligned_t to ensure that reads and writes are safe to perform even on potentially misaligned pointers. Signed-off-by: Nicola Vetrini Signed-off-by: Victor Lira --- Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Jan Beulich Cc: Julien Grall C