Re: [PATCH 0/5] accel: Restrict tcg_exec_[un]realizefn() to TCG

2023-10-03 Thread Philippe Mathieu-Daudé
On 15/9/23 21:00, Philippe Mathieu-Daudé wrote: - Add missing accel_cpu_unrealize() - Add AccelClass::[un]realize_cpu handlers - Use tcg_exec_[un]realizefn as AccelClass handlers Philippe Mathieu-Daudé (5): accel: Rename accel_cpu_realizefn() -> accel_cpu_realize() accel: Introduce

[PATCH v4 2/5] softmmu: pass the main loop status to gdb "Wxx" packet

2023-10-03 Thread Clément Chigot
gdb_exit function aims to close gdb sessions and sends the exit code of the current execution. It's being called by qemu_cleanup once the main loop is over. Until now, the exit code sent was always 0. Now that hardware can shutdown this main loop with custom exit codes, these codes must be

[PATCH v4 5/5] gdbstub: replace exit calls with proper shutdown for softmmu

2023-10-03 Thread Clément Chigot
This replaces the exit calls by shutdown requests, ensuring a proper cleanup of Qemu. Features like net/vhost-vdpa.c are expecting qemu_cleanup to be called to remove their last residuals. Signed-off-by: Clément Chigot Reviewed-by: Alistair Francis --- gdbstub/gdbstub.c | 5 +++--

[PATCH v4 0/5] Risc-V/gdb: replace exit calls with proper shutdown

2023-10-03 Thread Clément Chigot
This series replaces some of the call to exit in hardware used by Risc-V boards. Otherwise, the gdb connection can be abruptly disconnected resulting in the last gdb packet "Wxx" being not sent. For the gdbstub modification, gdb_exit calls ensure that the "Wxx" packet is sent before exiting.

Re: [PATCH 0/2] hw/intc/apic: QOM cleanup

2023-10-03 Thread Philippe Mathieu-Daudé
On 15/9/23 18:20, Philippe Mathieu-Daudé wrote: Minor cleanup extracted from a bigger series touching x86_cpu_realizefn(). Philippe Mathieu-Daudé (2): target/i386: Only realize existing APIC device hw/intc/apic: Pass CPU using QOM link property Ping?

[PATCH v5 1/2] migration/vmstate: Introduce vmstate_save_state_with_err

2023-10-03 Thread Tejus GK
Currently, a few code paths exist in the function vmstate_save_state_v, which ultimately leads to a migration failure. However, an update in the current MigrationState for the error description is never done. vmstate.c somehow doesn't seem to allow the use of migrate_set_error due to some

