Re: [XEN PATCH v1 2/3] ocaml/libs: Fill build failure due to unused variable in ocaml macro

2024-10-18 Thread Javi Merino
On Thu, Oct 17, 2024 at 06:47:44PM +0100, Andrew Cooper wrote: > On 17/10/2024 5:20 pm, Javi Merino wrote: > > On Fedora 40, the build fails with: > > > > gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall > > -Wstrict-prototypes -Wno-unused-but-set-variable

Re: [XEN PATCH v1 4/6] CI: Refresh the Debian 12 arm32 cross compile container

2024-10-24 Thread Javi Merino
On Thu, Oct 24, 2024 at 11:51:16AM +, Anthony PERARD wrote: > On Thu, Oct 24, 2024 at 11:04:19AM +0100, Javi Merino wrote: > > diff --git a/automation/build/debian/12-arm64v8-arm32-gcc.dockerfile > > b/automation/build/debian/12-arm64v8-arm32-gcc.dockerfile > > new file

[XEN PATCH v1 0/6] automation: Refresh the remaining Debian containers

2024-10-24 Thread Javi Merino
/-/pipelines/1509304440 [0] https://lore.kernel.org/xen-devel/cover.1729170005.git.javi.mer...@cloud.com/T/#t Javi Merino (6): CI: Refresh the Debian 12 x86_64 container CI: Refresh the Debian 12 x86_32 container CI: Refresh the Debian 12 arm64 container CI: Refresh the Debian 12 arm32

[XEN PATCH v1 3/6] CI: Refresh the Debian 12 arm64 container

2024-10-24 Thread Javi Merino
: Javi Merino --- automation/build/debian/12-arm64v8.dockerfile | 68 +++ .../build/debian/bookworm-arm64v8.dockerfile | 55 --- automation/gitlab-ci/build.yaml | 8 +-- automation/gitlab-ci/test.yaml| 4 +- automation/scripts

[XEN PATCH v1 4/6] CI: Refresh the Debian 12 arm32 cross compile container

2024-10-24 Thread Javi Merino
Rework the container to run as non-root, use heredocs for readability and use apt-get --no-install-recommends to keep the size down. Rename the CI jobs to debian-12-arm32- to follow the naming scheme of all the other CI jobs. Signed-off-by: Javi Merino --- .../debian/12-arm64v8-arm32

Re: [XEN PATCH v1 2/6] CI: Refresh the Debian 12 x86_32 container

2024-10-24 Thread Javi Merino
On Thu, Oct 24, 2024 at 11:04:17AM +0100, Javi Merino wrote: > Rework the container to be non-root, use heredocs for readability, and > use apt-get --no-install-recommends to keep the size down. Rename the > job to x86_32, to be consistent with XEN_TARGET_ARCH and the > naming schem

Re: [XEN PATCH v1 1/6] CI: Refresh the Debian 12 x86_64 container

2024-10-24 Thread Javi Merino
On Thu, Oct 24, 2024 at 03:04:10PM +0100, Andrew Cooper wrote: > On 24/10/2024 11:04 am, Javi Merino wrote: > > Rework the container to use heredocs for readability, and use > > apt-get --no-install-recommends to keep the size down. > > > > This reduces the size of t

Re: [XEN PATCH v1 6/6] CI: Run the builds and tests that use the Debian 12 containers as a normal user

2024-10-29 Thread Javi Merino
Hi Stefano, On Thu, Oct 24, 2024 at 04:47:28PM -0700, Stefano Stabellini wrote: > On Thu, 24 Oct 2024, Javi Merino wrote: > > Use FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR so that GitLab CI clones xen > > using the user in the image, instead of as root[0]. > > > > In q

Re: [XEN PATCH v1 1/6] CI: Refresh the Debian 12 x86_64 container

2024-11-04 Thread Javi Merino
On Fri, Oct 25, 2024 at 03:46:35PM +0100, Andrew Cooper wrote: > On 24/10/2024 4:10 pm, Javi Merino wrote: > > On Thu, Oct 24, 2024 at 03:04:10PM +0100, Andrew Cooper wrote: > >> On 24/10/2024 11:04 am, Javi Merino wrote: > >>> + > >>> +apt-get

Re: [XEN PATCH v1 3/6] CI: Refresh the Debian 12 arm64 container

2024-11-04 Thread Javi Merino
On Thu, Oct 24, 2024 at 04:03:56PM -0700, Stefano Stabellini wrote: > On Thu, 24 Oct 2024, Javi Merino wrote: > > Rework the container to use heredocs for readability and use apt-get > > --no-install-recommends to keep the size down. Rename the job to > > debian-12-arm64-*

