[PATCH v4 10/54] tests/qtest: generic_fuzz: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch

[PATCH v4 01/54] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-27 Thread Bin Meng
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

[PATCH v4 02/54] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng Reviewed-by: Alex Bennée --- (no changes since v1) semihosting/arm-compat-semi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semihosting/arm-compat-semi.c

[PATCH v4 06/54] tests/qtest: aspeed_smc-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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: Cédric Le Goater Reviewed-by: Thomas Huth --- (no changes since v3) Changes in v3: - Split to a

[PATCH v4 03/54] tcg: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Reviewed-by: Alex Bennée --- (no changes since v2) Changes in v2: - Use g_autofree to declare the variable tcg/tcg.c | 3 ++- 1 file changed, 2

[PATCH v4 08/54] tests/qtest: cxl-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch - Ensure

[PATCH v4 21/54] tests/qtest: libqtest: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a

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

2022-09-27 Thread Bin Meng
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 result of this, the POSIX implementation

[PATCH v4 16/54] tests/qtest: qmp-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- Changes in v4: - Replace the error reporting with g_assert_no_error() Changes in v3: - Split to a separate patch

[PATCH v4 34/54] tests/qtest: libqtest: Exclude the *_fds APIs for win32

2022-09-27 Thread Bin Meng
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()

[PATCH v4 11/54] tests/qtest: virtio_blk_fuzz: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch

[PATCH v4 32/54] tests/qtest: libqtest: Adapt global_qtest declaration for win32

2022-09-27 Thread Bin Meng
From: Xuzhou Cheng Commit dd2107497275 ("tests/libqtest: Use libqtest-single.h in tests that require global_qtest") moved global_qtest to libqtest-single.h, by declaring global_qtest attribute to be common and weak. This trick unfortunately does not work on Windows, and building qtest test

[PATCH v4 20/54] tests/qtest: virtio-scsi-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch - Ensure

[PATCH v4 28/54] tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32

2022-09-27 Thread Bin Meng
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 --- (no changes since v2) Changes in v2: - Change to skip only part of the virtio-net-test cases that require

[PATCH v4 19/54] tests/qtest: virtio-blk-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch

[PATCH] target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP

2022-09-27 Thread Jerome Forissier
SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark it with ARM_CP_EL3_NO_EL2_KEEP. Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL") Signed-off-by: Jerome Forissier --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 10/12] audio: refactor audio_get_avail()

2022-09-27 Thread Marc-André Lureau
On Fri, Sep 23, 2022 at 10:51 PM Volker Rümelin wrote: > Split out the code in audio_get_avail() that calculates the > buffer size that the audio frontend can read. This is similar > to the code changes in audio_get_free(). > > Signed-off-by: Volker Rümelin > Reviewed-by: Marc-André Lureau

[PATCH] docs: Update TPM documentation for usage of a TPM 2

2022-09-27 Thread Stefan Berger
Update the TPM documentation for usage of a TPM 2 rather than a TPM 1.2. Adjust the command lines and expected outputs inside the VM accordingly. Update the command line to start a TPM 2 with swtpm. Signed-off-by: Stefan Berger --- docs/specs/tpm.rst | 44

Re: [PATCH v2 1/8] hw/arm/virt: Fix devicetree warning about the root node

2022-09-27 Thread Eric Auger
Hi jean, On 9/27/22 12:03, Jean-Philippe Brucker wrote: > The devicetree specification requires a 'model' property in the root > node. Fix the corresponding dt-validate warning: > > /: 'model' is a required property > From schema: dtschema/schemas/root-node.yaml > > Use the same name for

Re: [PATCH v2 2/8] hw/arm/virt: Fix devicetree warning about the GIC node

2022-09-27 Thread Eric Auger
Hi Jean, On 9/27/22 12:03, Jean-Philippe Brucker wrote: > The GICv3 bindings requires a #msi-cells property for the ITS node. Fix > the corresponding dt-validate warning: > > interrupt-controller@800: msi-controller@808: '#msi-cells' is a > required property > From schema: >

Re: [PATCH 2/8] linux-user: Sink call to do_safe_futex

