Re: [PATCH] target/arm: Use the max page size in a 2-stage ptw

2022-09-28 Thread Marc Zyngier
On Wed, 28 Sep 2022 05:34:53 +0100, Zenghui Yu wrote: > > [ Fix Marc's email address ] Ah, many thanks Zenghui! I was wondering whether my discussion with Richard had any result. As it turns out, it had an almost immediate result! > > On 2022/9/13 21:56, Richard Henderson wrote: > > We had

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 06:09:22PM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 27, 2022 at 11:44:56PM +0200, Paolo Bonzini wrote: > > I also second the idea of using avocado instead of pytest, by the way. snip > Problem is I don't think avocado is yet at the level where I can > ask random

Re: [PATCH v2 10/11] pytest: add pytest to the meson build system

2022-09-28 Thread Thomas Huth
On 27/09/2022 23.26, Michael S. Tsirkin wrote: On Tue, Sep 06, 2022 at 02:10:56PM +0100, Daniel P. Berrangé wrote: On Tue, Jul 12, 2022 at 12:22:10PM +0530, Ani Sinha wrote: On Mon, 11 Jul 2022, John Snow wrote: On Sun, Jul 10, 2022 at 1:01 PM Ani Sinha wrote: Integrate the pytest

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-28 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 03:10:54PM -0400, Stefan Hajnoczi wrote: > On Tue, 27 Sept 2022 at 15:04, Thomas Huth wrote: > > > > On 27/09/2022 20.47, Stefan Hajnoczi wrote: > > > On Tue, 27 Sept 2022 at 14:40, Thomas Huth wrote: > > >> > > >> On 27/09/2022 19.57, Daniel P. Berrangé wrote: > > >>> On

[PULL 09/37] tests/qtest: ide-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-14-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 17/37] tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng Some of the virtio-net-test test cases require socketpair() to do the test setup. Skip them for win32. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-29-bmeng...@gmail.com> Signed-off-by: Thomas Huth ---

[PULL 23/38] linux-user/hppa: Allow PROT_GROWSUP and PROT_GROWSDOWN in mprotect()

2022-09-28 Thread Laurent Vivier
From: Helge Deller The hppa platform uses an upwards-growing stack and required in Linux kernels < 5.18 an executable stack for signal processing. For that some executables and libraries are marked to have an executable stack, for which glibc uses the mprotect() syscall to mark the stack like

[PULL 12/37] tests/qtest: virtio-scsi-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-21-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 36/37] tests/qtest: boot-serial-test: Close the serial file before starting QEMU

2022-09-28 Thread Thomas Huth
From: Bin Meng This qtest executable created a serial chardev file to be passed to the QEMU executable. The serial file was created by g_file_open_tmp(), which internally opens the file with FILE_SHARE_WRITE security attribute on Windows. Based on [1], there is only one case that allows the

[PULL 38/38] linux-user: Add parameters of getrandom() syscall for strace

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220927093538.8954-2-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.list

[PULL 05/38] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls

2022-09-28 Thread Laurent Vivier
From: Helge Deller I noticed those were missing when running the glib2.0 testsuite. Add the syscalls including the strace output. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-4-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.c

[PULL 12/38] linux-user: Show timespec on strace for futex()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-11-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c

[PULL 13/38] linux-user: Provide MADV_* definitions

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich Provide MADV_* definitions using target_mman.h header, similar to what kernel does. Most architectures use the same values, with the exception of alpha and hppa. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id:

Re: [PATCH v4 35/54] tests/qtest: libqtest: Install signal handler via signal()

2022-09-28 Thread Thomas Huth
On 28/09/2022 11.57, Bin Meng wrote: On Wed, Sep 28, 2022 at 5:43 PM Thomas Huth wrote: On 27/09/2022 13.06, Bin Meng wrote: From: Bin Meng At present the codes uses sigaction() to install signal handler with a flag SA_RESETHAND. Such usage can be covered by the signal() API that is a