[XEN PATCH v2 6/6] CI: Don't use -y with apt-get update

2024-11-06 Thread Javi Merino
apt-get update refreshes the package lists. -y doesn't do anything here. It is needed for "apt-get install" or "apt-get upgrade" but not for apt-get update. Drop it. Signed-off-by: Javi Merino --- automation/build/debian/11-ppc64le.dockerfile| 2 +- automatio

[XEN PATCH v2 2/6] CI: Refresh the Debian 12 x86_32 container

2024-11-06 Thread Javi Merino
dependencies for building QEMU, as we don't do it since e305256e69b1 ("CI: Stop building QEMU in general"). Remove build dependencies for the documentation as we don't have to build it for every single arch. This reduces the size of the container from 2.22GB to 1.32Gb. Signed

[XEN PATCH v1 6/6] CI: Run the builds and tests that use the Debian 12 containers as a normal user

2024-10-24 Thread Javi Merino
/1736 Signed-off-by: Javi Merino --- Regarding building the rootfs, I have chosen to use a fakeroot subshell for the entire process. automation/scripts/qubes-x86-64.sh takes a different approach, it just uses fakeroot for the tar/cpio commands. I prefer to do it this way but I am happy to be

[XEN PATCH v1 2/6] CI: Refresh the Debian 12 x86_32 container

2024-10-24 Thread Javi Merino
dependencies for building QEMU, as we don't do it since e305256e69b1 ("CI: Stop building QEMU in general"). Remove build dependencies for the documentation as we don't have to build it for every single arch. This reduces the size of the container from 2.22GB to 1.32Gb. Signed

[XEN PATCH v1 5/6] CI: Refresh the Debian 12 cppcheck container

2024-10-24 Thread Javi Merino
size of the container is reduced from 882MB to 782MB. Signed-off-by: Javi Merino --- I tried updating cppcheck to the latest upstream version (2.15.0) but it reports misra errors like: xen/common/sched/cpupool.c(0,0):internalError:error:Bailing out from analysis: Checking file failed

[XEN PATCH v1 1/6] CI: Refresh the Debian 12 x86_64 container

2024-10-24 Thread Javi Merino
Rework the container to use heredocs for readability, and use apt-get --no-install-recommends to keep the size down. This reduces the size of the (uncompressed) container from 3.44GB to 1.67GB. Signed-off-by: Javi Merino --- automation/build/debian/12-x86_64.dockerfile | 68

[XEN PATCH v1 2/3] ocaml/libs: Fill build failure due to unused variable in ocaml macro

2024-10-17 Thread Javi Merino
uct caml__roots_block *caml__frame = *caml_local_roots_ptr We can't modify the macro. Mark the xsd_glue_failwith() function with ignore "-Wunused-variable" to prevent gcc from failing the build due to the unused variable. Fixes: a6576011a4d2 ("ocaml/libs: Implement a dynamically-loaded plugin fo

[XEN PATCH v1 1/3] automation: Fix URL to the gitlab container registry documentation

2024-10-17 Thread Javi Merino
The gitlab documentation is now at https://docs.gitlab.com/ee/administration/packages/container_registry.html Signed-off-by: Javi Merino --- automation/build/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/build/README.md b/automation/build/README.md

[XEN PATCH v1 3/3] CI: Refresh and upgrade the Fedora container

2024-10-17 Thread Javi Merino
From: Andrew Cooper Fedora 29 is long out of date. Move forward 5 years to Fedora 40. Include all the usual improvements. Rework the container to be non-root, use heredocs for legibility, and switch to the new naming scheme. Signed-off-by: Andrew Cooper Signed-off-by: Javi Merino

[XEN PATCH v1 0/3] CI: Upgrade the Fedora container and fix build failure

2024-10-17 Thread Javi Merino
est approach. Ideas welcome. Andrew Cooper (1): CI: Refresh and upgrade the Fedora container Javi Merino (2): automation: Fix URL to the gitlab container registry documentation ocaml/libs: Fill build failure due to unused variable in ocaml macro automation/build/README.md

[XEN PATCH v2 1/6] CI: Refresh the Debian 12 x86_64 container