2022-09-27 Thread Laurent Vivier
Le 29/08/2022 à 04:10, Richard Henderson a écrit : 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 --- linux-user/syscall.c | 60

[PATCH 5/5] configure, meson: move linker flag detection to meson

2022-09-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 16 meson.build | 13 + 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 0a6f57c371..e5f1eb6213 100755 --- a/configure +++ b/configure @@ -1342,12 +1342,10 @@ EOF if test

[PATCH v2 3/8] hw/arm/virt: Use "msi-map" devicetree property for PCI

2022-09-27 Thread Jean-Philippe Brucker
The "msi-parent" property can be used on the PCI node when MSIs do not contain sideband data (device IDs) [1]. In QEMU, MSI transactions contain the requester ID, so the PCI node should use the "msi-map" property instead of "msi-parent". In our case the property describes an identity map between

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

2022-09-27 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 03:37:39PM +0530, Ani Sinha wrote: > > > > > > > > > > > > > > OK fine. Lets figuire out how to push bits somewhere in > > > > > > > git.qemu.org and > > > > > > > the binaries in some other repo first. Everything else hinges on > > > > > > > that. We > > > > > > > can

[PATCH v2 2/8] hw/arm/virt: Fix devicetree warning about the GIC node

2022-09-27 Thread Jean-Philippe Brucker
The GICv3 bindings requires a #msi-cells property for the ITS node. Fix the corresponding dt-validate warning: interrupt-controller@800: msi-controller@808: '#msi-cells' is a required property From schema: linux/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml

Re: [PATCH 5/8] linux-user: Implement PI futexes

2022-09-27 Thread Laurent Vivier
Le 29/08/2022 à 04:10, Richard Henderson a écrit : Define the missing FUTEX_* constants in syscall_defs.h Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 3 +++ linux-user/syscall.c | 10 ++ 2 files changed, 13 insertions(+) Reviewed-by: Laurent Vivier

Re: [PATCH v4 2/7] tests/x86: Add subtest with 'q35' machine type to device-plug-test

2022-09-27 Thread Thomas Huth
On 20/09/2022 12.48, Michael Labiuk wrote: Configure pci bridge setting to plug pci device and unplug. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 41 ++ 1 file changed, 41 insertions(+) Reviewed-by: Thomas Huth

Re: [PATCH 7/8] linux-user: Lock log around strace

2022-09-27 Thread Laurent Vivier
Le 29/08/2022 à 04:10, Richard Henderson a écrit : Do not allow syscall arguments to be interleaved between threads. Signed-off-by: Richard Henderson --- linux-user/strace.c | 65 - 1 file changed, 46 insertions(+), 19 deletions(-) Reviewed-by:

Re: [PATCH v4 3/7] tests/x86: Add 'q35' machine type to ivshmem-test

2022-09-27 Thread Thomas Huth
On 20/09/2022 12.48, Michael Labiuk wrote: Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk --- tests/qtest/ivshmem-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/ivshmem-test.c

[PATCH v4 15/54] tests/qtest: pflash-cfi02-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- Changes in v4: - Replace the whole block with a g_assert_no_error() Changes in v3: - Split to a separate patch

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

2022-09-27 Thread Bin Meng
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 the general sigaction() facility. Update to use signal() to install the signal handler, as it is available on

[PATCH v4 47/54] io/channel-watch: Drop a superfluous '#ifdef WIN32'

2022-09-27 Thread Bin Meng
From: Bin Meng In the win32 version qio_channel_create_socket_watch() body there is no need to do a '#ifdef WIN32'. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v1) io/channel-watch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/io/channel-watch.c

[PATCH v4 33/54] tests/qtest: Use send/recv for socket communication

2022-09-27 Thread Bin Meng
From: Xuzhou Cheng Socket communication in the libqtest and libqmp codes uses read() and write() which work on any file descriptor on *nix, and sockets in *nix are an example of a file descriptor. However sockets on Windows do not use *nix-style file descriptors, so read() and write() cannot be

Re: [PATCH v2 8/8] hw/arm/virt: Fix devicetree warnings about node names