Re: [PATCH v7 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-28 Thread Markus Armbruster
Claudio Fontana writes: > if QEMU is configured with modules enabled, it is possible that the > load of an accelerator module will fail. > Abort in this case, relying on module_object_class_by_name to report > the specific load error if any. > > Signed-off-by: Claudio Fontana > Reviewed-by:

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Daniel P . Berrangé
On Wed, Sep 28, 2022 at 10:31:39AM +0200, Thomas Huth wrote: > On 27/09/2022 23.21, Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2022 at 04:45:09PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Sep 27, 2022 at 07:35:13PM +0530, Ani Sinha wrote: > ... > > > > Alright, .gitlab-ci.yml is produced

Re: [PATCH v9 03/10] s390x/cpu topology: reporting the CPU topology to the guest

2022-09-28 Thread Pierre Morel
On 9/6/22 10:17, Nico Boehr wrote: Quoting Pierre Morel (2022-09-02 09:55:24) The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. I like this. It is so much

Re: [PATCH v4 31/54] accel/qtest: Implement a portable qtest accelerator

2022-09-28 Thread Thomas Huth
On 27/09/2022 13.06, Bin Meng wrote: From: Xuzhou Cheng Currently signal SIGIPI [=SIGUSR1] is used to kick the dummy CPU when qtest accelerator is used. However SIGUSR1 is unsupported on Windows. To support Windows, we add a QemuSemaphore CPUState::sem to kick the dummy CPU instead. As a

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 10:31:39AM +0200, Thomas Huth wrote: > On 27/09/2022 23.21, Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2022 at 04:45:09PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Sep 27, 2022 at 07:35:13PM +0530, Ani Sinha wrote: > ... > > > > Alright, .gitlab-ci.yml is produced

Re: [PATCH v9 03/10] s390x/cpu topology: reporting the CPU topology to the guest

2022-09-28 Thread Pierre Morel
On 9/7/22 12:26, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2.

[PULL 25/37] tests/qtest: ide-test: Open file in binary mode

2022-09-28 Thread Thomas Huth
From: Xuzhou Cheng By default Windows opens file in text mode, while a POSIX compliant implementation treats text files and binary files the same. The fopen() 'mode' string can include the letter 'b' to indicate binary mode shall be used. POSIX spec says the character 'b' shall have no effect,

[PULL 05/37] tests/qtest: cxl-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_dir_make_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-9-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 31/37] tests/x86: Move common code to function in device-plug-test

2022-09-28 Thread Thomas Huth
From: Michael Labiuk Move common code for device removing to function. Signed-off-by: Michael Labiuk Message-Id: <20220920104842.605530-2-michael.lab...@virtuozzo.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/device-plug-test.c | 42

[PULL 13/37] tests/qtest: libqtest: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng The qtest library was written to use hardcoded /tmp directory for temporary files. Update to use g_get_tmp_dir() and g_dir_make_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-22-bmeng...@gmail.com>

[PULL 34/38] linux-user: Implement PI futexes

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Define the missing FUTEX_* constants in syscall_defs.h Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-6-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 10 ++

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Daniel P . Berrangé
On Wed, Sep 28, 2022 at 12:45:46PM +0530, Ani Sinha wrote: > On Wed, Sep 28, 2022 at 12:28 PM Daniel P. Berrangé > wrote: > > > > On Tue, Sep 27, 2022 at 05:18:10PM -0400, Michael S. Tsirkin wrote: > > > On Tue, Sep 27, 2022 at 09:33:27AM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Sep 27,

[PULL 07/38] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info

2022-09-28 Thread Laurent Vivier
From: Helge Deller Enhance the hppa linux-user cpu_loop() to show more debugging info on hard errors. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-6-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/hppa/cpu_loop.c | 6 +- 1 file

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 07:58:46AM +0100, Daniel P. Berrangé wrote: > biosbits isn't tied to QEMU versions, it is an entirely separate 3rd > party project. This binary is just providing the test env, and IIUC, > control over what executes in this env is still done by the QEMU side > test scripts.

[PULL 33/38] linux-user: Convert signal number for FUTEX_FD

2022-09-28 Thread Laurent Vivier
From: Richard Henderson The val argument to FUTEX_FD is a signal number. Convert to match the host, as it will be converted back when the signal is delivered. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-5-richard.hender...@linaro.org>

Re: [PATCH v9 04/10] hw/core: introducing drawer and books for s390x