2024-11-06 Thread Javi Merino
. Signed-off-by: Javi Merino --- Changes in dependencies: $ diff -u <(git show origin/staging:automation/build/debian/bookworm.dockerfile | awk '/&&/{f=0};f;/apt-get \-\-quiet/{f=1};' | perl -ne 's/ \\$//;s/^ +//; /^#/ or print' | sort) <(awk '/^ +\)/{f=0};f;/

[XEN PATCH v2 5/6] CI: Refresh the Debian 12 cppcheck container

2024-11-06 Thread Javi Merino
size of the container is reduced from 882MB to 782MB. Signed-off-by: Javi Merino --- .../debian/12-arm64v8-cppcheck.dockerfile | 79 +++ .../build/debian/bookworm-cppcheck.dockerfile | 54 - automation/gitlab-ci/build.yaml | 12 +-- automation

[XEN PATCH v2 4/6] CI: Refresh the Debian 12 arm32 cross compile container

2024-11-06 Thread Javi Merino
Rework the container to user heredocs for readability and use apt-get --no-install-recommends to keep the size down. Rename the CI jobs to debian-12-arm32- to follow the naming scheme of all the other CI jobs. Signed-off-by: Javi Merino --- .../debian/12-arm64v8-arm32-gcc.dockerfile| 28

[XEN PATCH v2 3/6] CI: Refresh the Debian 12 arm64 container

2024-11-06 Thread Javi Merino
is left running the builds and tests as root to avoid breaking the xilinx runners. Signed-off-by: Javi Merino --- automation/build/debian/12-arm64v8.dockerfile | 68 +++ .../build/debian/bookworm-arm64v8.dockerfile | 55 --- automation/gitlab-ci/build.yaml

[XEN PATCH v2 0/6] automation: Refresh the remaining Debian containers

2024-11-06 Thread Javi Merino
/xen-devel/cover.1729760501.git.javi.mer...@cloud.com Javi Merino (6): CI: Refresh the Debian 12 x86_64 container CI: Refresh the Debian 12 x86_32 container CI: Refresh the Debian 12 arm64 container CI: Refresh the Debian 12 arm32 cross compile container CI: Refresh the Debian 12 cppche

[TEST_ARTIFACTS PATCH v1] scripts: add lzo to the x86_64 alpine rootfs

2024-11-07 Thread Javi Merino
: lzo1x_decompress_safe: symbol not found * Execution of "/etc/local.d/xen.start" failed. Add lzo to the initrd that becomes the rootfs to install liblzo2.so.2 . Signed-off-by: Javi Merino --- Tested in https://gitlab.com/xen-project/people/javimerino/test-artifacts/-/jobs/8295092924 scri

Re: [PATCH] x86/APIC: Remove workaround Pentium 3AP APIC_ESR erratum

2024-11-28 Thread Javi Merino
On Wed, Nov 27, 2024 at 05:45:29PM +, Andrew Cooper wrote: > On 27/11/2024 10:03 am, Javi Merino wrote: > > On Tue, Nov 26, 2024 at 08:58:59PM +, Andrew Cooper wrote: > >> The SDM instructs software to write 0 to ESR prior to reading it. However, > >> due to

[XEN PATCH v1] x86/APIC: Read Error Status Register correctly

2024-11-26 Thread Javi Merino
w the Intel manual. Signed-off-by: Javi Merino --- xen/arch/x86/apic.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index bb86a1c161b3..b4f542d25918 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1385,20 +13

Re: [PATCH] x86/APIC: Remove workaround Pentium 3AP APIC_ESR erratum

2024-11-27 Thread Javi Merino
s to remove > some useless reads of APIC_LVR. This in turn removes the external callers of > get_maxlvt(), so make it local to apic.c > > No practical change. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Javi Merino > >

[XEN PATCH v1] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-08-22 Thread Javi Merino
haracter at the end. Despite the documentation of libxl_xen_console_read_line(), line_r is not nul-terminated if 16384 characters were copied to the buffer. Fix this by making count one less that the size of the allocated buffer so that the last byte is always null. Reported-by: Edwin Török Signe

Re: [XEN PATCH v1] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-08-23 Thread Javi Merino
On Fri, Aug 23, 2024 at 10:14:32AM GMT, Anthony PERARD wrote: > On Fri, Aug 23, 2024 at 08:31:50AM +0200, Jan Beulich wrote: > > On 22.08.2024 15:13, Javi Merino wrote: > > > When built with ASAN, "xl dmesg" crashes in the "printf("%s", line)"

Re: [XEN PATCH v1] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-08-23 Thread Javi Merino
On Fri, Aug 23, 2024 at 10:34:05AM GMT, Andrew Cooper wrote: > On 22/08/2024 2:13 pm, Javi Merino wrote: > > When built with ASAN, "xl dmesg" crashes in the "printf("%s", line)" > > call in main_dmesg(). ASAN reports a heap buffer overflow: an >

[XEN PATCH v2 0/3] libxl: Fixes for libxl_xenconsole_readline()

2024-08-23 Thread Javi Merino
cal variable in libxl_xen_console_read_line() - Improve the documentation of libxl_xen_console_read_line() [0] https://lore.kernel.org/xen-devel/ad7c89bbae34155566ae7c9ca2cb501f21c7d585.1724330921.git.javi.mer...@cloud.com/ Javi Merino (3): libxl: Fix nul-termination of the return value

[XEN PATCH v2 2/3] libxl: Remove unnecessary buffer zeroing and zalloc()

2024-08-23 Thread Javi Merino
leak buf in libxl_xen_console_read_start error handling, 2013-12-03). The comment in that commit message says that the intent of the commit was to change malloc+memset to zalloc(), but only for the libxl_xen_console_reader struct, not for the buffer. Signed-off-by: Javi Merino --- tools/libs/