2022-09-27 Thread Peter Maydell
On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker wrote: > > The devicetree specification requires that nodes use a generic name > where appropriate. Fix the corresponding dt-validate warnings: Either: (1) guests are looking for devices in the DT by node name. In that case we can't change the

[PATCH v2] linux-user: Add faccessat2() syscall

2022-09-27 Thread Helge Deller
Add faccessat2() with strace output. Signed-off-by: Helge Deller --- v2: Resending with minor commit message changes. diff --git a/linux-user/strace.c b/linux-user/strace.c index 7d882526da..307d19f5d0 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1931,7 +1931,7 @@

Re: [PATCH 1/2] audio: fix in.voices test

2022-09-27 Thread Marc-André Lureau
On Sun, Sep 25, 2022 at 12:57 PM Helge Konetzka wrote: > > Calling qemu with valid -audiodev ...,in.voices=0 results in an obsolete > warning: >audio: Bogus number of capture voices 0, setting to 0 > This patch fixes the in.voices test. > > Signed-off-by: Helge Konetzka > weird case, ok :)

Re: [PATCH v2 3/8] hw/arm/virt: Use "msi-map" devicetree property for PCI

2022-09-27 Thread Peter Maydell
On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker wrote: > > The "msi-parent" property can be used on the PCI node when MSIs do not > contain sideband data (device IDs) [1]. In QEMU, MSI transactions > contain the requester ID, so the PCI node should use the "msi-map" > property instead of

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

2022-09-27 Thread Ani Sinha
On Tue, Sep 27, 2022 at 3:48 PM Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 03:37:39PM +0530, Ani Sinha wrote: > > > > > > > > > > > > > > > > OK fine. Lets figuire out how to push bits somewhere in > > > > > > > > git.qemu.org and > > > > > > > > the binaries in some other repo first.

Re: [PATCH 04/12] alsaaudio: reduce playback latency

2022-09-27 Thread Marc-André Lureau
On Fri, Sep 23, 2022 at 10:51 PM Volker Rümelin wrote: > Change the buffer_get_free pcm_ops function to report the free > ALSA playback buffer. The generic buffer becomes a temporary > buffer and is empty after a call to audio_run_out(). > > Signed-off-by: Volker Rümelin > lgtm Acked-by:

missing entries from docs/specs/pci-ids.txt ?

2022-09-27 Thread Peter Maydell
I noticed today that docs/specs/pci-ids.txt doesn't have an entry for the virtio-iommu, which is defined in pci.h as #define PCI_DEVICE_ID_VIRTIO_IOMMU 0x1014 There seem to be a few other virtio ID values defined in the header but not in the txt file too -- do we need to update it?

Re: [PATCH v9 02/10] s390x/cpu topology: core_id sets s390x CPU topology

2022-09-27 Thread Cédric Le Goater
On 9/2/22 09:55, Pierre Morel wrote: In the S390x CPU topology the core_id specifies the CPU address and the position of the core withing the topology. Let's build the topology based on the core_id. Signed-off-by: Pierre Morel --- hw/s390x/cpu-topology.c | 135

Re: [PATCH v6 3/5] module: add Error arguments to module_load and module_load_qom

2022-09-27 Thread Claudio Fontana
On 9/27/22 13:53, Kevin Wolf wrote: > Am 27.09.2022 um 11:13 hat Claudio Fontana geschrieben: >> On 9/27/22 09:54, Markus Armbruster wrote: >>> Claudio Fontana writes: >>> On 9/26/22 12:38, Kevin Wolf wrote: > Am 24.09.2022 um 01:21 hat Claudio Fontana geschrieben: >> improve error

[PATCH 4/5] configure, meson: move C++ compiler detection to meson.build

2022-09-27 Thread Paolo Bonzini
The test is slightly weaker than before, because it does not call an extern "C" function from a C source file. However, in practice what we seek to detect is ABI compatibility of the various sanitizer flags, and for that it is enough to compile anything with CC and link it with CXX.

[PATCH 2/5] meson: require 0.61.3