2022-09-28 Thread Pierre Morel
On 9/6/22 10:59, Markus Armbruster wrote: Pierre Morel writes: S390x defines two topology levels above sockets: nbooks and drawers. nbooks or books? Let's add these two levels inside the CPU topology implementation. Signed-off-by: Pierre Morel --- [...] diff --git

Re: Why we should avoid new submodules if possible

2022-09-28 Thread Michael S. Tsirkin
On Tue, Jun 28, 2022 at 12:21:39PM +0200, Thomas Huth wrote: > On 28/06/2022 12.03, Michael S. Tsirkin wrote: > [...] > > For biosbits if we are going this route then I feel a submodule is much > > better. It records which version exactly each qemu version wants. > > As far as I know, you can

[PULL 00/37] qtests fixes

2022-09-28 Thread Thomas Huth
The following changes since commit dbc4f48b5ab3e6d85f78aa4df6bd6ad561c3d152: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2022-09-27 11:08:36 -0400) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2022-09-28 for

[PULL 19/37] tests/qtest: qmp-test: Skip running test_qmp_oob for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng The test_qmp_oob test case calls mkfifo() which does not exist on win32. Exclude it. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220925113032.1949844-31-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/qmp-test.c | 7 +++ 1 file changed,

[PULL 22/37] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Reviewed-by: Thomas

[PULL 16/37] tests: vhost-user-bridge: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-25-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 35/38] linux-user: Update print_futex_op

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Use a table for the names; print unknown values in hex, since the value contains flags. Signed-off-by: Richard Henderson Message-Id: <20220829021006.67305-7-richard.hender...@linaro.org> [lv: update print_futex() according to "linux-user: Show timespec on strace for

Re: [PATCH v7 4/5] dmg: warn when opening dmg images containing blocks of unknown type

2022-09-28 Thread Markus Armbruster
The patch looks like a useful improvement on its own. But I wonder whether users would appreciate a configuration knob to fail open right away instead of risking I/O errors later.

Re: [PATCH v4 5/7] tests/x86: Add 'q35' machine type to override-tests in hd-geo-test

2022-09-28 Thread Michael Labiuk
Thanks for spotting the typo! It should be "q35". On 9/27/22 16:00, Thomas Huth wrote: On 20/09/2022 12.48, Michael Labiuk wrote: Signed-off-by: Michael Labiuk diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 413cf964c0..58b1107d64 100644 ---

[PULL 01/37] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-28 Thread Thomas Huth
From: Bin Meng Previously request_{bios, pflash} cases were skipped on win32, mainly due to create_blob_file() calling mmap() which does not exist on win32. This rewirtes create_blob_file() to be portable, so that we can enable these cases on Windows. Suggested-by: Marc-André Lureau

[PULL 07/37] tests/qtest: generic_fuzz: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_dir_make_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-11-bmeng...@gmail.com> Signed-off-by: Thomas Huth

Re: [PATCH v4] block: Refactor get_tmp_filename()

2022-09-28 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1); > ... > ret =

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 05:18:10PM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 27, 2022 at 09:33:27AM +0100, Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 01:43:15PM +0530, Ani Sinha wrote: > > > On Sun, Sep 18, 2022 at 1:58 AM Michael S. Tsirkin > > > wrote: > > > > > > > > On Fri,

[PULL 11/37] tests/qtest: virtio-blk-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-20-bmeng...@gmail.com> Signed-off-by: Thomas Huth

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-28 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 08:40:44PM +0200, Thomas Huth wrote: > On 27/09/2022 19.57, Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: > > > On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé > > > wrote: > > > > > > > > On Tue, Sep 27, 2022 at

[PULL 08/37] tests/qtest: virtio_blk_fuzz: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-12-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 24/37] tests/qtest: migration-test: Disable IO redirection for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng On Windows the QEMU executable is created via CreateProcess() and IO redirection does not work, so don't bother adding IO redirection to the command line. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-40-bmeng...@gmail.com>

[PULL 26/37] tests/qtest: virtio-net-failover: Disable migration tests for win32

2022-09-28 Thread Thomas Huth
From: Xuzhou Cheng These tests use the exec migration protocol, which is unsupported on Windows as of today. Disable these tests for now. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-42-bmeng...@gmail.com>

[PULL 18/37] tests/qtest: Build test-filter-{mirror, redirector} cases for posix only

