Re: [PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Alex Bennée
Manolo de Medici writes: > I agree with you, I mentioned that this was the "minimal effort" > patchset to get qemu compilable. > > On Wed, Jan 17, 2024 at 6:35 PM Peter Maydell > wrote: > [...] >> should be guarded by a suitable check that means we don't >> try to build it on hosts that don't h

Re: [PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
I agree with you, I mentioned that this was the "minimal effort" patchset to get qemu compilable. On Wed, Jan 17, 2024 at 6:35 PM Peter Maydell wrote: [...] > should be guarded by a suitable check that means we don't > try to build it on hosts that don't have the host-specific > functions/whateve

Re: [PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Peter Maydell
On Wed, 17 Jan 2024 at 12:59, Manolo de Medici wrote: > > tests/qtest/tpm-* compilation is not disabled by disable-tpm, > for this reason compilation fails on systems that doesn't > support the linux/bsd TPM api. Fix this by allowing tests > to be disabled. This isn't the right way to fix this. E

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
Ok Samuel, in the v2 of this patch series I will fix this bug in qemu.

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Samuel Thibault
Manolo de Medici, le mer. 17 janv. 2024 16:08:34 +0100, a ecrit: > Understood, but I cannot judge if it is a bug in qemu or it fixes > another host os, > since qemu doesn't target only glibc. Yes, but freebsd too uses ssize_t: https://man.freebsd.org/cgi/man.cgi?copy_file_range(2) glib mentions

Re: [PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
The current patch misses this bit. diff --git a/meson_options.txt b/meson_options.txt index 0a99a059ec..9a2acd6f83 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -305,6 +305,8 @@ option('libvduse', type: 'feature', value: 'auto', description: 'build VDUSE Library') option('vdus

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
Understood, but I cannot judge if it is a bug in qemu or it fixes another host os, since qemu doesn't target only glibc. In order to avoid breaking other hosts, I consider it more cautious to ignore the difference. In the long term the Hurd is going to implement copy_file_range

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Samuel Thibault
Hello, Manolo de Medici, le mer. 17 janv. 2024 15:47:09 +0100, a ecrit: > ../../../block/file-posix.c:2003:14: error: conflicting types for > 'copy_file_range'; have 'off_t(int, off_t *, int, off_t *, size_t, > unsigned int)' {aka 'long long int(int, long long int *, int, long > long int *, un

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
Hello Samuel, the presence of the qemu stub causes the following compilation error: FAILED: libblock.fa.p/block_file-posix.c.o cc -m32 -Ilibblock.fa.p -I. -I../../.. -Iqapi -Itrace -Iui -Iui/shader -Iblock -I/usr/include/glib-2.0 -I/usr/lib/i386-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Philippe Mathieu-Daudé
Hi Manolo, On 17/1/24 13:31, Manolo de Medici wrote: It's already defined as a stub on the GNU Hurd. Meson checks for this function and defines HAVE_COPY_FILE_RANGE if available, see in meson.build: config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_fi

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
Hello Philippe, thank you for the feedback, I've checked that. The problem is that the Hurd fails that test due to the following: #if defined __stub_copy_file_range || defined __stub___copy_file_range fail fail fail this function is not going to work #endifefines the stub _

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Samuel Thibault
Manolo de Medici, le mer. 17 janv. 2024 15:09:39 +0100, a ecrit: > Hello Philippe, > thank you for the feedback, I've checked that. The problem is that the > Hurd fails that test due to the following: > > #if defined __stub_copy_file_range || defined __stub___copy_file_range > fail

[PATCH 1/4] Include new arbitrary limits if not already defined

2024-01-17 Thread Manolo de Medici
qemu uses the PATH_MAX and IOV_MAX constants extensively in the code. Define these constants to sensible values ourselves if the system doesn't define them already. Signed-off-by: Manolo de Medici diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 9a405bed89..9fb6ac5c64 100644 --- a/

[PATCH 0/4] Port qemu to GNU/Hurd

2024-01-17 Thread Manolo de Medici
Recently, a testsuite for gnumach, the GNU/Hurd microkernel, was developed that uses qemu. Currently qemu cannot be compiled for the GNU/Hurd, as such, this testsuite is available only for GNU/Linux users. As such, porting qemu to GNU/Hurd became an urgent requirement. This patcheset represents th

[PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
tests/qtest/tpm-* compilation is not disabled by disable-tpm, for this reason compilation fails on systems that doesn't support the linux/bsd TPM api. Fix this by allowing tests to be disabled. Signed-off-by: Manolo de Medici --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
It's already defined as a stub on the GNU Hurd. Signed-off-by: Manolo de Medici diff --git a/block/file-posix.c b/block/file-posix.c index 35684f7e21..05426abb7d 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1999,7 +1999,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque

[PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
tests/qtest/tpm-* compilation is not disabled by disable-tpm, for this reason compilation fails on systems that doesn't support the linux/bsd TPM api. Fix this by allowing tests to be disabled. Signed-off-by: Manolo de Medici --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 4/4] Add the GNU/Hurd as a target host

2024-01-17 Thread Manolo de Medici
Signed-off-by: Manolo de Medici --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index c36ce1f7e2..d4648af96a 100755 --- a/configure +++ b/configure @@ -354,6 +354,8 @@ elif check_define __NetBSD__; then host_os=netbsd elif check_define __APPLE__; then