[XEN PATCH v2 1/3] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-08-23 Thread Javi Merino
_xen_console_read_line(), make it a local variable there instead of part of the libxl__xen_console_reader struct. Fixes: 4024bae739cc ("xl: Add subcommand 'xl dmesg'") Reported-by: Edwin Török Signed-off-by: Javi Merino --- tools/libs/light/libxl_console.c | 14 ++--

[XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line()

2024-08-23 Thread Javi Merino
Despite its name, libxl_xen_console_read_line() does not read a line, it fills the buffer with as many characters as fit. Update the documentation to reflect the real behaviour of the function. Rename line_r to avoid confusion since it is a pointer to an array of characters. Signed-off-by: Javi

Re: [XEN PATCH v2 1/3] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
On Tue, Aug 27, 2024 at 03:20:10PM GMT, Anthony PERARD wrote: > On Fri, Aug 23, 2024 at 06:05:03PM +0100, Javi Merino wrote: > > diff --git a/tools/libs/light/libxl_console.c > > b/tools/libs/light/libxl_console.c > > index a563c9d3c7f9..012fd996fba9 100644 >

Re: [XEN PATCH v2 1/3] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
On Mon, Sep 02, 2024 at 09:50:28AM GMT, Roger Pau Monné wrote: > On Fri, Aug 30, 2024 at 08:22:29PM +0100, Andrew Cooper wrote: > > On 29/08/2024 4:53 pm, Roger Pau Monné wrote: > > > On Fri, Aug 23, 2024 at 06:05:03PM +0100, Javi Merino wrote: > > >> When built wi

Re: [XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
On Mon, Sep 02, 2024 at 11:14:11AM GMT, Alejandro Vallejo wrote: > On Fri Aug 23, 2024 at 6:05 PM BST, Javi Merino wrote: > > Despite its name, libxl_xen_console_read_line() does not read a line, > > it fills the buffer with as many characters as fit. Update the > > documen

[XEN PATCH v3 0/3] libxl: Fixes for libxl_xenconsole_readline()

2024-09-02 Thread Javi Merino
.@cloud.com/ Javi Merino (3): libxl: Fix nul-termination of the return value of libxl_xen_console_read_line() libxl: Remove unnecessary buffer zeroing and zalloc() libxl: Update the documentation of libxl_xen_console_read_line() tools/include/libxl.h | 2 +- tools

[XEN PATCH v3 2/3] libxl: Remove unnecessary buffer zeroing and zalloc()

2024-09-02 Thread Javi Merino
leak buf in libxl_xen_console_read_start error handling, 2013-12-03). The comment in that commit message says that the intent of the commit was to change malloc+memset to zalloc(), but only for the libxl_xen_console_reader struct, not for the buffer. Signed-off-by: Javi Merino --- tools/libs/

[XEN PATCH v3 1/3] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
_xen_console_read_line(), make it a local variable there instead of part of the libxl__xen_console_reader struct. Fixes: 4024bae739cc ("xl: Add subcommand 'xl dmesg'") Reported-by: Edwin Török Reviewed-by: Anthony PERARD Signed-off-by: Javi Merino --- tools/libs/light/libxl_

[XEN PATCH v3 3/3] libxl: Update the documentation of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
Despite its name, libxl_xen_console_read_line() does not read a line, it fills the buffer with as many characters as fit. Update the documentation to reflect the real behaviour of the function. Rename line_r to avoid confusion since it is a pointer to an array of characters. Signed-off-by: Javi

Re: [XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
On Tue, Aug 27, 2024 at 03:26:09PM GMT, Anthony PERARD wrote: > On Fri, Aug 23, 2024 at 06:05:05PM +0100, Javi Merino wrote: > > Despite its name, libxl_xen_console_read_line() does not read a line, > > it fills the buffer with as many characters as fit. Update the > > doc

Re: [XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line()

2024-09-02 Thread Javi Merino
On Fri, Aug 23, 2024 at 06:31:50PM GMT, Andrew Cooper wrote: > On 23/08/2024 6:05 pm, Javi Merino wrote: > > diff --git a/tools/libs/light/libxl_console.c > > b/tools/libs/light/libxl_console.c > > index f42f6a51ee6f..652897e4ef6d 100644 > > --- a/tools/libs/light/libx

[XEN PATCH v1] tools/python: Add python3 compatibility

2023-10-10 Thread Javi Merino
Most of the work for python3 compatibility was done in 1430c5a8cad4 (tools/python: Python 3 compatibility, 2019-12-18). This just adds a few builtins needed for python3. Resolves: xen-project/xen#156 Signed-off-by: Javi Merino --- I haven't tested it. R

Re: [XEN PATCH v1] tools/python: Add python3 compatibility

2023-10-12 Thread Javi Merino
On Tue, Oct 10, 2023 at 05:27:03PM +0200, Marek Marczykowski-Górecki wrote: > On Tue, Oct 10, 2023 at 03:18:45PM +0100, Javi Merino wrote: > > Most of the work for python3 compatibility was done in > > 1430c5a8cad4 (tools/python: Python 3 compatibility, 2019-12-18). This >

Re: [XEN PATCH v1] tools/python: Add python3 compatibility

2023-10-12 Thread Javi Merino
On Wed, Oct 11, 2023 at 12:34:27AM +0800, Andrew Cooper wrote: > On 10/10/2023 10:18 pm, Javi Merino wrote: > > Most of the work for python3 compatibility was done in > > 1430c5a8cad4 (tools/python: Python 3 compatibility, 2019-12-18). This > > just adds a few builti

[PATCH for-4.18 v1] xen/common: Don't dereference overlay_node after checking that it is NULL

2024-01-09 Thread Javi Merino
/linux.git/tree/scripts/coccinelle/null/deref_null.cocci?id=1f874787ed9a2d78ed59cb21d0d90ac0178eceb0 Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities") Signed-off-by: Javi Merino --- CC: Vikram Garhwal Vikram, I didn't know what to put in the error

Re: [PATCH for-4.18 v1] xen/common: Don't dereference overlay_node after checking that it is NULL

2024-01-09 Thread Javi Merino
n that's not what I meant. Sorry for that. > On 09/01/2024 14:19, Javi Merino wrote: > > In remove_nodes(), overlay_node is dereferenced when printing the > > error message even though it is known to be NULLL. Fix the error > > Typo: s/NULLL/NULL/ > > This can

Re: [PATCH for-4.18 v1] xen/common: Don't dereference overlay_node after checking that it is NULL

2024-01-09 Thread Javi Merino
On Tue, Jan 09, 2024 at 03:50:38PM +, Julien Grall wrote: > Hi Javi, > > On 09/01/2024 15:42, Javi Merino wrote: > > On Tue, Jan 09, 2024 at 03:31:55PM +, Julien Grall wrote: > > > Hi Javi, > > > > > > Title: Any reason this is titled for-4.18?

Re: [PATCH for-4.18 v1] xen/common: Don't dereference overlay_node after checking that it is NULL

2024-01-11 Thread Javi Merino
On Wed, Jan 10, 2024 at 12:25:57PM -0800, Vikram Garhwal wrote: > Hi Javi, > Thank you for spotting and fixing this. Hi Vikram, > On Tue, Jan 09, 2024 at 03:31:55PM +, Julien Grall wrote: > > On 09/01/2024 14:19, Javi Merino wrote: > > > In remove_nodes(), overlay_n

[PATCH v2] xen/common: Don't dereference overlay_node after checking that it is NULL

2024-01-11 Thread Javi Merino
/git/torvalds/linux.git/tree/scripts/coccinelle/null/deref_null.cocci?id=1f874787ed9a2d78ed59cb21d0d90ac0178eceb0 Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities") Signed-off-by: Javi Merino --- CC: Vikram Garhwal CC: Julien Grall xen/common/dt-ove

[PATCH] coverage: update gcov info for newer versions of gcc

2023-09-02 Thread Javi Merino
Shamelessly copy changes to gcov_info structures from linux so that we can capture coverage for xen built with newer compilers. Signed-off-by: Javi Merino --- This doesn't solve all the problems with coverage as Xen still crashes when trying to reset/read coverage[0]. Still, it's a st

[PATCH] tools/misc/xencov_split: Add python 3 compatibility

2023-09-02 Thread Javi Merino
Closes #154 Signed-off-by: Javi Merino --- Generating coverage data is a bit broken at the moment. Depending on the compiler you are using, you would need "coverage: update gcov info for newer versions of gcc" (Message-Id: 20230902151351.10325-1-javi.mer...@cloud.com) which I just s

Re: [PATCH] tools/misc/xencov_split: Add python 3 compatibility

2023-09-05 Thread Javi Merino
On Mon, Sep 04, 2023 at 08:51:31AM +0200, Jan Beulich wrote: > On 02.09.2023 18:21, Javi Merino wrote: > > Closes #154 > > > > Signed-off-by: Javi Merino > > The title isn't really in line with ... > > > --- a/tools/misc/xencov_split > >

[PATCH v2] tools/misc/xencov_split: Add python 3 compatibility

2023-09-05 Thread Javi Merino
Closes #154 Signed-off-by: Javi Merino --- Changes since v1: - Don't touch the shebang. tools/misc/xencov_split | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/misc/xencov_split b/tools/misc/xencov_split index e4f68ebb6e..a921e8ef44 100755

[PATCH v1] tools/xentrace/xentrace_format: Add python 3 compatibility

2023-09-06 Thread Javi Merino
Closes issue #155 Signed-off-by: Javi Merino --- Tested using the format file in tools/xentrace/formats. With this patch, both python2 and python3 produce the same output. tools/xentrace/xentrace_format | 63 +++--- 1 file changed, 36 insertions(+), 27 deletions

Re: [PATCH] coverage: update gcov info for newer versions of gcc

2023-09-07 Thread Javi Merino
On Thu, Sep 07, 2023 at 04:41:59PM +0200, Jan Beulich wrote: > On 02.09.2023 17:11, Javi Merino wrote: > > --- a/xen/common/coverage/Makefile > > +++ b/xen/common/coverage/Makefile > > @@ -5,7 +5,9 @@ obj-y += $(call cc-ifversion,-lt,0407, \ > > gcc_3_4.o, $

[XEN PATCH v2 0/2] update gcov info for newer versions of gcc

2023-09-08 Thread Javi Merino
.0 - gcc 11.4.0 - gcc 12.3.0 Javi Merino (2): coverage: simplify the logic of choosing the number of gcov counters depending on the gcc version coverage: update gcov info for newer versions of gcc xen/common/coverage/Makefile | 6 +- xen/common/coverage/gcc_

[XEN PATCH v2 2/2] coverage: update gcov info for newer versions of gcc

2023-09-08 Thread Javi Merino
Shamelessly copy changes to gcov_info structures from linux so that we can capture coverage for xen built with newer compilers. Signed-off-by: Javi Merino --- xen/common/coverage/gcc_4_7.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/xen/common

[XEN PATCH v2 1/2] coverage: simplify the logic of choosing the number of gcov counters depending on the gcc version

2023-09-08 Thread Javi Merino
boilerplate and keep the logic of choosing the GCOV_COUNTER in gcc_4_7.c. Signed-off-by: Javi Merino --- xen/common/coverage/Makefile | 6 +- xen/common/coverage/gcc_4_7.c | 17 + xen/common/coverage/gcc_4_9.c | 33 - xen/common/coverage/gcc_5.c

Re: [XEN PATCH v2 1/2] coverage: simplify the logic of choosing the number of gcov counters depending on the gcc version

2023-09-11 Thread Javi Merino
On Mon, Sep 11, 2023 at 09:54:53AM +0200, Jan Beulich wrote: > On 08.09.2023 18:20, Javi Merino wrote: > > The current structure of choosing the correct file based on the > > compiler version makes us make 33 line files just to define a > > constant. The changes after gcc

Re: [XEN PATCH v2 2/2] coverage: update gcov info for newer versions of gcc

2023-09-11 Thread Javi Merino
On Mon, Sep 11, 2023 at 10:00:14AM +0200, Jan Beulich wrote: > On 08.09.2023 18:20, Javi Merino wrote: > > Shamelessly copy changes to gcov_info structures from linux so that we > > can capture coverage for xen built with newer compilers. > > > > Signed-off-by: Ja

Re: [PATCH] tools/misc/xencov_split: Add python 3 compatibility

2023-09-11 Thread Javi Merino
On Mon, Sep 11, 2023 at 11:40:59AM +0100, Anthony PERARD wrote: > On Sat, Sep 02, 2023 at 05:21:08PM +0100, Javi Merino wrote: > > diff --git a/tools/misc/xencov_split b/tools/misc/xencov_split > > index e4f68ebb6e..8f1271bfe7 100755 > > --- a/tools/misc/xencov_split

Re: [PATCH v1] tools/xentrace/xentrace_format: Add python 3 compatibility

2023-09-11 Thread Javi Merino
On Mon, Sep 11, 2023 at 11:52:43AM +0100, Andrew Cooper wrote: > On 06/09/2023 2:14 pm, Javi Merino wrote: > > diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format > > index 5ff85ae2e8..166ebae325 100644 > > --- a/tools/xentrace/xentrace_format >

Re: [PATCH v1] tools/xentrace/xentrace_format: Add python 3 compatibility

2023-09-11 Thread Javi Merino
On Mon, Sep 11, 2023 at 02:45:56PM +0100, Andrew Cooper wrote: > On 11/09/2023 2:44 pm, Javi Merino wrote: > > On Mon, Sep 11, 2023 at 11:52:43AM +0100, Andrew Cooper wrote: > >> On 06/09/2023 2:14 pm, Javi Merino wrote: > >>> diff --git a/tools/xentrace/xentrace_

[XEN PATCH v2] tools/xentrace/xentrace_format: Add python 3 compatibility

2023-09-11 Thread Javi Merino
Resolves: xen-project/xen#155 Signed-off-by: Javi Merino --- Changes since v1: - Remove unneeded import from past.utils to avoid depending on python3's future module. Tested using the format file in tools/xentrace/formats. With this patch, both python 2.7.18.6 and python 3.10.12 pr

[XEN PATCH v2 0/5] python: Use setuptools instead of the deprecated distutils

2023-09-11 Thread Javi Merino
ng back to distutils if setuptools is not installed - Drop the commit about raising the baseline requirement for python, as we keep supporting python2 Javi Merino (2): automation: add python3's setuptools to containers README: update to remove old note about the build system's py

[XEN PATCH v2 1/5] automation: add python3's setuptools to containers

2023-09-11 Thread Javi Merino
archive repositories. Signed-off-by: Javi Merino --- automation/build/alpine/3.18.dockerfile| 1 + automation/build/archlinux/current.dockerfile | 1 + automation/build/centos/7.dockerfile | 3 ++- automation/build/debian/bookworm.dockerfile| 1 + automation/build

[XEN PATCH v2 2/5] tools: convert setup.py to use setuptools

2023-09-11 Thread Javi Merino
From: Marek Marczykowski-Górecki Python distutils is deprecated and is going to be removed in Python 3.12. Migrate to setuptools. Setuptools in Python 3.11 complains: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. Keep using setup

[XEN PATCH v2 3/5] tools: don't use distutils in configure nor Makefile

2023-09-11 Thread Javi Merino
From: Marek Marczykowski-Górecki Python distutils is deprecated and is going to be removed in Python 3.12. The distutils.sysconfig is available as sysconfig module in stdlib since Python 3.2, so use that directly. Signed-off-by: Marek Marczykowski-Górecki --- m4/python_devel.m4 | 28

[XEN PATCH v2 5/5] README: update to remove old note about the build system's python expectation

2023-09-11 Thread Javi Merino
The configure script tests for the availability of python3, python and python2 in that order and sets PYTHON to the first one found in path. You don't need to have a symlink to python. Signed-off-by: Javi Merino --- README | 7 --- 1 file changed, 7 deletions(-) diff --git a/REA

Re: [XEN PATCH v2 0/5] python: Use setuptools instead of the deprecated distutils

2023-09-18 Thread Javi Merino
On Tue, Sep 12, 2023 at 08:49:04AM +0100, Andrew Cooper wrote: > On 11/09/2023 5:50 pm, Javi Merino wrote: > > This series picks up Marek's v1 from > > https://lore.kernel.org/xen-devel/20230316171634.320626-1-marma...@invisiblethingslab.com/ > > Changes since v1: > &

Re: [XEN PATCH v2 5/5] README: update to remove old note about the build system's python expectation

2023-09-18 Thread Javi Merino
On Tue, Sep 12, 2023 at 01:25:06PM +0100, Andrew Cooper wrote: > On 11/09/2023 5:51 pm, Javi Merino wrote: > > The configure script tests for the availability of python3, python and > > python2 in that order and sets PYTHON to the first one found in path. > > You don't

Re: [XEN PATCH v2 1/5] automation: add python3's setuptools to containers

2023-09-18 Thread Javi Merino
On Mon, Sep 11, 2023 at 06:15:03PM -0700, Stefano Stabellini wrote: > On Mon, 11 Sep 2023, Javi Merino wrote: > > In preparation of dropping python distutils and moving to setuptools, > > add the python3 setuptools module to the containers that need it. > > > > The cen

Re: [XEN PATCH v2 1/5] automation: add python3's setuptools to containers

2023-09-18 Thread Javi Merino
On Tue, Sep 12, 2023 at 11:18:42AM +0100, Andrew Cooper wrote: > On 11/09/2023 5:51 pm, Javi Merino wrote: > > In preparation of dropping python distutils and moving to setuptools, > > add the python3 setuptools module to the containers that need it. > > > > The cen

Re: [XEN PATCH v2 2/5] tools: convert setup.py to use setuptools

2023-09-18 Thread Javi Merino
On Tue, Sep 12, 2023 at 11:22:56AM +0100, Andrew Cooper wrote: > On 11/09/2023 5:51 pm, Javi Merino wrote: > > From: Marek Marczykowski-Górecki > > > > Python distutils is deprecated and is going to be removed in Python > > 3.12. Migrate to setuptools. > > Se

Re: [XEN PATCH v2 3/5] tools: don't use distutils in configure nor Makefile

2023-09-18 Thread Javi Merino
On Tue, Sep 12, 2023 at 01:17:21PM +0100, Andrew Cooper wrote: > On 12/09/2023 12:50 pm, Marek Marczykowski-Górecki wrote: > > On Tue, Sep 12, 2023 at 11:38:04AM +0100, Andrew Cooper wrote: > >> On 11/09/2023 5:51 pm, Javi Merino wrote: > >>> From: Marek Marczykows

[XEN PATCH v3 0/4] python: Support setuptools

2023-09-18 Thread Javi Merino
.320626-1-marma...@invisiblethingslab.com/ v2: https://lore.kernel.org/xen-devel/cover.1694450145.git.javi.mer...@cloud.com/ Javi Merino (2): automation: add python3's setuptools to containers README: update to remove old note about the build system's python expectation Mare

[XEN PATCH v3 4/4] README: remove old note about the build system's python expectation

2023-09-18 Thread Javi Merino
e the outdated note from the README. Signed-off-by: Javi Merino --- README | 7 --- 1 file changed, 7 deletions(-) diff --git a/README b/README index f75fa536d9..a491c8dce5 100644 --- a/README +++ b/README @@ -184,13 +184,6 @@ Various tools, such as pygrub, have the following runtime depende

[XEN PATCH v3 2/4] tools: convert setup.py to use setuptools if available

2023-09-18 Thread Javi Merino
using setup.py anyway to build the C extension. Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Javi Merino --- tools/pygrub/setup.py | 7 +-- tools/python/setup.py | 7 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/pygrub/setup.py b/tools/pygrub

[XEN PATCH v3 3/4] tools: don't use distutils in configure nor Makefile

2023-09-18 Thread Javi Merino
. Regenerate configure after the m4/python_devel.m4 change. Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Javi Merino --- README | 4 ++-- m4/python_devel.m4 | 28 +++--- tools/configure | 52

[XEN PATCH v3 1/4] automation: add python3's setuptools to containers

2023-09-18 Thread Javi Merino
installations that don't have it. Centos 7 in particular is kept with python2 only. Signed-off-by: Javi Merino --- automation/build/alpine/3.18-arm64v8.dockerfile | 1 + automation/build/alpine/3.18.dockerfile | 1 + automation/build/archlinux/current.dockerfile| 1 + autom

Re: [XEN PATCH v3 3/4] tools: don't use distutils in configure nor Makefile

2023-09-18 Thread Javi Merino
On Tue, Sep 19, 2023 at 07:30:28AM +0100, Javi Merino wrote: > From: Marek Marczykowski-Górecki > > Python distutils is deprecated and is going to be removed in Python > 3.12. distutils.sysconfig is available as the sysconfig module in > stdlib since Python 2.7 and Python 3