2022-09-28 Thread Thomas Huth
From: Bin Meng The test-filter-{mirror,redirector} cases use socketpair() API that is only available on POSIX and should only be built for POSIX. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-30-bmeng...@gmail.com> Signed-off-by: Thomas Huth ---

[PULL 32/37] tests/qtest: hd-geo-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Message-Id: <20220927110632.1973965-13-bmeng...@gmail.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth ---

[PULL 03/37] tests/qtest: aspeed_smc-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20220925113032.1949844-7-bmeng...@gmail.com>

[PULL 37/37] docs/devel: testing: Document writing portable test cases

2022-09-28 Thread Thomas Huth
From: Bin Meng Update the best practices of how to write portable test cases that can be built and run successfully on both Linux and Windows hosts. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220927110632.1973965-55-bmeng...@gmail.com> Reviewed-by: Thomas Huth

[PULL 35/37] tests/qtest: vhost-user-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_dir_make_tmp() for a portable implementation. Signed-off-by: Bin Meng Message-Id: <20220927110632.1973965-19-bmeng...@gmail.com> Reviewed-by: Marc-André Lureau Signed-off-by: Thomas Huth

[PULL 16/38] linux-user: Passthrough MADV_DONTNEED for certain file mappings

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich This is a follow-up for commit 892a4f6a750a ("linux-user: Add partial support for MADV_DONTNEED"), which added passthrough for anonymous mappings. File mappings can be handled in a similar manner. In order to do that, mark pages, for which mmap() was passed through, with

[PULL 14/38] linux-user: Fix madvise(MADV_DONTNEED) on alpha

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich MADV_DONTNEED has a different value on alpha, compared to all the other architectures. Fix by using TARGET_MADV_DONTNEED instead of MADV_DONTNEED. Fixes: 892a4f6a750a ("linux-user: Add partial support for MADV_DONTNEED") Signed-off-by: Ilya Leoshkevich Reviewed-by:

Re: [PATCH v4 35/54] tests/qtest: libqtest: Install signal handler via signal()

2022-09-28 Thread Bin Meng
On Wed, Sep 28, 2022 at 5:43 PM Thomas Huth wrote: > > On 27/09/2022 13.06, Bin Meng wrote: > > From: Bin Meng > > > > At present the codes uses sigaction() to install signal handler with > > a flag SA_RESETHAND. Such usage can be covered by the signal() API > > that is a simplified interface to

Re: [PATCH v9 10/10] docs/s390x: document s390x cpu topology

2022-09-28 Thread Pierre Morel
On 9/12/22 15:41, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu_topology.rst | 88 ++ 1 file

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Ani Sinha
On Wed, Sep 28, 2022 at 12:28 PM Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 05:18:10PM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2022 at 09:33:27AM +0100, Daniel P. Berrangé wrote: > > > On Tue, Sep 27, 2022 at 01:43:15PM +0530, Ani Sinha wrote: > > > > On Sun, Sep 18, 2022

[PULL 09/38] linux-user: Fix strace of chmod() if mode == 0

2022-09-28 Thread Laurent Vivier
From: Helge Deller If the mode parameter of chmod() is zero, this value isn't shown when stracing a program: chmod("filename",) This patch fixes it up to show the zero-value as well: chmod("filename",000) Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[PULL 30/38] linux-user: Combine do_futex and do_futex_time64

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Pass a boolean to select between time32 and time64. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-2-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 67

[PULL 15/38] linux-user: Implement stracing madvise()

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich The default implementation has several problems: the first argument is not displayed as a pointer, making it harder to grep; the third argument is not symbolized; and there are several extra unused arguments. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson

[PULL 20/38] linux-user/hppa: Add signal trampoline for hppa target

2022-09-28 Thread Laurent Vivier
From: Helge Deller In Linux kernel v5.18 the vDSO for signal trampoline was added. This code mimiks the bare minimum of this vDSO and thus avoids that the parisc emulation needs executable stacks. Signed-off-by: Helge Deller Message-Id: <20220924114501.21767-4-del...@gmx.de> Signed-off-by:

[PULL 03/38] linux-user: Add missing signals in strace output

