s390 private runner CI job timing out

2023-04-05 Thread Peter Maydell
The s390 private runner CI job ubuntu-20.04-s390x-all seems to have started timing out a lot recently. Here's an example where it passed, but with only 53 seconds left on the clock before it would have been killed: https://gitlab.com/qemu-project/qemu/-/jobs/4066136770 It looks like 'make check'

Re: [PATCH] Revert "memory: Optimize replay of guest mapping"

2023-04-05 Thread Peter Maydell
On Tue, 4 Apr 2023 at 23:04, Philippe Mathieu-Daudé wrote: > > On 4/4/23 22:37, Michael S. Tsirkin wrote: > > From: Peter Maydell > > > > This reverts commit 6da24341866fa940fd7d575788a2319514941c77 > > ("memory: Optimize replay of guest mapping"). > > > > This change breaks the mps3-an547 board

Re: [PATCH 09/14] accel: Allocate NVMM vCPU using g_try_FOO()

2023-04-05 Thread Philippe Mathieu-Daudé
On 5/4/23 15:55, Alex Bennée wrote: Philippe Mathieu-Daudé writes: g_malloc0() can not fail. Use g_try_malloc0() instead. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/

Re: [PATCH] linux-user: Fix mips fp64 executables loading

2023-04-05 Thread Jiaxun Yang
> 2023年4月4日 06:21,Daniil Kovalev 写道: > > If a program requires fr1, we should set the FR bit of CP0 control status > register and add F64 hardware flag. The corresponding `else if` branch > statement is copied from the linux kernel sources (see `arch_check_elf` > function > in linux/arch/mips

[PATCH] target/arm: Initialize debug capabilities only once

2023-04-05 Thread Akihiko Odaki
kvm_arm_init_debug() used to be called several times on a SMP system as kvm_arch_init_vcpu() calls it. Move the call to kvm_arch_init() to make sure it will be called only once; otherwise it will overwrite pointers to memory allocated with the previous call and leak it. Fixes: e4482ab7e3 ("target-

Re: [PATCH] tap: fix net_init_tap() return code

2023-04-05 Thread Steven Sistare
On 4/4/2023 6:00 PM, Philippe Mathieu-Daudé wrote: > On 4/4/23 18:00, Steve Sistare wrote: >> When net_init_tap() succeeds for a multi-queue device, it returns a >> non-zero ret=1 code to its caller, because of this code where ret becomes > > Indeed g_unix_set_fd_nonblocking() returns TRUE on su

Re: [PATCH] igb: fix VFs traffic with IOMMU

2023-04-05 Thread Akihiko Odaki
Hi, I believe this problem is already addressed with commit f4fdaf009cc85e95a00aba47a6b5b9df920d51c4. Regards, Akihiko Odaki On 2023/04/05 23:23, Tomasz Dzieciol wrote: Use proper PCI device for net_tx_pkt provided to net_tx_pkt_add_raw_fragment. Signed-off-by: Tomasz Dzieciol --- hw/net

Re: [PATCH 2/2] Add missing Linux kernel headers.

2023-04-05 Thread Cornelia Huck
On Wed, Apr 05 2023, David Turner wrote: > On Wed, Apr 5, 2023 at 3:06 PM Cornelia Huck wrote: > >> On Wed, Apr 05 2023, "David 'Digit' Turner" wrote: >> > The script has then been run against the official >> > 6.2.8 kernel source tree (current stable release), >> > which explains why comments

Re: [PATCH 1/2] net: TX SCTP checksum offload

2023-04-05 Thread Akihiko Odaki
On 2023/04/05 23:23, Tomasz Dzieciol wrote: Modern NICs are able to offload SCTP checksumming. SCTP calculates checksums differently than TCP / UDP: no pseudo-header and CRC32C algorithm are used. Hi, I actually have some patches to add SCTP checksumming for igb, which are currently under tes

[PATCH 06/10] target/arm: Reduce QMP header pressure by not including 'kvm_arm.h'

2023-04-05 Thread Philippe Mathieu-Daudé
We only need "sysemu/kvm.h" for kvm_enabled() and "cpu.h" for the QOM type definitions (TYPE_ARM_CPU). Avoid including the heavy "kvm_arm.h" header. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/arm-qmp-cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/ar

[PATCH 03/10] hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers

2023-04-05 Thread Philippe Mathieu-Daudé
"kvm_arm.h" contains external and internal prototype declarations. Files under the hw/ directory should only access the KVM external API. In order to avoid machine / device models to include "kvm_arm.h" simply to get the QOM GIC/ITS class name, un-inline each class name getter to the proper device

[PATCH 04/10] hw/intc/arm_gic: Rename 'first_cpu' argument

2023-04-05 Thread Philippe Mathieu-Daudé
"hw/core/cpu.h" defines 'first_cpu' as QTAILQ_FIRST_RCU(&cpus). arm_gic_common_reset_irq_state() calls its second argument 'first_cpu', producing a build failure when "hw/core/cpu.h" is included: hw/intc/arm_gic_common.c:238:68: warning: omitting the parameter name in a function definition is

[PATCH 01/10] sysemu/kvm: Remove unused headers

2023-04-05 Thread Philippe Mathieu-Daudé
All types used are forward-declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index cc6c678ed8..7902acdfd9 100644 --- a/include/sysemu/kvm.h +++ b/include/

[PATCH 00/10] accel/kvm: Spring cleaning

2023-04-05 Thread Philippe Mathieu-Daudé
Misc KVM-related cleanup patches split from a bigger "extract KVM specific fields from CPUState" series. Philippe Mathieu-Daudé (10): sysemu/kvm: Remove unused headers accel/kvm: Declare kvm_direct_msi_allowed in stubs hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers hw/intc/arm_gi

[PATCH 05/10] hw/arm/sbsa-ref: Include missing 'sysemu/kvm.h' header

2023-04-05 Thread Philippe Mathieu-Daudé
"sysemu/kvm.h" is indirectly pulled in. Explicit its inclusion to avoid when refactoring include/: hw/arm/sbsa-ref.c:693:9: error: implicit declaration of function 'kvm_enabled' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (kvm_enabled()) { ^ Signed-off-by: Philip

[PATCH 07/10] target/arm: Restrict KVM-specific fields from ArchCPU

2023-04-05 Thread Philippe Mathieu-Daudé
These fields shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c097cae988..efd1b010d5 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@

[RFC PATCH 09/10] target/riscv: Restrict KVM-specific fields from ArchCPU

2023-04-05 Thread Philippe Mathieu-Daudé
These fields shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé --- RFC: The migration part is likely invalid... kvmtimer_needed() is defined in target/riscv/machine.c as static bool kvmtimer_needed(void *opaque) { return kvm_enabled(); } which d

[PATCH 02/10] accel/kvm: Declare kvm_direct_msi_allowed in stubs

2023-04-05 Thread Philippe Mathieu-Daudé
Avoid when calling kvm_direct_msi_enabled() from arm_gicv3_its_common.c the next commit: Undefined symbols for architecture arm64: "_kvm_direct_msi_allowed", referenced from: _its_class_name in hw_intc_arm_gicv3_its_common.c.o ld: symbol(s) not found for architecture arm64 Signed-

[PATCH 08/10] target/ppc: Restrict KVM-specific field from ArchCPU

2023-04-05 Thread Philippe Mathieu-Daudé
The 'kvm_sw_tlb' field shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu.h| 2 ++ target/ppc/mmu_common.c | 4 2 files changed, 6 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 557d736dab..0ec3957397 1006

[PATCH 10/10] hw/s390x: Rename pv.c -> pv-kvm.c

2023-04-05 Thread Philippe Mathieu-Daudé
Protected Virtualization is specific to KVM. Rename the file as 'pv-kvm.c' to make this clearer. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/{pv.c => pv-kvm.c} | 0 hw/s390x/meson.build| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/s390x/{pv.c => pv-kvm.c} (100%

[PATCH] hw/display/sm501: Remove unneeded increment from loop

2023-04-05 Thread BALATON Zoltan
As Coverity points out (CID 1508621) the calculation to increment i in the fill fallback loop is ineffective as it is overwritten in next statement. This was left there by mistake from a previous version but is not needed in the current approach so remove the superfluous increment statement. Repor

[PATCH 2/2] accel/stubs: Build HAX/KVM/XEN stubs once

2023-04-05 Thread Philippe Mathieu-Daudé
These stub files don't require any target-specific bit. (TCG stubs do, so this file is left in specific_ss[]). Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/meson.build | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/stubs/meson.build b/accel/stubs/me

[PATCH 1/2] accel/stubs: Remove kvm_flush_coalesced_mmio_buffer() stub

2023-04-05 Thread Philippe Mathieu-Daudé
kvm_flush_coalesced_mmio_buffer() is only called from qemu_flush_coalesced_mmio_buffer() where it is protected by a kvm_enabled() check. When KVM is not available, the call is elided, there is no need for a stub definition. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 4 ---

[PATCH 0/2] accel/stubs: Build HAX/KVM/XEN stubs once

2023-04-05 Thread Philippe Mathieu-Daudé
TCG stubs could become target agnostic but I'm leaving that for later. Based-on: <20230405160454.97436-1-phi...@linaro.org> Philippe Mathieu-Daudé (2): accel/stubs: Remove kvm_flush_coalesced_mmio_buffer() stub accel/stubs: Build HAX/KVM/XEN stubs once accel/stubs/kvm-stub.c | 4 acc

[PATCH 1/3] aio-posix: disable polling after aio_disable_external()

2023-04-05 Thread Paolo Bonzini
Polling can cause external requests to be picked up even if the AioContext is not looking at external file descriptors. Disable all polling between aio_disable_external() and aio_enable_external(), since aio_set_fd_poll() does not distinguish external handlers from those that in principle could ru

[PATCH 0/3] block-backend: avoid deadlocks due to early queuing of request

2023-04-05 Thread Paolo Bonzini
IDE TRIM is a BB user that wants to elevate its BB's in-flight counter for a "macro" operation that consists of several actual I/O operations. Each of those operations is individually started and awaited. It does this so that blk_drain() will drain the whole TRIM, and not just a single one of the

[PATCH 2/3] block-backend: make global properties write-once

2023-04-05 Thread Paolo Bonzini
The three global properties allow_aio_context_change, disable_request_queuing and allow_write_before_eof are always set for the whole life of a BlockBackend. Make this clear by removing the possibility of clearing them, and by marking the corresponding function GLOBAL_STATE_CODE(). Signed-off-by:

[RFC PATCH 1/2] accel/kvm: Extract 'sysemu/kvm_irq.h' from 'sysemu/kvm.h'

2023-04-05 Thread Philippe Mathieu-Daudé
"sysemu/kvm.h" header is meant to contain the 'external' KVM API accessed by all the code base. KVM *internal* API aims to reside in "sysemu/kvm_int.h", accessible by files in accel/kvm/ and each target/ implementation. Hardware models should only access the external API. "sysemu/kvm.h" is quite

[RFC PATCH 2/2] accel/kvm: Declare kvm_arch_irqchip_create() in 'sysemu/kvm_int.h'

2023-04-05 Thread Philippe Mathieu-Daudé
kvm_arch_irqchip_create() is irrelevant for hardware device models (files under the hw/ directory), it is meant for the generic KVM code (files in accel/kvm/) and the target implementation (files under target/ directory). "sysemu/kvm.h" header is meant to contain the 'external' KVM API. Move kvm_a

[PATCH] block-backend: delay application of request queuing

2023-04-05 Thread Paolo Bonzini
Request queuing prevents new requests from being submitted to the BlockDriverState, not allowing them to start instead of just letting them complete before bdrv_drained_begin() returns. The reason for this was to ensure progress and avoid a livelock in blk_drain(), blk_drain_all_begin(), bdrv_drai

[RFC PATCH 0/2] accel/kvm: Extract 'sysemu/kvm_irq.h' from 'sysemu/kvm.h'

2023-04-05 Thread Philippe Mathieu-Daudé
Posted individually because it is modifying a lot of files. RFC: this might not be the best API cut, but "sysemu/kvm.h" is a mixed bag hard to sort... Based-on: <20230405160454.97436-1-phi...@linaro.org> Philippe Mathieu-Daudé (2): accel/kvm: Extract 'sysemu/kvm_irq.h' from 'sysemu/kvm.h'

[PATCH 3/3] block-backend: delay application of request queuing

2023-04-05 Thread Paolo Bonzini
Request queuing prevents new requests from being submitted to the BlockDriverState, not allowing them to start instead of just letting them complete before bdrv_drained_begin() returns. The reason for this was to ensure progress and avoid a livelock in blk_drain(), blk_drain_all_begin(), bdrv_drai

Re: [PATCH] hw/display/sm501: Remove unneeded increment from loop

2023-04-05 Thread Philippe Mathieu-Daudé
On 5/4/23 17:57, BALATON Zoltan wrote: As Coverity points out (CID 1508621) the calculation to increment i in the fill fallback loop is ineffective as it is overwritten in next statement. This was left there by mistake from a previous version but is not needed in the current approach so remove th

Re: [PATCH 2/2] Add missing Linux kernel headers.

2023-04-05 Thread Peter Maydell
On Wed, 5 Apr 2023 at 16:55, Cornelia Huck wrote: > > On Wed, Apr 05 2023, David Turner wrote: > > > On Wed, Apr 5, 2023 at 3:06 PM Cornelia Huck wrote: > > > >> On Wed, Apr 05 2023, "David 'Digit' Turner" wrote: > >> > The script has then been run against the official > >> > 6.2.8 kernel sourc

[PATCH] Hexagon (target/hexagon) Add overrides for count trailing zeros/ones

2023-04-05 Thread Taylor Simpson
The following instructions are overriden S2_ct0Count trailing zeros S2_ct1Count trailing ones S2_ct0p Count trailing zeros (register pair) S2_ct1p Count trailing ones (register pair) These instructions are not handled by idef-parser becau

[PATCH] Hexagon (target/hexagon) Merge arguments to probe_pkt_scalar_hvx_stores

2023-04-05 Thread Taylor Simpson
Reducing the number of arguments reduces the overhead of the helper call Signed-off-by: Taylor Simpson --- target/hexagon/helper.h| 4 ++-- target/hexagon/translate.h | 1 + target/hexagon/op_helper.c | 4 ++-- target/hexagon/translate.c | 10 +- 4 files changed, 10 insertions(+),

[PATCH] Hexagon (target/hexagon) Updates to USR should use get_result_gpr

2023-04-05 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h| 4 +- target/hexagon/genptr.h | 10 ++--- target/hexagon/macros.h | 8 target/hexagon/genptr.c | 49 ++--- target/hexagon/idef-parser/

[PATCH 1/3] Fix libvhost-user.c compilation.

2023-04-05 Thread David 'Digit' Turner
The source file uses VIRTIO_F_VERSION_1 which is not defined by on Debian 10. The system-provided which does not include the macro definition is included through , so fix the issue by including the standard-headers version before that. Signed-off-by: David 'Digit' Turner --- subprojects/libvh

[PATCH 2/3] update-linux-headers.sh: Add missing kernel headers.

2023-04-05 Thread David 'Digit' Turner
Add , used by hw/display/virtio-gpu-udmabuf.c Add , used by qga/commands-posix.c Add used by kvm-all.c, which requires the _BITUL() macro definition to be available. Without these, QEMU will not compile on Debian 10 systems. Signed-off-by: David 'Digit' Turner --- scripts/update-linux-headers.

[PATCH v2] Fix QEMU compilation on Debian 10

2023-04-05 Thread David 'Digit' Turner
QEMU does not compile on an old Debian 10 system for the following reasons: - Several sources include recent kernel headers that are not provided by this system, and not listed in linux-headers/ - The libvhost-user.c source file ends up including a system kernel header, instead of the up-to

[PATCH 3/3] Update linux headers to v6.3rc5

2023-04-05 Thread David 'Digit' Turner
commit 7e364e56293bb98cae1b55fd835f5991c4e96e7d Signed-off-by: David 'Digit' Turner --- include/standard-headers/drm/drm_fourcc.h| 12 ++ include/standard-headers/linux/ethtool.h | 48 +++- include/standard-headers/linux/fuse.h| 45 +++- include/standard-headers/linux/

Re: [PATCH 2/2] Add missing Linux kernel headers.

2023-04-05 Thread David Turner
On Wed, Apr 5, 2023 at 6:41 PM Peter Maydell wrote: > On Wed, 5 Apr 2023 at 16:55, Cornelia Huck wrote: > > > > On Wed, Apr 05 2023, David Turner wrote: > > > > > On Wed, Apr 5, 2023 at 3:06 PM Cornelia Huck > wrote: > > > > > >> On Wed, Apr 05 2023, "David 'Digit' Turner" wrote: > > >> > The

Re: [PATCH 05/10] hw/arm/sbsa-ref: Include missing 'sysemu/kvm.h' header

2023-04-05 Thread Leif Lindholm
On Wed, Apr 05, 2023 at 18:04:49 +0200, Philippe Mathieu-Daudé wrote: > "sysemu/kvm.h" is indirectly pulled in. Explicit its > inclusion to avoid when refactoring include/: > > hw/arm/sbsa-ref.c:693:9: error: implicit declaration of function > 'kvm_enabled' is invalid in C99 [-Werror,-Wimplicit

[PATCH] Hexagon (target/hexagon) Remove redundant/unused macros

2023-04-05 Thread Taylor Simpson
Remove the following macros (remnants of the old generator design) READ_REG READ_PREG WRITE_RREG WRITE_PREG Modify macros that rely on the above The following are unused READ_IREG fGET_FIELD fSET_FIELD fREAD_P3 fREAD_NPC fWRITE_LC0 fWRITE_LC1 Signed-off

[ANNOUNCE] QEMU 8.0.0-rc3 is now available

2023-04-05 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fourth release candidate for the QEMU 8.0 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu.org/qemu-8.0.0-rc3.tar.xz http://download.qemu

Re: QEMU stable 7.2.1

2023-04-05 Thread Michael Roth
On Wed, Apr 05, 2023 at 05:16:33PM +0300, Michael Tokarev wrote: > 05.04.2023 16:58, Michael Roth wrote: > > On Wed, Apr 05, 2023 at 02:54:47PM +0300, Michael Tokarev wrote: > > > So let it be, with a delay of about a week. > > > > > > Since no one from the qemu team replied to my final-release st

[PATCH for-8.1] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-04-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 137bdc5159..47940fd85e 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -322,7

Re: [PATCH v3 0/4] target/riscv: Simplification for RVH related check and code style fix

2023-04-05 Thread Daniel Henrique Barboza
On 4/5/23 05:58, Weiwei Li wrote: This patchset tries to simplify the RVH related check and fix some code style problems, such as problems for indentation, multi-line comments and lines with over 80 characters. The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-virtf

Re: QEMU stable 7.2.1

2023-04-05 Thread Peter Maydell
On Wed, 5 Apr 2023 at 19:58, Michael Roth wrote: > One thing I forgot to mention previously is updating the wiki with the > release schedule once you have an idea of when you plan to push your tags. On a slight tangent, do you have the process you use for releases (main as well as stable-branch o

[PATCH] Hexagon (tests/tcg/hexagon) Move HVX test infra to header file

2023-04-05 Thread Taylor Simpson
This will facilitate adding additional tests in separate .c files Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/hvx_misc.h | 178 ++ tests/tcg/hexagon/hvx_misc.c | 160 +-- tests/tcg/hexagon/Makefile.target | 1 + 3 files chan

Re: [PATCH 0/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-05 Thread Stefan Hajnoczi
On Fri, Mar 17, 2023 at 06:50:15PM +0100, Hanna Czenczek wrote: > RFC: > https://lists.nongnu.org/archive/html/qemu-block/2023-03/msg00446.html > > Thanks for the feedback on the RFC! Sounds like we agree that this is > the right way to fix the bug. > > Here in v1, I’ve followed Vladimir’s sugge

Re: [PATCH-for-8.1] block/dmg: Declare a type definition for DMG uncompress function

2023-04-05 Thread Stefan Hajnoczi
On Mon, Mar 20, 2023 at 04:26:10PM +0100, Philippe Mathieu-Daudé wrote: > Introduce the BdrvDmgUncompressFunc type defintion. To emphasis > dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions, > declare them using this new typedef. > > Signed-off-by: Philippe Mathieu-Daudé > ---

Re: [PATCH 08/10] target/ppc: Restrict KVM-specific field from ArchCPU

2023-04-05 Thread Daniel Henrique Barboza
On 4/5/23 13:04, Philippe Mathieu-Daudé wrote: The 'kvm_sw_tlb' field shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Daniel Henrique Barboza target/ppc/cpu.h| 2 ++ target/ppc/mmu_common.c | 4 2 files changed, 6

Re: [PATCH v8 1/4] file-posix: add tracking of the zone write pointers

2023-04-05 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 11:32:36PM +0800, Sam Li wrote: > Since Linux doesn't have a user API to issue zone append operations to > zoned devices from user space, the file-posix driver is modified to add > zone append emulation using regular writes. To do this, the file-posix > driver tracks the wp

Re: [PATCH v8 2/4] block: introduce zone append write for zoned devices

2023-04-05 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 11:32:37PM +0800, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of the call may point at > any position within the

Re: [RFC PATCH 09/10] target/riscv: Restrict KVM-specific fields from ArchCPU

2023-04-05 Thread Daniel Henrique Barboza
On 4/5/23 13:04, Philippe Mathieu-Daudé wrote: These fields shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé --- RFC: The migration part is likely invalid... kvmtimer_needed() is defined in target/riscv/machine.c as static bool kvmtimer_needed(void

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-04-05 Thread Mark Cave-Ayland
On 04/04/2023 15:00, Thomas Huth wrote: On 05/02/2023 23.12, Mark Cave-Ayland wrote: On 30/01/2023 20:45, Alex Bennée wrote: Daniel P. Berrangé writes: On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: Testing 32-bit host OS

Re: QEMU stable 7.2.1

2023-04-05 Thread Michael Roth
On Wed, Apr 05, 2023 at 01:57:20PM -0500, Michael Roth wrote: > On Wed, Apr 05, 2023 at 05:16:33PM +0300, Michael Tokarev wrote: > > 05.04.2023 16:58, Michael Roth wrote: > > > On Wed, Apr 05, 2023 at 02:54:47PM +0300, Michael Tokarev wrote: > > > > So let it be, with a delay of about a week. > > >

Re: [PATCH for-8.1] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-04-05 Thread Mark Cave-Ayland
On 05/04/2023 19:59, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 137bdc5159..47940fd85e 100644 --- a/target/sparc/t

[PATCH 04/16] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c

2023-04-05 Thread Warner Losh
Move the system call table, and FreeBSD helper routines out of strace.c. We do not support multiple BSD-types in one binary, so simplify things by moving it. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 19 +++ bsd-user/qemu.h | 5 - bsd-user/

[PATCH 02/16] bsd-user: Ifdef a few MAP_ constants for NetBSD

2023-04-05 Thread Warner Losh
MAP_GUARD, MAP_EXCL, and MAP_NOCORE are FreeBSD only. Add back the ifdefs that I removed in 36d5d891559f (but only these ifdefs, the rest of the commit is not reverted). Signed-off-by: Warner Losh --- bsd-user/mmap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/bsd-user/mmap.c

[PATCH 14/16] bsd-user: Implment core dumps

2023-04-05 Thread Warner Losh
From: Stacey Son Bring in the code that was originally copied from linxu-user/elfload.c and moved to elfcore.c. This code then removed the Linux specific bits, replacing them with FreeBSD specific bits. The commit history for this is not at all what we'd like (it was done in one go by sson in 227

[PATCH 05/16] bsd-user: Remove NetBSD specific syscall printing

2023-04-05 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to netbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17 - 2 files changed, 22 deletions(-) diff --git a/bsd-

[PATCH 15/16] bsd-user: Add SIGSYS to core dump signals.

2023-04-05 Thread Warner Losh
SIGSYS creates a core by default if uncaught. Follow that here. Sort with the same order as is in the kernel. Signed-off-by: Warner Losh --- bsd-user/signal.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index f4e078ee1da

[PATCH 03/16] bsd-user: Cleanup style.

2023-04-05 Thread Warner Losh
The only diffs between bsd-user fork and qemu upstream is style. Make mmap.c pass checkpatch.pl. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 91 - 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.

[PATCH 10/16] bsd-user: Implmenet do_sysctl_kern_getprocs

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_getprocs to retrieve proc info from the kernel. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 165 +- bsd-user/qemu.h | 3 + 2 files changed, 167 insertions(+), 1 d

[PATCH 01/16] bsd-user: Make print_* public

2023-04-05 Thread Warner Losh
Make these functions public. Due to coming restructuring, we'll need to call these from *bsd/os-syscall.c. Add declarations to qemu.h. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 20 bsd-user/strace.c | 29 + 2 files changed, 33 insertions(

[PATCH 09/16] bsd-user: h2g_rusage

2023-04-05 Thread Warner Losh
From: Stacey Son Converts host's rusage to the guest's rusage. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-proc.c | 48 bsd-user/meson.build | 1 + bsd-user/qemu-bsd.h | 30 +++ 3 files changed,

[PATCH 06/16] bsd-user: Remove OpenBSD specific syscall printing

2023-04-05 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to openbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 25 - 2 files changed, 30 deletions(-) diff --g

[PATCH 13/16] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path

2023-04-05 Thread Warner Losh
From: Stacey Son Use the recently committed conversion routines to implement all the kern.proc flavors, except for the full path (the prereqs of which aren't yet in qemu-project's master branch). Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 35 +

[PATCH 16/16] bsd-user: Implement SIGSYS on arm

2023-04-05 Thread Warner Losh
When a system call returns ENOSYS, send a SIGSYS to the process (to generate a core dump). Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 8 1 file changed, 8 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index 517d0087644..

[PATCH 08/16] bsd-user: Remove useless mmap definitions

2023-04-05 Thread Warner Losh
On BSD, all architectures have the same mmap flags. Since we don't translate the flags, we don't need these defines here. We can't cross-run different BSD binaries. Signed-off-by: Warner Losh --- bsd-user/syscall_defs.h | 36 1 file changed, 36 deletions(-)

[PATCH 00/16] bsd-user 2023 Q2 first batch

2023-04-05 Thread Warner Losh
This series is a number of misc cleanups. First, this replaces my plans to remove netbsd and openbsd code entirely. I've been in contact with the NetBSD folks that would like to make things work. The plan is that I'll not remove it in qemu-project, and restore them in bsd-user fork. These changes

[PATCH 07/16] bsd-user: Move system call include to os-syscall.h

2023-04-05 Thread Warner Losh
Move the include of the system calls to os-syscall.h. Include that from syscall_defs.h. Use target_time_t and target_suseconds_t instead of the variant that has _freebsd_ in the name. Define these for OpenBSD and NetBSD based on comments in the file. Signed-off-by: Warner Losh --- bsd-user/freeb

[PATCH 12/16] bsd-user: Implement do_sysctl_kern_proc_vmmap

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_vmmap. This pulls kern.proc.vmmap out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 115 ++ bsd-user/qemu.h

[PATCH 11/16] bsd-user: Implement do_sysctl_kern_proc_filedesc

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_filedesc. This pulls kern.proc.filedesc out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 193 ++ bsd-user/qemu.h

Re: [RFC PATCH v3 1/2] mm: restrictedmem: Allow userspace to specify mount for memfd_restricted

2023-04-05 Thread Ackerley Tng
Thanks again for your review! Christian Brauner writes: On Tue, Apr 04, 2023 at 03:53:13PM +0200, Christian Brauner wrote: On Fri, Mar 31, 2023 at 11:50:39PM +, Ackerley Tng wrote: > > ... > > -SYSCALL_DEFINE1(memfd_restricted, unsigned int, flags) > +static int restrictedmem_create(struc

Re: [PATCH 0/2] target/arm: KVM Aarch32 spring cleaning

2023-04-05 Thread Richard Henderson
On 4/5/23 03:08, Philippe Mathieu-Daudé wrote: Remove unused KVM/Aarch32 definitions. Philippe Mathieu-Daudé (2): target/arm: Remove KVM AArch32 CPU definitions hw/arm/virt: Restrict Cortex-A7 check to TCG target/arm/kvm-consts.h | 9 +++-- hw/arm/virt.c | 2 ++ target/a

Re: [PATCH] Hexagon (target/hexagon) Add overrides for count trailing zeros/ones

2023-04-05 Thread Richard Henderson
On 4/5/23 09:42, Taylor Simpson wrote: The following instructions are overriden S2_ct0Count trailing zeros S2_ct1Count trailing ones S2_ct0p Count trailing zeros (register pair) S2_ct1p Count trailing ones (register pair) These inst

Re: [PATCH] Hexagon (target/hexagon) Remove redundant/unused macros

2023-04-05 Thread Richard Henderson
On 4/5/23 11:30, Taylor Simpson wrote: Remove the following macros (remnants of the old generator design) READ_REG READ_PREG WRITE_RREG WRITE_PREG Modify macros that rely on the above The following are unused READ_IREG fGET_FIELD fSET_FIELD fREAD_P3 f

Re: [RFC PATCH v3 1/2] mm: restrictedmem: Allow userspace to specify mount for memfd_restricted

2023-04-05 Thread Ackerley Tng
Thanks for your review! David Hildenbrand writes: On 01.04.23 01:50, Ackerley Tng wrote: ... diff --git a/include/uapi/linux/restrictedmem.h b/include/uapi/linux/restrictedmem.h new file mode 100644 index ..22d6f2285f6d --- /dev/null +++ b/include/uapi/linux/restrictedmem

Re: [RFC PATCH v3 1/2] mm: restrictedmem: Allow userspace to specify mount for memfd_restricted

2023-04-05 Thread Ackerley Tng
Thanks for reviewing these patches! "Kirill A. Shutemov" writes: On Fri, Mar 31, 2023 at 11:50:39PM +, Ackerley Tng wrote: ... +static int restrictedmem_create_on_user_mount(int mount_fd) +{ + int ret; + struct fd f; + struct vfsmount *mnt; + + f = fdget_raw

Re: [PATCH for-8.1] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-04-05 Thread Richard Henderson
On 4/5/23 14:09, Mark Cave-Ayland wrote: I can certainly give this an R-B, however I'm fairly sure I tried this a couple of years back and found that it introduced random hangs on qemu-system-sparc64 :/. Have you seen any issues in the relevant avocado tests with this patch applied? No issues.

Re: [PATCH v3 0/4] target/riscv: Simplification for RVH related check and code style fix

2023-04-05 Thread Alistair Francis
On Wed, Apr 5, 2023 at 6:59 PM Weiwei Li wrote: > > This patchset tries to simplify the RVH related check and fix some code style > problems, such as problems for indentation, multi-line comments and lines > with over 80 characters. > > The port is available here: > https://github.com/plctlab/pl

Re: [PATCH v3 01/20] target/riscv: sync env->misa_ext* with cpu->cfg in realize()

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:29 AM Daniel Henrique Barboza wrote: > > When riscv_cpu_realize() starts we're guaranteed to have cpu->cfg.ext_N > properties updated. The same can't be said about env->misa_ext*, since > the user might enable/disable MISA extensions in the command line, and > env->misa_e

Re: [PATCH v3 02/20] target/riscv: remove MISA properties from isa_edata_arr[]

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:33 AM Daniel Henrique Barboza wrote: > > The code that disables extensions if there's a priv version mismatch > uses cpu->cfg.ext_N properties to do its job. > > We're aiming to not rely on cpu->cfg.ext_N props for MISA bits. Split > the MISA related verifications in a ne

Re: [PATCH v3 03/20] target/riscv/cpu.c: remove 'multi_letter' from isa_ext_data

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:32 AM Daniel Henrique Barboza wrote: > > We don't have MISA extensions in isa_edata_arr[] anymore. Remove the > redundant 'multi_letter' field from isa_ext_data. > > Suggested-by: Weiwei Li > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alista

Re: [PATCH v3 04/20] target/riscv: introduce riscv_cpu_add_misa_properties()

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:29 AM Daniel Henrique Barboza wrote: > > Ever since RISCVCPUConfig got introduced users are able to set CPU extensions > in the command line. User settings are reflected in the cpu->cfg object > for later use. These properties are used in the target/riscv/cpu.c code, > mo

Re: [PATCH v3 05/20] target/riscv: remove cpu->cfg.ext_a

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "a" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVA. Instances of cpu->cfg.ext_a and similar are > replaced with riscv_has_ext(env, RVA). > > Remove the old "a" property and 'ext_a' from RISCV

Re: [PATCH v3 07/20] target/riscv: remove cpu->cfg.ext_d

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "d" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVD. Instances of cpu->cfg.ext_d and similar are > replaced with riscv_has_ext(env, RVD). > > Remove the old "d" property and 'ext_d' from RISCV

Re: [PATCH v3 06/20] target/riscv: remove cpu->cfg.ext_c

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "c" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVC. Instances of cpu->cfg.ext_c and similar are > replaced with riscv_has_ext(env, RVC). > > Remove the old "c" property and 'ext_c' from RISCV

Re: [PATCH v3 08/20] target/riscv: remove cpu->cfg.ext_f

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:30 AM Daniel Henrique Barboza wrote: > > Create a new "f" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVF. Instances of cpu->cfg.ext_f and similar are > replaced with riscv_has_ext(env, RVF). > > Remove the old "f" property and 'ext_f' from RISCV

Re: [PATCH v3 09/20] target/riscv: remove cpu->cfg.ext_i

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "i" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVI. Instances of cpu->cfg.ext_i and similar are > replaced with riscv_has_ext(env, RVI). > > Remove the old "i" property and 'ext_i' from RISCV

Re: [PATCH v3 10/20] target/riscv: remove cpu->cfg.ext_e

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:33 AM Daniel Henrique Barboza wrote: > > Create a new "e" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVE. Instances of cpu->cfg.ext_e and similar are > replaced with riscv_has_ext(env, RVE). > > Remove the old "e" property and 'ext_e' from RISCV

Re: [PATCH v3 11/20] target/riscv: remove cpu->cfg.ext_m

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:33 AM Daniel Henrique Barboza wrote: > > Create a new "m" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVM. Instances of cpu->cfg.ext_m and similar are > replaced with riscv_has_ext(env, RVM). > > Remove the old "m" property and 'ext_m' from RISCV

Re: [PATCH v3 12/20] target/riscv: remove cpu->cfg.ext_s

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:32 AM Daniel Henrique Barboza wrote: > > Create a new "s" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVS. Instances of cpu->cfg.ext_s and similar are > replaced with riscv_has_ext(env, RVS). > > Remove the old "s" property and 'ext_s' from RISCV

Re: [PATCH v3 13/20] target/riscv: remove cpu->cfg.ext_u

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:32 AM Daniel Henrique Barboza wrote: > > Create a new "u" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVU. Instances of cpu->cfg.ext_u and similar are > replaced with riscv_has_ext(env, RVU). > > Remove the old "u" property and 'ext_u' from RISCV

Re: [PATCH v3 14/20] target/riscv: remove cpu->cfg.ext_h

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "h" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVH. Instances of cpu->cfg.ext_h and similar are > replaced with riscv_has_ext(env, RVH). > > Remove the old "h" property and 'ext_h' from RISCV

Re: [PATCH v3 15/20] target/riscv: remove cpu->cfg.ext_j

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:31 AM Daniel Henrique Barboza wrote: > > Create a new "j" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVJ. Instances of cpu->cfg.ext_j and similar are > replaced with riscv_has_ext(env, RVJ). > > Remove the old "j" property and 'ext_j' from RISCV

Re: [PATCH v3 16/20] target/riscv: remove cpu->cfg.ext_v

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 3:33 AM Daniel Henrique Barboza wrote: > > Create a new "v" RISCVCPUMisaExtConfig property that will update > env->misa_ext* with RVV. Instances of cpu->cfg.ext_v and similar are > replaced with riscv_has_ext(env, RVV). > > Remove the old "v" property and 'ext_v' from RISCV

<    1   2   3   >