2022-09-27 Thread Paolo Bonzini
This removes the dependency of dbus-display on --enable-modules. It also allows cleanups in modinfo collection and allows moving C++ compiler detection to meson.build. Because it is now deprecated to use install_subdir to create an empty directory, replace it with install_emptydir. Updating the

Re: [RFC PATCH 0/3] MIPS decodetree conversion attempt

2022-09-27 Thread Jiaxun Yang
> 2022年9月26日 22:35,Philippe Mathieu-Daudé 写道: > > Hi Jiaxun, > > On Mon, Sep 26, 2022 at 4:44 PM Jiaxun Yang wrote: >>> 2022年9月21日 13:41,Jiaxun Yang 写道: >>> >>> Hi, >>> >>> This is my attempt of converting MIPS translation code into decodetree. >>> >>> Currently only MIPS I to MIPS

Re: [PATCH 2/2] linux-user: Add parameters of getrandom() syscall for strace

2022-09-27 Thread Laurent Vivier
Le 27/09/2022 à 11:35, Helge Deller a écrit : Signed-off-by: Helge Deller --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index 31a2ccd76d..9bb234a584 100644 --- a/linux-user/strace.list +++

[PATCH v4 09/54] tests/qtest: fdc-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch

[PATCH v4 22/54] tests/unit: test-image-locking: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch - Ensure

[PATCH v4 24/54] tests: vhost-user-bridge: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
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 --- (no changes since v3) Changes in v3: - Split to a separate patch

[PATCH v4 51/54] .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes

2022-09-27 Thread Bin Meng
From: Bin Meng commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices" changed to compile QEMU with the --without-default-devices switch for the msys2-64bit job, due to the build could not complete within the project timeout (1h), and also mentioned

[PATCH v4 41/54] tests/qtest: microbit-test: Fix socket access for win32