2022-09-28 Thread Laurent Vivier
From: Helge Deller Some of the guest signal numbers are currently not converted to their representative names in the strace output, e.g. SIGVTALRM. This patch introduces a smart way to generate and keep in sync the host-to-guest and guest-to-host signal conversion tables for usage in the qemu

Re: [PATCH v9 05/10] s390x/cpu: reporting drawers and books topology to the guest

2022-09-28 Thread Pierre Morel
On 9/7/22 12:36, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: The guest can ask for a topology report on drawer's or book's level. Let's implement the STSI instruction's handling for the corresponding selector values. Signed-off-by: Pierre Morel

[PULL 21/38] linux-user/hppa: Drop stack guard page on hppa target

2022-09-28 Thread Laurent Vivier
From: Helge Deller The stack-overflow check when building the "grep" debian package fails on the debian hppa target. Reason is, that the guard page at the top of the stack (which is added by qemu) prevents the fault handler in the grep program to properly detect the stack overflow. The Linux

[PULL 31/38] linux-user: Sink call to do_safe_futex

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Leave only the argument adjustments within the shift, and sink the actual syscall to the end. Sink the timespec conversion as well, as there will be more users. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id:

[PULL 28/38] linux-user: Introduce stubs for ELF AT_BASE_PLATFORM

2022-09-28 Thread Laurent Vivier
From: Jiaxun Yang AT_BASE_PLATFORM is a elf auxiliary vector pointing to a string to pass some architecture information. See getauxval(3) man-page. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220803103009.95972-2-jiaxun.y...@flygoat.com> Signed-off-by:

Re: Why we should avoid new submodules if possible

2022-09-28 Thread Thomas Huth
On 28/09/2022 11.47, Michael S. Tsirkin wrote: On Wed, Sep 28, 2022 at 11:33:52AM +0200, Thomas Huth wrote: On 28/09/2022 11.26, Michael S. Tsirkin wrote: On Tue, Jun 28, 2022 at 12:21:39PM +0200, Thomas Huth wrote: On 28/06/2022 12.03, Michael S. Tsirkin wrote: [...] For biosbits if we are

Re: [PATCH v9 03/16] net: simplify net_client_parse() error management

2022-09-28 Thread David Gibson
On Mon, Sep 26, 2022 at 09:50:35PM +0200, Laurent Vivier wrote: > All net_client_parse() callers exit in case of error. > > Move exit(1) to net_client_parse() and remove error checking from > the callers. > > Suggested-by: Markus Armbruster > Signed-off-by: Laurent Vivier > Reviewed-by: Markus

Re: [PATCH v9 13/16] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-09-28 Thread David Gibson
On Mon, Sep 26, 2022 at 09:50:45PM +0200, Laurent Vivier wrote: > To be consistent with socket_uri(), add 'tcp:' prefix for inet type in > socket_parse(), by default socket_parse() use tcp when no prefix is > provided (format is host:port). > > In socket_uri(), use 'vsock:' prefix for vsock type

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-28 Thread Thomas Huth
On 27/09/2022 21.10, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 15:04, Thomas Huth wrote: On 27/09/2022 20.47, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 14:40, Thomas Huth wrote: On 27/09/2022 19.57, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan

[PULL 10/37] tests/qtest: vhost-user-blk-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_get_tmp_dir() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20220925113032.1949844-18-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 27/37] tests/qtest: microbit-test: Fix socket access for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng Sockets on Windows do not use *nix-style file descriptors, so write()/read()/close() do not work on Windows. Switch over to use send()/recv()/closesocket() which work with sockets on all platforms. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id:

[PULL 21/37] tests/qtest: libqtest: Exclude the *_fds APIs for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng libqmp.c::qmp_fd_vsend_fds() is not available on Windows, hence any APIs in libqtest that call libqmp.c::qmp_fd_vsend_fds() should be excluded for win32 too. This includes the following: * qtest_qmp_vsend_fds() * qtest_vqmp_fds() * qtest_qmp_fds() * qtest_qmp_add_client()

[PULL 23/37] tests/qtest: bios-tables-test: Adapt the case for win32

2022-09-28 Thread Thomas Huth
From: Bin Meng Single quotes in the arguments (oem_id='CRASH ') are not removed in the Windows environment before it is passed to the QEMU executable. The space in the argument causes the "-acpitable" option parser to think that all of its parameters are done, hence it complains: '-acpitable'