[PATCH v2 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-10-03 Thread Philippe Mathieu-Daudé
None of these target-specific prototypes should be used by user emulation. Remove their declaration there, so we get a compile failure if ever used (instead of having to deal with linker and its possible optimizations, such dead code removal). Suggested-by: Kevin Wolf Signed-off-by: Philippe

[PATCH v2 3/4] target/ppc: Restrict KVM objects to system emulation

2023-10-03 Thread Philippe Mathieu-Daudé
CONFIG_KVM is always FALSE on user emulation, so 'kvm.c' won't be added to ppc_ss[] source set; direcly use the system specific ppc_system_ss[] source set. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 0/4] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-10-03 Thread Philippe Mathieu-Daudé
Since v1: - Addressed Michael review comments, - Added Daniel R-b tag. Implement Kevin's suggestion to remove KVM declarations for user emulation builds, so if KVM prototype are used we directly get a compile failure. Philippe Mathieu-Daudé (4): sysemu/kvm: Restrict

Re: [PATCH 1/2] blockdev: qmp_transaction: harden transaction properties for bitmaps

2023-10-03 Thread Vladimir Sementsov-Ogievskiy
On 19.09.23 13:02, Andrey Zhadchenko wrote: Hi! Thanks for the review On 9/12/23 21:29, Vladimir Sementsov-Ogievskiy wrote: On 04.09.23 11:31, Andrey Zhadchenko wrote: Unlike other transaction commands, bitmap operations do not drain target bds. If we have an IOThread, this may result in

Re: [PATCH RESEND 06/15] ppc: spapr: Implement nested PAPR hcall - H_GUEST_GET_CAPABILITIES

2023-10-03 Thread Cédric Le Goater
On 9/7/23 04:02, Nicholas Piggin wrote: On Wed Sep 6, 2023 at 2:33 PM AEST, Harsh Prateek Bora wrote: This patch implements nested PAPR hcall H_GUEST_GET_CAPABILITIES and also enables registration of nested PAPR hcalls whenever an L0 is launched with cap-nested-papr=true. The common

Re: [PATCH] xlnx-bbram: hw/nvram: Remove deprecated device reset

2023-10-03 Thread Philippe Mathieu-Daudé
Hi Tong, On 3/10/23 07:23, Tong Ho wrote: This change implements the ResettableClass interface for the device. Signed-off-by: Tong Ho --- hw/nvram/xlnx-bbram.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé Since you did this one, do

Re: [PATCH RFC V2 31/37] physmem,gdbstub: Common helping funcs/changes to *unrealize* vCPU

2023-10-03 Thread Philippe Mathieu-Daudé
Hi Salil, On 26/9/23 12:04, Salil Mehta wrote: Supporting vCPU Hotplug for ARM arch also means introducing new functionality of unrealizing the ARMCPU. This requires some new common functions. Defining them as part of architecture independent change so that this code could be reused by other

[PATCH] tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed)

2023-10-03 Thread Philippe Mathieu-Daudé
Commit 18a536f1f8 ("accel/tcg: Always require can_do_io") fixed the GitLab issue #1884: we can now re-enable those tests. This reverts commit f959c3d87ccfa585b105de6964a6261e368cc1da. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 7 ---

[PATCH v5 2/2] migration: Update error description outside migration.c

2023-10-03 Thread Tejus GK
A few code paths exist in the source code,where a migration is marked as failed via MIGRATION_STATUS_FAILED, but the failure happens outside of migration.c In such cases, an error_report() call is made, however the current MigrationState is never updated with the error description, and hence

[PATCH v5 0/2] migration: Update error description outside migration.c

2023-10-03 Thread Tejus GK
Hi everyone, Now that the patchset covering improvements in error descriptions inside migration.c has been reviewed and merged, can this patchset, which covers the same outside of the context of migration.c be reviewed as well. Regards Tejus Changelog: v4: - Rebase on master v3: - Rebase on

[PATCH v2 2/4] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM

2023-10-03 Thread Philippe Mathieu-Daudé
Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 4 target/ppc/kvm-stub.c | 19 --- target/ppc/meson.build | 2 +- 3 files changed,