2022-09-27 Thread Bin Meng
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 --- (no changes since

[PATCH v4 44/54] tests/qtest: virtio-net-failover: Disable migration tests for win32

2022-09-27 Thread Bin Meng
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 --- (no changes since v1) tests/qtest/virtio-net-failover.c | 9

[PATCH v4 53/54] tests/qtest: Enable qtest build on Windows

2022-09-27 Thread Bin Meng
From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng --- (no changes since v3) Changes in v3: - Drop the host test Changes in v2: - new patch: "tests/qtest: Enable qtest build on

Re: [PATCH 05/12] audio: add more audio rate control functions

2022-09-27 Thread Marc-André Lureau
On Fri, Sep 23, 2022 at 10:43 PM Volker Rümelin wrote: > The next patch needs two new rate control functions. The first > one returns the bytes needed at call time to maintain the > selected rate. The second one adjusts the bytes actually sent. > > Split the audio_rate_get_bytes() function into

Re: [PATCH v7 1/2] i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple fault

2022-09-27 Thread Paolo Bonzini
On 9/23/22 09:33, Chenyi Qiang wrote: For the direct triple faults, i.e. hardware detected and KVM morphed to VM-Exit, KVM will never lose them. But for triple faults sythesized by KVM, e.g. the RSM path, if KVM exits to userspace before the request is serviced, userspace could migrate the VM

Re: [PATCH v4 43/54] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled

2022-09-27 Thread Bin Meng
On Tue, Sep 27, 2022 at 9:15 PM Marc-André Lureau wrote: > > Hi > > On Tue, Sep 27, 2022 at 5:02 PM Bin Meng wrote: >> >> From: Xuzhou Cheng >> >> Make sure QEMU process "to" exited before launching another target >> for migration in the test_multifd_tcp_cancel case. >> >> Signed-off-by: Xuzhou

[PATCH v7 0/5] improve error handling for module load

2022-09-27 Thread Claudio Fontana
CHANGELOG: v6 -> v7: * changed instances of abort() to exit(1), for the CONFIG_MODULES case (Philippe). * dmg: do not use a separate local error, use the existing errp (Kevin) * block: do not use a separate local error, use the existing errp for bdrv_find_protocol (Markus) v5 -> v6: *

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

2022-09-27 Thread Claudio Fontana
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: Richard Henderson [claudio: changed

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

2022-09-27 Thread Ani Sinha
On Tue, Sep 27, 2022 at 5:12 PM Ani Sinha wrote: > > On Tue, Sep 27, 2022 at 3:48 PM Daniel P. Berrangé > wrote: > > > > On Tue, Sep 27, 2022 at 03:37:39PM +0530, Ani Sinha wrote: > > > > > > > > > > > > > > > > > > OK fine. Lets figuire out how to push bits somewhere in > > > > > > > > >

[PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs

2022-09-27 Thread Alex Bennée
We currently have hacks across the hw/ to reference current_cpu to work out what the current accessing CPU is. This breaks in some cases including using gdbstub to access HW state. As we have MemTxAttrs to describe details about the access lets extend it so CPU accesses can be explicitly marked.

[PATCH v3 13/15] gdbstub: move breakpoint logic to accel ops

2022-09-27 Thread Alex Bennée
As HW virtualization requires specific support to handle breakpoints lets push out special casing out of the core gdbstub code and into AccelOpsClass. This will make it easier to add other accelerator support and reduces some of the stub shenanigans. Reviewed-by: Richard Henderson Signed-off-by:

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

2022-09-27 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 11:44:45AM -0400, Stefan Hajnoczi wrote: > On Tue, 27 Sept 2022 at 05:02, Thomas Huth wrote: > > now that Gitlab is giving us pressure on the amount of free CI minutes, I > > wonder whether we should maybe move the Cirrus-CI jobs out of the gitlab-CI > > dashboard again?

Re: [PATCH] mem/cxl-type3: Add sn option to provide serial number for PCI ecap

2022-09-27 Thread Ben Widawsky
On 22-09-23 17:18:35, Jonathan Cameron wrote: > The Device Serial Number Extended Capability PCI r6.0 sec 7.9.3 > provides a standard way to provide a device serial number as > an IEEE defined 64-bit extended unique identifier EUI-64. > > CXL 2.0 section 8.1.12.2 Memory Device PCIe Capabilities

Re: [PATCH v2] target/arm/kvm: Retry KVM_CREATE_VM call if it fails EINTR

2022-09-27 Thread Peter Maydell
On Tue, 27 Sept 2022 at 18:07, Eric Auger wrote: > > Hi Peter, > > On 9/27/22 18:49, Peter Maydell wrote: > > Occasionally the KVM_CREATE_VM ioctl can return EINTR, even though > > there is no pending signal to be taken. In commit 94ccff13382055 > > we added a retry-on-EINTR loop to the

Re: [PULL 0/8] Net patches

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/3] M68k for 7.2 patches

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH v5 02/12] blkio: add libblkio block driver

2022-09-27 Thread Stefan Hajnoczi
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring, virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers under development. One of the reasons for developing libblkio is that other applications besides

[PATCH v5 08/12] block: add BlockRAMRegistrar

2022-09-27 Thread Stefan Hajnoczi
Emulated devices and other BlockBackend users wishing to take advantage of blk_register_buf() all have the same repetitive job: register RAMBlocks with the BlockBackend using RAMBlockNotifier. Add a BlockRAMRegistrar API to do this. A later commit will use this from hw/block/virtio-blk.c.

[PATCH v5 05/12] block: use BdrvRequestFlags type for supported flag fields

2022-09-27 Thread Stefan Hajnoczi
Use the enum type so GDB displays the enum members instead of printing a numeric constant. Signed-off-by: Stefan Hajnoczi --- include/block/block_int-common.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/block/block_int-common.h

[RFC PATCH v2 01/29] target/ppc: define PPC_INTERRUPT_* values directly

2022-09-27 Thread Matheus Ferst
This enum defines the bit positions in env->pending_interrupts for each interrupt. However, except for the comparison in kvmppc_set_interrupt, the values are always used as (1 << PPC_INTERRUPT_*). Define them directly like that to save some clutter. No functional change intended. Reviewed-by:

[RFC PATCH v2 23/29] target/ppc: remove generic architecture checks from p7_deliver_interrupt

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index de6972d002..ca594c3b9e 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@

[RFC PATCH v2 24/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER7

2022-09-27 Thread Matheus Ferst
Move the interrupt masking logic out of cpu_has_work_POWER7 in a new method, p7_interrupt_powersave, that only returns an interrupt if it can wake the processor from power-saving mode. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 45

[RFC PATCH v2 18/29] target/ppc: add power-saving interrupt masking logic to p8_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p8_interrupt_powersave and use it in p8_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 2 +- target/ppc/excp_helper.c | 24 target/ppc/internal.h| 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git

[RFC PATCH v2 19/29] target/ppc: create an interrupt masking method for POWER7

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p7 to p7_next_unmasked_interrupt;

[RFC PATCH v2 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds

2022-09-27 Thread Matheus Ferst
Writes to LPCR are hypervisor privileged. Signed-off-by: Matheus Ferst --- The method introduced in the next patch, ppc_maybe_interrupt, will be called in ppc_store_lpcr and only available in !CONFIG_USER_ONLY builds. --- target/ppc/cpu.c | 2 ++ target/ppc/cpu.h | 2 +- 2 files changed, 3

[RFC PATCH v2 27/29] target/ppc: introduce ppc_maybe_interrupt

2022-09-27 Thread Matheus Ferst
The method checks if any pending interrupt is unmasked and calls cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers or masks/unmasks interrupts should call this method to keep CPU_INTERRUPT_HARD coherent with env->pending_interrupts. Signed-off-by: Matheus Ferst --- v2: -

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

2022-09-27 Thread Thomas Huth
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 11:44:45AM -0400, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 05:02, Thomas Huth wrote: now

Re: [PULL 00/14] s390x patches and slirp submodule removal

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v5] 9pfs: use GHashTable for fid table

2022-09-27 Thread Christian Schoenebeck
On Dienstag, 27. September 2022 17:14:57 CEST Linus Heckemann wrote: > Linus Heckemann writes: > > static void coroutine_fn virtfs_reset(V9fsPDU *pdu) > > { > > > > V9fsState *s = pdu->s; > > V9fsFidState *fidp; > > > > +GList *freeing; > > +/* Get a list of all the values

[PATCH v5 00/12] blkio: add libblkio BlockDriver

2022-09-27 Thread Stefan Hajnoczi
v5: - Drop "RFC" since libblkio 1.0 has been released and the library API is stable - Disable BDRV_REQ_REGISTERED_BUF if we run out of blkio_mem_regions. The bounce buffer slow path is taken when there are not enough blkio_mem_regions to cover guest RAM. [Hanna & David Hildenbrand] - Call

[PATCH v5 03/12] numa: call ->ram_block_removed() in ram_block_notifer_remove()

2022-09-27 Thread Stefan Hajnoczi
When a RAMBlockNotifier is added, ->ram_block_added() is called with all existing RAMBlocks. There is no equivalent ->ram_block_removed() call when a RAMBlockNotifier is removed. The util/vfio-helpers.c code (the sole user of RAMBlockNotifier) is fine with this asymmetry because it does not rely

[PATCH v5 01/12] coroutine: add flag to re-queue at front of CoQueue

2022-09-27 Thread Stefan Hajnoczi
When a coroutine wakes up it may determine that it must re-queue. Normally coroutines are pushed onto the back of the CoQueue, but for fairness it may be necessary to push it onto the front of the CoQueue. Add a flag to specify that the coroutine should be pushed onto the front of the CoQueue. A

[PATCH v5 09/12] exec/cpu-common: add qemu_ram_get_fd()

2022-09-27 Thread Stefan Hajnoczi
Add a function to get the file descriptor for a RAMBlock. Device emulation code typically uses the MemoryRegion APIs but vhost-style code may use RAMBlock directly for sharing guest memory with another process. This new API will be used by the libblkio block driver so it can share guest memory

[PATCH v5 04/12] block: pass size to bdrv_unregister_buf()

2022-09-27 Thread Stefan Hajnoczi
The only implementor of bdrv_register_buf() is block/nvme.c, where the size is not needed when unregistering a buffer. This is because util/vfio-helpers.c can look up mappings by address. Future block drivers that implement bdrv_register_buf() may not be able to do their job given only the buffer

[PATCH v5 11/12] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-09-27 Thread Stefan Hajnoczi
Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGISTERED_BUF on I/O requests. Therefore no blkio_map_mem_region()

[RFC PATCH v2 00/29] PowerPC interrupt rework

2022-09-27 Thread Matheus Ferst
Link to v1: https://lists.gnu.org/archive/html/qemu-ppc/2022-08/msg00370.html This series is also available as a git branch: https://github.com/PPC64/qemu/tree/ferst-interrupt-fix-v2 This version addresses Fabiano's feedback and fixes some issues found with the tests suggested by Cédric. While

[RFC PATCH v2 02/29] target/ppc: always use ppc_set_irq to set env->pending_interrupts

2022-09-27 Thread Matheus Ferst
Use ppc_set_irq to raise/clear interrupts to ensure CPU_INTERRUPT_HARD will be set/reset accordingly. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 17 +++-- target/ppc/misc_helper.c | 9 ++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git

[RFC PATCH v2 04/29] target/ppc: prepare to split interrupt masking and delivery by excp_model

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Use "generic" instead of "legacy" to name the original methods (farosas). --- target/ppc/excp_helper.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/ppc/excp_helper.c

[RFC PATCH v2 03/29] target/ppc: split interrupt masking and delivery from ppc_hw_interrupt

2022-09-27 Thread Matheus Ferst
Split ppc_hw_interrupt into an interrupt masking method, ppc_next_unmasked_interrupt, and an interrupt processing method, ppc_deliver_interrupt. Signed-off-by: Matheus Ferst --- v2: - ppc_hw_interrupt renamed as ppc_deliver_interrupt (farosas); - Handle the "Wakeup from PM state but

[RFC PATCH v2 05/29] target/ppc: create an interrupt masking method for POWER9/POWER10

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p9 to p9_next_unmasked_interrupt

[RFC PATCH v2 10/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER9

2022-09-27 Thread Matheus Ferst
Move the interrupt masking logic out of cpu_has_work_POWER9 in a new method, p9_interrupt_powersave, that only returns an interrupt if it can wake the processor from power-saving mode. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 126

[RFC PATCH v2 16/29] target/ppc: remove generic architecture checks from p8_deliver_interrupt

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 4cbf6b29fc..2e8d4699a9 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@

[RFC PATCH v2 11/29] target/ppc: add power-saving interrupt masking logic to p9_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p9_interrupt_powersave and use it in p9_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- Temporarily putting the prototype in internal.h for lack of a better place, we will un-export p9_interrupt_powersave in future patches. --- target/ppc/cpu_init.c| 2 +-

[RFC PATCH v2 14/29] target/ppc: create an interrupt delivery method for POWER8

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_deliver_interrupt, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 113 +++ 1 file changed, 113 insertions(+)

[RFC PATCH v2 20/29] target/ppc: remove unused interrupts from p7_pending_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER7 interrupt masking method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Hypervisor Doorbell and Event-Based Branch: introduced in Power ISA v2.07; - Critical

[RFC PATCH v2 12/29] target/ppc: create an interrupt masking method for POWER8

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p8 to p8_next_unmasked_interrupt - Processor-specific stuff

[RFC PATCH v2 15/29] target/ppc: remove unused interrupts from p8_deliver_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER8 interrupt processing method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Debug Interrupt: removed in Power ISA v2.07; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Critical Input, Watchdog Timer, and

[RFC PATCH v2 25/29] target/ppc: add power-saving interrupt masking logic to p7_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p7_interrupt_powersave and use it in p7_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 2 +- target/ppc/excp_helper.c | 24 target/ppc/internal.h| 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git

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

2022-09-27 Thread Stefan Hajnoczi
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 Hajnoczi wrote: > >> On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé > >> wrote: > >>> > >>> On Tue, Sep 27, 2022 at 11:44:45AM -0400,

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

2022-09-27 Thread Thomas Huth
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 Hajnoczi wrote: On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at

<    1   2   3   4   5   >