[PULL 02/37] tests/qtest: ahci-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220925113032.1949844-6-bmeng...@gmail.com> Signed-off-by: Thomas Huth ---

[PULL 00/38] Linux user for 7.2 patches

2022-09-28 Thread Laurent Vivier
20220928 use 'max' instead of 'qemu32' / 'qemu64' add pidfd_open(), pidfd_send_signal() and pidfd_getfd() Improve madvise(MADV_DONTNEED) futex syscal rework strace improvement HP/PA fixes and improvement Misc fixes Daniel P. Berrangé

[PULL 10/38] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch

2022-09-28 Thread Laurent Vivier
From: Helge Deller On the parisc architecture the stack grows upwards. Move the TASK_UNMAPPED_BASE to high memory area as it's done by the kernel on physical machines. Signed-off-by: Helge Deller Message-Id: <20220918194555.83535-9-del...@gmx.de> Signed-off-by: Laurent Vivier ---

[PULL 01/38] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default

2022-09-28 Thread Laurent Vivier
From: Daniel P. Berrangé The 'qemu64' CPU model implements the least featureful x86_64 CPU that's possible. Historically this hasn't been an issue since it was rare for OS distros to build with a higher mandatory CPU baseline. With RHEL-9, however, the entire distro is built for the x86_64-v2

Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-28 Thread Alex Bennée
Paolo Bonzini writes: > What is an example of one such huge path? This would mean that LTO is > changing the set of tests that are run, which is > unexpected. It does look like the LTO build runs more tests although its hard to diff as the order if different: ➜ grep "list" without-lto | wc

[PULL 25/38] linux-user: fix bug about missing signum convert of sigqueue

2022-09-28 Thread Laurent Vivier
From: fanwenjie Fixes: 66fb9763af ("basic signal handling") Fixes: cf8b8bfc50 ("linux-user: add support for rt_tgsigqueueinfo() system call") Signed-off-by: fanwenjie Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-- 1 file changed, 2

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 09:35:59AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 28, 2022 at 10:31:39AM +0200, Thomas Huth wrote: > > On 27/09/2022 23.21, Michael S. Tsirkin wrote: > > > On Tue, Sep 27, 2022 at 04:45:09PM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Sep 27, 2022 at 07:35:13PM

Re: qemu and -vga vs. -device

2022-09-28 Thread Daniel Henrique Barboza
On 9/27/22 19:01, Adam Williamson wrote: On Tue, 2022-09-27 at 13:34 -0300, Daniel Henrique Barboza wrote: Hi Adam, On 9/26/22 06:26, Gerd Hoffmann wrote: On Sat, Sep 24, 2022 at 12:12:45AM -0700, Adam Williamson wrote: On Mon, 2022-09-19 at 06:42 +0200, Gerd Hoffmann wrote: On Fri, Sep

Re: [PATCH v9 07/10] s390x/cpu_topology: CPU topology migration

2022-09-28 Thread Pierre Morel
On 9/8/22 20:04, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration

Re: [PATCH v9 06/10] s390x/cpu_topology: resetting the Topology-Change-Report

2022-09-28 Thread Pierre Morel
On 9/8/22 09:57, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem

Re: Why we should avoid new submodules if possible

2022-09-28 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 10:37:14AM +0100, Daniel P. Berrangé wrote: > There's also the perenial problem that developers frequently send > patches that mistakenly include submodule changes, which is related to the > way that 'git checkout' doesn't sync submodule state when switching branches. Do

[PULL 06/38] linux-user: Log failing executable in EXCP_DUMP()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Enhance the EXCP_DUMP() macro to print out the failing program too. During debugging it's sometimes hard to track down the actual failing program if you are e.g. building a whole debian package. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[PULL 19/38] linux-user: Add proper strace format strings for getdents()/getdents64()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Message-Id: <20220924114501.21767-3-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index

[PULL 33/37] tests/qtest: pflash-cfi02-test: Avoid using hardcoded /tmp

2022-09-28 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Message-Id: <20220927110632.1973965-16-bmeng...@gmail.com> Reviewed-by: Marc-André Lureau Signed-off-by: Thomas Huth