[PATCH v2 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets

2023-10-03 Thread Philippe Mathieu-Daudé
kvm_get_radix_page_info() is only defined for ppc targets (in target/ppc/kvm.c). The declaration is not useful in other targets, reduce its scope. Rename using the 'kvmppc_' prefix following other declarations from target/ppc/kvm_ppc.h. Suggested-by: Michael Tokarev Signed-off-by: Philippe

Re: [PATCH 0/2] hw/intc/apic: QOM cleanup

2023-10-03 Thread Philippe Mathieu-Daudé
On 3/10/23 08:45, Philippe Mathieu-Daudé wrote: On 15/9/23 18:20, Philippe Mathieu-Daudé wrote: Minor cleanup extracted from a bigger series touching x86_cpu_realizefn(). Philippe Mathieu-Daudé (2):    target/i386: Only realize existing APIC device    hw/intc/apic: Pass CPU using QOM link

[PATCH v4 3/5] hw/misc/sifive_test.c: replace exit calls with proper shutdown

2023-10-03 Thread Clément Chigot
This replaces the exit calls by shutdown requests, ensuring a proper cleanup of Qemu. Otherwise, some connections like gdb could be broken before its final packet ("Wxx") is being sent. This part, being done inside qemu_cleanup function, can be reached only when the main loop exits after a

[PATCH v4 4/5] hw/char: riscv_htif: replace exit calls with proper shutdown

2023-10-03 Thread Clément Chigot
This replaces the exit calls by shutdown requests, ensuring a proper cleanup of Qemu. Otherwise, some connections like gdb could be broken before its final packet ("Wxx") is being sent. This part, being done inside qemu_cleanup function, can be reached only when the main loop exits after a

[PATCH v4 1/5] softmmu: add means to pass an exit code when requesting a shutdown

2023-10-03 Thread Clément Chigot
As of now, the exit code was either EXIT_FAILURE when a panic shutdown was requested or EXIT_SUCCESS otherwise. However, some hardware could want to pass more complex exit codes. Thus, introduce a new shutdown request function allowing that. Signed-off-by: Clément Chigot Reviewed-by: Alistair

[PATCH v3] virtio: add VIRTQUEUE_ERROR QAPI event

2023-10-03 Thread Vladimir Sementsov-Ogievskiy
For now we only log the vhost device error, when virtqueue is actually stopped. Let's add a QAPI event, which makes possible: - collect statistics of such errors - make immediate actions: take core dumps or do some other debugging - inform the user through a management API or UI, so that (s)he

Re: [PATCH RESEND 08/15] ppc: spapr: Implement nested PAPR hcall - H_GUEST_CREATE

2023-10-03 Thread Harsh Prateek Bora
On 9/7/23 07:58, Nicholas Piggin wrote: On Wed Sep 6, 2023 at 2:33 PM AEST, Harsh Prateek Bora wrote: This hcall is used by L1 to indicate to L0 that a new nested guest needs to be created and therefore necessary resource allocation shall be made. The L0 uses a hash table for nested guest

Re: [PATCH v2 4/5] ramfb: make migration conditional

2023-10-03 Thread Cédric Le Goater
On 10/2/23 22:38, Alex Williamson wrote: On Mon, 2 Oct 2023 21:41:55 +0200 Laszlo Ersek wrote: On 10/2/23 21:26, Alex Williamson wrote: On Mon, 2 Oct 2023 20:24:11 +0200 Laszlo Ersek wrote: On 10/2/23 16:41, Alex Williamson wrote: On Mon, 2 Oct 2023 15:38:10 +0200 Cédric Le Goater

Re: [PATCH RESEND 14/15] ppc: spapr: Implement nested PAPR hcall - H_GUEST_DELETE

2023-10-03 Thread Harsh Prateek Bora
On 9/7/23 08:01, Nicholas Piggin wrote: On Wed Sep 6, 2023 at 2:33 PM AEST, Harsh Prateek Bora wrote: This hcall is used by L1 to delete a guest entry in L0 or can also be used to delete all guests if needed (usually in shutdown scenarios). I'd squash with at least the create hcall.

Re: [PATCH v2] linux-user: Undo incomplete mmap

2023-10-03 Thread Richard Henderson
On 9/21/23 00:09, Akihiko Odaki wrote: On 2023/09/03 14:39, Akihiko Odaki wrote: When the host page size is greater than the target page size and MAP_FIXED or MAP_FIXED_NOREPLACE is requested, mmap will be done for three parts: start, middle, and end. If a later part of mmap fail, mmap done in

Re: FreeBSD 13.2 installer does not see AHCI devices on aarch64/sbsa-ref and x86-64/q35

2023-10-03 Thread Niklas Cassel
On Tue, Oct 03, 2023 at 08:11:39PM +0300, Michael Tokarev wrote: > 26.09.2023 15:05, Niklas Cassel: > > Hello Marcin, > > > > I will have a look at this. > > Hi Marcin, Hi Niklas! > > Niklas, I remember asking you if the whole thing is okay for the -stable, > and you was a bit unsure about it

Re: [PATCH v3 2/4] hw/cxl: Use switch statements for read and write of cachemem registers

2023-10-03 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 10:34:32AM +0100, Jonathan Cameron wrote: > Establishing that only register accesses of size 4 and 8 can occur > using these functions requires looking at their callers. Make it > easier to see that by using switch statements. > Assertions are used to enforce that the

Re: [PATCH 0/3] vhost: clean up device reset

2023-10-03 Thread Stefan Hajnoczi
On Tue, 3 Oct 2023 at 17:01, Michael S. Tsirkin wrote: > > On Wed, Sep 27, 2023 at 03:27:34PM -0400, Stefan Hajnoczi wrote: > > Stateful vhost devices may need to free resources or clear device state upon > > device reset. The vhost-user protocol has a VHOST_USER_RESET_DEVICE message > > for > >

Re: [PATCH] analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH

2023-10-03 Thread Peter Xu
On Wed, Sep 27, 2023 at 02:32:37PM +0400, Marc-André Lureau wrote: > On Tue, Sep 26, 2023 at 12:19 PM wrote: > > > > From: Marc-André Lureau > > > > Traceback (most recent call last): > > File "scripts/analyze-migration.py", line 605, in > > dump.read(dump_memory = args.memory) > > File

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-10-03 Thread Cédric Le Goater
On 10/3/23 19:03, Michael Tokarev wrote: 22.09.2023 12:38, Cédric Le Goater: On 9/13/23 21:18, Alex Williamson wrote: Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo.  Is there a better solution that what I've proposed? This does fix a

Re: [PATCH] target/m68k: Map FPU exceptions to FPSR register

2023-10-03 Thread Richard Henderson
On 8/2/23 20:52, Keith Packard via wrote: Add helpers for reading/writing the 68881 FPSR register so that changes in floating point exception state can be seen by the application. Call these helpers in pre_load/post_load hooks to synchronize exception state. Signed-off-by: Keith Packard ---

Re: [PATCH 0/5] accel: Restrict tcg_exec_[un]realizefn() to TCG

2023-10-03 Thread Richard Henderson
On 10/2/23 23:44, Philippe Mathieu-Daudé wrote: On 15/9/23 21:00, Philippe Mathieu-Daudé wrote: - Add missing accel_cpu_unrealize() - Add AccelClass::[un]realize_cpu handlers - Use tcg_exec_[un]realizefn as AccelClass handlers Philippe Mathieu-Daudé (5):    accel: Rename accel_cpu_realizefn()

Re: [PATCH v10 01/11] Add virtio-sound device stub

2023-10-03 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Fri, Sep 29, 2023 at 05:08:21PM +0300, Emmanouil Pitsidianakis wrote: >> Add a new VIRTIO device for the virtio sound device id. Functionality >> will be added in the following commits. >> >> Based-on: >>

Re: [PATCH 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-10-03 Thread Stefan Hajnoczi
On Tue, 3 Oct 2023 at 10:40, Michael S. Tsirkin wrote: > > On Tue, Oct 03, 2023 at 09:08:15AM -0400, Stefan Hajnoczi wrote: > > On Tue, 3 Oct 2023 at 08:27, Michael S. Tsirkin wrote: > > > > > > On Mon, Oct 02, 2023 at 05:13:26PM -0400, Stefan Hajnoczi wrote: > > > > One more question: > > > > >

Re: [PATCH v3 11/15] vfio/common: Move VFIO reset handler registration to a group agnostic function

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Zhenzhong Duan Move the reset handler registration/unregistration to a place that is not group specific. vfio_[get/put]_address_space are the best places for that purpose. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan

Re: [PATCH v3 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Note that the migration reduces the following trace "vfio: subchannel %s has already been attached" (featuring cssid.ssid.devid)

[PULL 11/47] target/arm: Remove size and alignment for cpu subclasses

2023-10-03 Thread Richard Henderson
Inherit the size and alignment from TYPE_ARM_CPU. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.c | 3 --- target/arm/cpu64.c | 4 2 files changed, 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b9e09a702d..d48a70c039

[PULL 16/47] accel/tcg: Move can_do_io to CPUNegativeOffsetState

2023-10-03 Thread Richard Henderson
Minimize the displacement to can_do_io, since it may be touched at the start of each TranslationBlock. It fits into other padding within the substructure. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h| 6 ++ accel/dummy-cpus.c

[PULL 44/47] linux-user/hppa: Fix struct target_sigcontext layout

2023-10-03 Thread Richard Henderson
Use abi_ullong not uint64_t so that the alignment of the field and therefore the layout of the struct is correct. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/hppa/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 41/47] accel/tcg: Make cpu-exec-common.c a target agnostic unit

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé cpu_in_serial_context() is not target specific, move it declaration to "internal-common.h" (which we include in the 4 source files modified). Remove the unused "exec/exec-all.h" header from cpu-exec-common.c. There is no more target specific code in this file: make

Re: [PATCH v4 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-10-03 Thread Eugenio Perez Martin
On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: > > Next patches in this series will refactor vhost_vdpa_net_load_cmd() > to iterate through the control commands shadow buffers, allowing QEMU > to send CVQ state load commands in parallel at device startup. > > Considering that QEMU always

Re: [PATCH v2 3/5] hw/i386/apic: Simplify apic_get_class()

2023-10-03 Thread Peter Xu
On Tue, Oct 03, 2023 at 10:27:26AM +0200, Philippe Mathieu-Daudé wrote: > Now than apic_get_class() can not fail, remove its > Error** parameter. It can't return NULL neither, so > simplify x86_cpu_apic_create(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 1/5] hw/intc/apic: Use ERRP_GUARD() in apic_common_realize()

2023-10-03 Thread Peter Xu
On Tue, Oct 03, 2023 at 10:27:24AM +0200, Philippe Mathieu-Daudé wrote: > APICCommonClass::realize() is a DeviceRealize() handler which > take an Error** parameter and can fail. Do not proceed further > on failure. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v6 18/19] linux-user/s390x: Add vdso

2023-10-03 Thread Richard Henderson
On 10/3/23 06:07, Philippe Mathieu-Daudé wrote: +++ b/linux-user/s390x/vdso.ld @@ -0,0 +1,69 @@ +/* + * Linker script for linux x86-64 replacement vdso. + * + * Copyright 2023 Linaro, Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +VERSION { +    LINUX_2.6.29 { +   

[PULL 41/51] bsd-user: Implement mprotect(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182709.4834-14-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 7 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed,

[PULL 18/51] bsd-user: Implement getpriority(2) and setpriority(2).

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-19-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.h | 24 bsd-user/freebsd/os-syscall.c | 8 2 files changed, 32

[PULL 20/51] bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-21-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.c | 181 - bsd-user/main.c| 2 +- bsd-user/qemu.h

[PULL 26/51] bsd-user: Implement fork(2) and vfork(2) system calls.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-27-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 34 ++ bsd-user/freebsd/os-syscall.c

[PULL 45/51] bsd-user: Implement mincore(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-18-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 23 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed, 27

[PATCH v2 0/2] target/m68k: Support semihosting on non-ColdFire targets

2023-10-03 Thread Richard Henderson
Hi Keith, Sorry this has languished for a few months. I wasn't happy with the frobbing done by EXCP_HALT_INSN, and less keen to replicate it with EXCP_BKPT_INSN, so I've re-organized a bit. So far only compile-tested. I guess gcc testing with m68k-elf might exercise libgloss and thence

[PATCH v2 1/2] target/m68k: Perform the semihosting test during translate

2023-10-03 Thread Richard Henderson
Replace EXCP_HALT_INSN by EXCP_SEMIHOSTING. Perform the pre- and post-insn tests during translate, leaving only the actual semihosting operation for the exception. Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 2 +- target/m68k/op_helper.c | 14 ++---

[PATCH v2 2/2] target/m68k: Support semihosting on non-ColdFire targets

2023-10-03 Thread Richard Henderson
According to the m68k semihosting spec: "The instruction used to trigger a semihosting request depends on the m68k processor variant. On ColdFire, "halt" is used; on other processors (which don't implement "halt"), "bkpt #0" may be used." Add support for non-CodeFire processors by matching

[PULL 22/51] bsd-user: Implement execve(2) and fexecve(2) system calls.

2023-10-03 Thread Warner Losh
From: Karim Taha Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-23-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 49 +++

[PULL 00/51] Bsd user mmap patches

2023-10-03 Thread Warner Losh
The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-10-03 07:43:44 -0400) are available in the Git repository at: g...@gitlab.com:bsdimp/qemu.git tags/bsd-user-mmap-pull-request for you

[PULL 09/51] bsd-user: Implement host_to_target_waitstatus conversion.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-10-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.c | 17 + 1 file changed, 17 insertions(+) diff --git

[PULL 29/51] bsd-user: Implement struct target_ipc_perm

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182709.4834-2-kariem.taha...@gmail.com> --- bsd-user/syscall_defs.h | 17 + 1 file changed, 17 insertions(+) diff --git

[PULL 43/51] bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2), minherit(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-16-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 37 +++ bsd-user/freebsd/os-syscall.c | 20 +++

[PULL 14/51] bsd-user: Implement getrlimit(2) and setrlimit(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-15-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.h | 59 +++

[PULL 17/51] bsd-user: Add stubs for profil(2), ktrace(2), utrace(2) and ptrace(2).

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-18-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.h | 28 bsd-user/freebsd/os-syscall.c | 16

[PULL 11/51] bsd-user: Implement getgroups(2) and setgroups(2) system calls.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-12-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.h | 44 +++ bsd-user/freebsd/os-syscall.c | 9 +++ 2 files changed,

[PULL 04/51] bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-5-kariem.taha...@gmail.com> --- bsd-user/qemu.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/bsd-user/qemu.h

[PULL 01/51] bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, and fix RLIM_INFINITY

2023-10-03 Thread Warner Losh
From: Karim Taha RLIM_INFINITY on FreeBSD, OpenBSD and NetBSD has value of ~(1<<63), caculated one way or another. Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-2-kariem.taha...@gmail.com> ---

[PULL 23/51] bsd-user: Implement wait4(2) and wait6(2) system calls.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-24-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 84 +++ bsd-user/freebsd/os-syscall.c | 15 +++ 2 files changed,

[PULL 30/51] bsd-user: Implement struct target_shmid_ds

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182709.4834-3-kariem.taha...@gmail.com> --- bsd-user/syscall_defs.h | 20 1 file changed, 20 insertions(+) diff --git

[PULL 15/51] bsd-user: Implement several get/set system calls:

2023-10-03 Thread Warner Losh
From: Stacey Son getpid(2), getppid(2), getpgrp(2) setreuid(2), setregid(2) getuid(2), geteuid(2), getgid(2), getegid(2), getpgid(2) setuid(2), seteuid(2), setgid(2), setegid(2), setpgid(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner

[PULL 47/51] bsd-user: Implement shm_open(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Co-authored-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-20-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 25 +

[PULL 25/51] bsd-user: Implement pdgetpid(2) and the undocumented setugid.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-26-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 23 +++ bsd-user/freebsd/os-syscall.c | 8

[PULL 44/51] bsd-user: Implment madvise(2) to match the linux-user implementation.

2023-10-03 Thread Warner Losh
From: Karim Taha Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-17-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 53 +++ bsd-user/freebsd/os-syscall.c | 4 +++ bsd-user/syscall_defs.h | 2 ++ 3

Re: [PATCH v3 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-03 Thread Matthew Rosato
On 10/3/23 6:14 AM, Eric Auger wrote: > Let the vfio-ccw device use vfio_attach_device() and > vfio_detach_device(), hence hiding the details of the used > IOMMU backend. > > Note that the migration reduces the following trace > "vfio: subchannel %s has already been attached" (featuring >

[PULL 51/51] bsd-user: Add stubs for vadvise(), sbrk() and sstk()

2023-10-03 Thread Warner Losh
The above system calls are not supported by qemu. Signed-off-by: Warner Losh Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-24-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 18 ++ bsd-user/freebsd/os-syscall.c | 12

[PULL 49/51] bsd-user: Implement shmctl(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-22-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 39 +++ bsd-user/freebsd/os-syscall.c | 4 2 files

[PULL 02/51] bsd-user: Define procctl(2) related structs

2023-10-03 Thread Warner Losh
From: Stacey Son Implement procctl flags and related structs: struct target_procctl_reaper_status struct target_procctl_reaper_pidinfo struct target_procctl_reaper_pids struct target_procctl_reaper_kill Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson

[PULL 35/51] bsd-user: Add bsd-mem.c to meson.build

2023-10-03 Thread Warner Losh
From: Karim Taha Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182709.4834-8-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.c | 0 bsd-user/meson.build | 1 + 2 files changed, 1 insertion(+) create mode 100644 bsd-user/bsd-mem.c

[PULL 40/51] bsd-user: Implement mmap(2) and munmap(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-13-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 20 bsd-user/freebsd/os-syscall.c | 9

Re: [PATCH v2 3/5] hw/i386/apic: Simplify apic_get_class()

2023-10-03 Thread Bernhard Beschow
Am 3. Oktober 2023 08:27:26 UTC schrieb "Philippe Mathieu-Daudé" : >Now than apic_get_class() can not fail, remove its s/than/that/ s/can not/can't/ (which is stylistically consistent with "neither" below) Best regards, Bernhard >Error** parameter. It can't return NULL neither, so >simplify

[PULL 31/51] bsd-user: Declarations for ipc_perm and shmid_ds conversion functions

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182709.4834-4-kariem.taha...@gmail.com> --- bsd-user/qemu-bsd.h | 20 1 file changed, 20 insertions(+) diff --git

[PULL 28/51] bsd-user: Implement pdfork(2) system call.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Acked-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-29-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 32 bsd-user/freebsd/os-syscall.c | 4

[PULL 27/51] bsd-user: Implement rfork(2) system call.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-28-kariem.taha...@gmail.com> --- bsd-user/freebsd/os-proc.h| 39 +++

Re: [PATCH 2/3] target/riscv: Support discontinuous PMU counters

2023-10-03 Thread Atish Kumar Patra
On Tue, Oct 3, 2023 at 5:51 AM Rob Bradford wrote: > > There is no requirement that the enabled counters in the platform are > continuously numbered. Add a "pmu-mask" property that, if specified, can > be used to specify the enabled PMUs. In order to avoid ambiguity if > "pmu-mask" is specified

[PATCH v15 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-10-03 Thread Gurchetan Singh
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by:

[PATCH v15 0/9] rutabaga_gfx + gfxstream

2023-10-03 Thread Gurchetan Singh
From: Gurchetan Singh Prior version: https://lists.gnu.org/archive/html/qemu-devel/2023-09/msg07402.html Branch containing changes: https://gitlab.com/gurchetansingh/qemu/-/commits/qemu-gfxstream-v15 Changes since v14: - Thomas Huth suggested the use of the "x-" prefix for experimental

[PATCH v15 4/9] virtio-gpu: blob prep

2023-10-03 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki

Re: [PATCH 0/3] vhost: clean up device reset

2023-10-03 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 03:27:34PM -0400, Stefan Hajnoczi wrote: > Stateful vhost devices may need to free resources or clear device state upon > device reset. The vhost-user protocol has a VHOST_USER_RESET_DEVICE message > for > this and vDPA has SET_STATUS 0, but only QEMU's vhost-user-scsi

Re: [PATCH v6 08/19] linux-user: Add gen-vdso tool

2023-10-03 Thread Richard Henderson
On 10/3/23 06:00, Philippe Mathieu-Daudé wrote: On 30/9/23 04:15, Richard Henderson wrote: This tool will be used for post-processing the linked vdso image, turning it into something that is easy to include into elfload.c. Signed-off-by: Richard Henderson ---   linux-user/gen-vdso.c 

Re: [PATCH v2 2/5] hw/i386/apic: Defer error check from apic_get_class to kvm_apic_realize

2023-10-03 Thread Bernhard Beschow
Am 3. Oktober 2023 08:27:25 UTC schrieb "Philippe Mathieu-Daudé" : >apic_get_class() isn't supposed to fail. kvm_apic_realize() is >DeviceRealize() handler, which can fail. Defer the error check >to the latter. > >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/i386/kvm/apic.c | 5 +

[PULL 38/51] bsd-user: Implement shmid_ds conversion between host and target.

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-11-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.c | 47 ++ 1 file changed, 47 insertions(+) diff --git

[PULL 50/51] bsd-user: Implement shmat(2) and shmdt(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(), to match linux-user implementation, according to the following commits: 69fa2708a216df715ba5102a0f98468b540a464e linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt}

[PULL 06/51] bsd-user: Implement target_to_host_resource conversion function

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-7-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.c | 40 bsd-user/bsd-proc.h | 4 bsd-user/meson.build | 6 ++

[PULL 42/51] bsd-user: Implement msync(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Co-authored-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Message-Id: <20230925182709.4834-15-kariem.taha...@gmail.com> --- bsd-user/bsd-mem.h| 11

[PULL 12/51] bsd-user: Implement umask(2), setlogin(2) and getlogin(2)

2023-10-03 Thread Warner Losh
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Message-Id: <20230925182425.3163-13-kariem.taha...@gmail.com> --- bsd-user/bsd-proc.h | 39 +++ bsd-user/freebsd/os-syscall.c | 12 +++ 2 files

Re: [PATCH] target/sh4: fix crashes on signal delivery

2023-10-03 Thread Richard Henderson
On 9/28/23 09:42, Mikulas Patocka wrote: sh4 uses gUSA (general UserSpace Atomicity) to provide atomicity on CPUs that don't have atomic instructions. A gUSA region that adds 1 to an atomic variable stored in @R2 looks like this: 4004b6: 03 c7 mova4004c4 ,r0 4004b8:

[PATCH] linux-user: Propagate failure in mmap_reserve_or_unmap back to target_munmap

2023-10-03 Thread Richard Henderson
Do not assert success, but return any failure received. Additionally, fix the method of earlier error return in target_munmap. Reported-by: Andreas Schwab Signed-off-by: Richard Henderson --- linux-user/mmap.c | 30 +- 1 file changed, 17 insertions(+), 13

Re: [PULL 38/47] linux-user: Rename mmap_reserve to mmap_reserve_or_unmap

2023-10-03 Thread Richard Henderson
On 9/18/23 01:35, Andreas Schwab wrote: On Jul 15 2023, Richard Henderson wrote: @@ -776,9 +776,15 @@ static void mmap_reserve(abi_ulong start, abi_ulong len) real_len = real_last - real_start + 1; host_start = g2h_untagged(real_start); -ptr = mmap(host_start, real_len,

Re: [PATCH 0/3] target/m68k: Fix a few semihosting bugs

2023-10-03 Thread Richard Henderson
On 8/2/23 09:19, Keith Packard via wrote: The first two patches mirror similar patches I recently sent for nios2. 1. Use correct parameter for EXIT (d1 instead of d0) 2. Fix use of deposit64 in LSEEK (argument order was incorrect) The second patch has also been submitted by Peter Maydell,

Re: [PATCH v3 09/15] vfio/ap: Use vfio_[attach/detach]_device

2023-10-03 Thread Matthew Rosato
On 10/3/23 11:25 AM, Cédric Le Goater wrote: > On 10/3/23 12:14, Eric Auger wrote: >> Let the vfio-ap device use vfio_attach_device() and >> vfio_detach_device(), hence hiding the details of the used >> IOMMU backend. >> >> We take the opportunity to use g_path_get_basename() which >> is prefered,

[PATCH v15 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-10-03 Thread Gurchetan Singh
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the

[PATCH v15 7/9] gfxstream + rutabaga: meson support

2023-10-03 Thread Gurchetan Singh
- Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano

[PATCH v15 3/9] virtio-gpu: hostmem

2023-10-03 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Acked-by: Michael S. Tsirkin Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-pci.c

  1   2   3   4   5   >