[PULL 04/38] linux-user: Add missing clock_gettime64() syscall strace

2022-09-28 Thread Laurent Vivier
From: Helge Deller Allow linux-user to strace the clock_gettime64() syscall. This syscall is used a lot on 32-bit guest architectures which use newer glibc versions. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-3-del...@gmx.de> Signed-off-by:

[PULL 27/38] linux-user/s390x: Save/restore fpc when handling a signal

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich Linux kernel does this in fpregs_store() and fpregs_load(), so qemu-user should do this as well. Found by running valgrind's none/tests/s390x/test_sig. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id:

[PULL 18/38] linux-user: Fix TARGET_PROT_SEM for XTENSA

2022-09-28 Thread Laurent Vivier
From: Helge Deller The xtensa platform has a value of 0x10 for PROT_SEM. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220924114501.21767-2-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1

[PULL 32/38] linux-user: Implement FUTEX_WAKE_BITSET

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-4-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c

[PULL 24/38] linux-user/hppa: Fix setup_sigcontext()

2022-09-28 Thread Laurent Vivier
From: Helge Deller We don't emulate a preemptive kernel on this level, and the hppa architecture doesn't allow context switches on the gateway page. So we always have to return to sc_iaoq[] and not to gr[31]. This fixes the remaining random segfaults which still occured. Signed-off-by: Helge

Re: [Virtio-fs] virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-09-28 Thread Sergio Lopez
On Tue, Sep 27, 2022 at 04:14:20PM -0400, Stefan Hajnoczi wrote: > On Tue, Sep 27, 2022 at 01:51:41PM -0400, Colin Walters wrote: > > > > > > On Tue, Sep 27, 2022, at 1:27 PM, German Maglione wrote: > > > > > >> > Now all the development has moved to rust virtiofsd. > > > > Oh, awesome!! The

[PULL 29/38] linux-user: Set ELF_BASE_PLATFORM for MIPS

2022-09-28 Thread Laurent Vivier
From: Jiaxun Yang Match most appropriate base platform string based on insn_flags. Logic is aligned with aligned with set_isa() from arch/mips/kernel/cpu-probe.c in Linux kernel. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-Id:

Re: [PATCH v9 00/10] s390x: CPU Topology

2022-09-28 Thread Pierre Morel
On 9/12/22 16:38, Janis Schoetterl-Glausch wrote: I found this version much easier to understand than the previous one. You could consider splitting up the series into two. One that introduces support for STSI, PTF, migration, etc. And a second one that adds support for the maximum-MNist

Re: [PULL 26/38] linux-user: Don't assume 0 is not a valid host timer_t value

2022-09-28 Thread Jon Alduan
Hello Laurent, hello Peter, I see the Maximum number of active timers ist still 32. I hope it is not too late, but for my application this is not enough. Could this define be bigger i.e. 32*4? Thanks for your support! I really appreciate it! Jon Laurent Vivier igorleak hau idatzi zuen (2022

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-28 Thread Thomas Huth
On 27/09/2022 23.21, Michael S. Tsirkin wrote: On Tue, Sep 27, 2022 at 04:45:09PM +0100, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at 07:35:13PM +0530, Ani Sinha wrote: ... Alright, .gitlab-ci.yml is produced and the pipeline succeeds. However, the question still remains, where do we

Re: Why we should avoid new submodules if possible

2022-09-28 Thread Daniel P . Berrangé
On Wed, Sep 28, 2022 at 05:26:42AM -0400, Michael S. Tsirkin wrote: > On Tue, Jun 28, 2022 at 12:21:39PM +0200, Thomas Huth wrote: > > On 28/06/2022 12.03, Michael S. Tsirkin wrote: > > [...] > > > For biosbits if we are going this route then I feel a submodule is much > > > better. It records

Re: [PATCH v9 04/10] hw/core: introducing drawer and books for s390x

2022-09-28 Thread Pierre Morel
On 9/6/22 10:59, Markus Armbruster wrote: Pierre Morel writes: S390x defines two topology levels above sockets: nbooks and drawers. nbooks or books? Sorry, forgot this. Yes typo, I mean "books" Thanks, Pierre -- Pierre Morel IBM Lab Boeblingen

  1   2   3   4   >