Re: [PULL v2 00/13] Final tests, s390x and misc updates before the soft freeze

2023-03-08 Thread Thomas Huth
On 07/03/2023 14.46, Thomas Huth wrote: Hi Peter! The following changes since commit c29a2f40cd5d1fdad4632b48343cd968db041a44: Merge tag 'pull-target-arm-20230306' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-03-07 09:58:43 +) are available in the Git reposi

Re: sh4-linux-user compile failure

2023-03-08 Thread Mark Cave-Ayland
On 07/03/2023 23:59, Mark Cave-Ayland wrote: On 07/03/2023 23:52, Philippe Mathieu-Daudé wrote: On 8/3/23 00:46, Mark Cave-Ayland wrote: Hi Richard/Anton, It looks as if a compile failure has crept into sh4-linux-user, most likely related to the recent TARGET_TB_PCREL/CF_PCREL changes:

Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all()

2023-03-08 Thread Kevin Wolf
Am 07.03.2023 um 20:20 hat Stefan Hajnoczi geschrieben: > On Tue, Mar 07, 2023 at 06:17:22PM +0100, Kevin Wolf wrote: > > Am 01.03.2023 um 21:57 hat Stefan Hajnoczi geschrieben: > > > There is no need for the AioContext lock in bdrv_drain_all() because > > > nothing in AIO_WAIT_WHILE() needs the lo

Re: [PATCH v4 04/11] osdep: implement qemu_socketpair() for win32

2023-03-08 Thread Daniel P . Berrangé
On Wed, Mar 08, 2023 at 10:53:13AM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Mar 7, 2023 at 6:50 PM Daniel P. Berrangé wrote: > > > > On Mon, Mar 06, 2023 at 04:27:44PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Manually implement a socketpair() fu

Re: [PATCH v2 0/3] block: protect BlockBackend->queued_requests with a lock

2023-03-08 Thread Kevin Wolf
Am 07.03.2023 um 22:04 hat Stefan Hajnoczi geschrieben: > v2: > - Use qatomic_fetch_inc/dec() for readability in Patch 1 [Hanna] > > QEMU block layer multi-queue support involves running I/O requests from > multiple threads. Shared state must be protected somehow to avoid > thread-safety > issues

Re: [PATCH 04/43] migration: create options.c

2023-03-08 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We move there all capabilities helpers from migration.c. > > Signed-off-by: Juan Quintela > --- > migration/migration.h | 12 > migration/options.h| 34 + > hw/virtio/virtio-balloon.c | 1 + > migration/bloc

Re: [PATCH v1 0/2] vhost: memslot handling improvements

2023-03-08 Thread David Hildenbrand
On 07.03.23 12:14, Igor Mammedov wrote: On Fri, 17 Feb 2023 09:20:27 -0500 "Michael S. Tsirkin" wrote: On Thu, Feb 16, 2023 at 12:47:50PM +0100, David Hildenbrand wrote: Following up on my previous work to make virtio-mem consume multiple memslots dynamically [1] that requires precise account

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-08 Thread Maxime Coquelin
Hello Michael, On 2/1/23 12:20, Michael S. Tsirkin wrote: On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the commands

Re: [PATCH v2] virtio-balloon: optimize the virtio-balloon on the ARM platform

2023-03-08 Thread David Hildenbrand
On 08.03.23 01:42, Michael S. Tsirkin wrote: On Wed, Mar 01, 2023 at 06:38:13AM +, Yangming wrote: Optimize the virtio-balloon feature on the ARM platform by adding a variable to keep track of the current hot-plugged pc-dimm size, instead of traversing the virtual machine's memory modules to

Re: Deadlock with ide_issue_trim and draining

2023-03-08 Thread Fiona Ebner
Am 07.03.23 um 15:27 schrieb Hanna Czenczek: > On 07.03.23 14:44, Hanna Czenczek wrote: >> On 07.03.23 13:22, Fiona Ebner wrote: >>> Hi, >>> I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight >>> counter for TRIM BH") introduced an issue in combination with draining. >>> >>>  From

Re: [PATCH v7] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-08 Thread Marc-André Lureau
Hi On Mon, Mar 6, 2023 at 9:11 PM Dorinda Bassey wrote: > > This commit adds a new audiodev backend to allow QEMU to use Pipewire as > both an audio sink and source. This backend is available on most systems > > Add Pipewire entry points for QEMU Pipewire audio backend > Add wrappers for QEMU Pip

Re: [PATCH 03/43] migration: Create migration_cap_set()

2023-03-08 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > And remove the convoluted use of qmp_migrate_set_capabilities() to > enable disable MIGRATION_CAPABILITY_BLOCK. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 34 -- > 1 file changed, 16 insertions(+

Re: [PATCH v2 8/9] async: update documentation of the memory barriers

2023-03-08 Thread Paolo Bonzini
On 3/7/23 18:26, Richard Henderson wrote: On 3/7/23 09:00, Paolo Bonzini wrote: while QSLIST_REMOVE_HEAD in the dequeuing thread is not ordered at all: y.store(0, mo_relaxed);   // QSLIST_REMOVE_HEAD x.store(0, mo_release);   // fetch_and As I read aio_bh_queu

Re: [RFC v3 11/18] vfio/ccw: Use vfio_[attach/detach]_device

2023-03-08 Thread Eric Auger
Hi Matthew, On 3/3/23 18:30, Matthew Rosato wrote: > On 1/31/23 3:52 PM, 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. >> >> Also now all the devices have been migrated to use the new >> vfi

Re: [PATCH 2/2] target/riscv: Make the "virt" register writable by GDB

2023-03-08 Thread Jim Shu
Thanks for reviewing. I'll fix this issue. On Mon, Mar 6, 2023 at 7:26 PM LIU Zhiwei wrote: > > > On 2023/3/5 17:42, Jim Shu wrote: > > This patch also enables debugger to set current privilege mode to > > VU/VS-mode. > > > > Extend previous commit 81d2929c41d32af138f3562f5a7b309f6eac7ca7 to > >

[PATCH v2 0/3] Enable avocado testing for Xen guests

2023-03-08 Thread David Woodhouse
I'd love to test other operating systems too (FreeBSD does work if I abuse the stuff in tests/vm/ and add a Xen guest mode). But this is enough for now to help catch regressions on the QEMU side. Especially the polling for the event channel GSI deassertion is likely to be fragile, and in the not

[PATCH v2 1/3] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update

2023-03-08 Thread David Woodhouse
A Linux guest will perform IRQ migration after the IRQ has happened, updating the RTE to point to the new destination CPU and then unmasking the interrupt. However, when the guest updates the RTE, ioapic_mem_write() calls ioapic_service(), which redelivers the pending level interrupt via kvm_set_i

[PATCH v2 2/3] tests/avocado: Add Fedora 34 distro, including kernel/initrd checksums

2023-03-08 Thread David Woodhouse
From: David Woodhouse The kernel in Fedora 31 doesn't support 'xen_no_vector_callback' on its command line, so add a slightly newer version as a prelude to enabling avocado tests for Xen guests. Signed-off-by: David Woodhouse --- tests/avocado/avocado_qemu/__init__.py | 27

[PATCH v2 3/3] tests/avocado: Test Xen guest support under KVM

2023-03-08 Thread David Woodhouse
From: David Woodhouse Exercise guests with a few different modes for interrupt delivery. In particular we want to cover: • Xen event channel delivery via GSI to the I/O APIC • Xen event channel delivery via GSI to the i8259 PIC • MSIs routed to PIRQ event channels • GSIs routed to PIRQ event

Re: [PATCH v5 1/4] linux-aio: use LinuxAioState from the running thread

2023-03-08 Thread Kevin Wolf
Am 07.03.2023 um 15:18 hat Stefan Hajnoczi geschrieben: > On Tue, Mar 07, 2023 at 09:48:51AM +0100, Kevin Wolf wrote: > > Am 01.03.2023 um 17:16 hat Stefan Hajnoczi geschrieben: > > > On Fri, Feb 03, 2023 at 08:17:28AM -0500, Emanuele Giuseppe Esposito > > > wrote: > > > > Remove usage of aio_cont

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-08 Thread Michael S. Tsirkin
On Wed, Mar 08, 2023 at 11:33:45AM +0100, Maxime Coquelin wrote: > Hello Michael, > > On 2/1/23 12:20, Michael S. Tsirkin wrote: > > On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: > > > Thanks Eugenio for working on this. > > > > > > On 1/31/23 20:10, Eugenio Perez Martin wrote:

Re: [PULL 00/51] Net patches

2023-03-08 Thread Michael S. Tsirkin
On Wed, Mar 08, 2023 at 08:40:42AM +0100, Philippe Mathieu-Daudé wrote: > On 8/3/23 07:56, Jason Wang wrote: > > On Wed, Mar 8, 2023 at 4:43 AM Philippe Mathieu-Daudé > > wrote: > > > > > > On 7/3/23 18:01, Peter Maydell wrote: > > > > On Tue, 7 Mar 2023 at 07:08, Jason Wang wrote: > > > > > >

Re: [PULL 00/51] Net patches

2023-03-08 Thread Philippe Mathieu-Daudé
On 8/3/23 13:17, Michael S. Tsirkin wrote: On Wed, Mar 08, 2023 at 08:40:42AM +0100, Philippe Mathieu-Daudé wrote: On 8/3/23 07:56, Jason Wang wrote: On Wed, Mar 8, 2023 at 4:43 AM Philippe Mathieu-Daudé wrote: On 7/3/23 18:01, Peter Maydell wrote: On Tue, 7 Mar 2023 at 07:08, Jason Wang w

Re: [PULL 00/51] Net patches

2023-03-08 Thread Michael S. Tsirkin
On Wed, Mar 08, 2023 at 01:21:52PM +0100, Philippe Mathieu-Daudé wrote: > On 8/3/23 13:17, Michael S. Tsirkin wrote: > > On Wed, Mar 08, 2023 at 08:40:42AM +0100, Philippe Mathieu-Daudé wrote: > > > On 8/3/23 07:56, Jason Wang wrote: > > > > On Wed, Mar 8, 2023 at 4:43 AM Philippe Mathieu-Daudé >

Re: [PATCH v1 1/2] vhost: Defer filtering memory sections until building the vhost memory structure

2023-03-08 Thread Igor Mammedov
On Tue, 7 Mar 2023 13:46:36 +0100 David Hildenbrand wrote: > On 07.03.23 11:51, Igor Mammedov wrote: > > On Thu, 16 Feb 2023 12:47:51 +0100 > > David Hildenbrand wrote: > > > >> Having multiple devices, some filtering memslots and some not filtering > >> memslots, messes up the "used_memslot"

[PATCH] Fix build without CONFIG_XEN_EMU

2023-03-08 Thread mrezanin
From: Miroslav Rezanina Upstream commit ddf0fd9ae1 "hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback" added kvm_xen_maybe_deassert_callback usage to target/i386/kvm/kvm.c file without conditional preprocessing check. This breaks any build not using CONFIG_XEN_EMU. Protect call by condition

[PULL 01/28] linux-user: Fix access to /proc/self/exe

2023-03-08 Thread Laurent Vivier
From: Helge Deller When accsssing /proc/self/exe from a userspace program, linux-user tries to resolve the name via realpath(), which may fail if the process changed the working directory in the meantime. An example: - a userspace program ist started with ./testprogram - the program runs chdir("

[PULL 08/28] linux-user: Provide print_raw_param64() for 64-bit values

2023-03-08 Thread Laurent Vivier
From: Helge Deller Add a new function print_raw_param64() to print 64-bit values in the same way as print_raw_param(). This prevents that qemu_log() is used to work around the problem that print_raw_param() can only print 32-bit values when compiled for 32-bit targets. Additionally convert the e

[PULL 06/28] linux-user: fill out task state in /proc/self/stat

2023-03-08 Thread Laurent Vivier
From: Andreas Schwab Some programs want to match an actual task state character. Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier Message-Id: Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-u

[PULL 05/28] linux-user: add support for xtensa FDPIC

2023-03-08 Thread Laurent Vivier
From: Max Filippov Define xtensa-specific info_is_fdpic and fill in FDPIC-specific registers in the xtensa version of init_thread. Signed-off-by: Max Filippov Message-Id: <20230205061230.544451-1-jcmvb...@gmail.com> Signed-off-by: Laurent Vivier --- include/elf.h| 1 + linux-user/elf

[PULL 09/28] linux-user: Add strace for prlimit64() syscall

2023-03-08 Thread Laurent Vivier
From: Helge Deller Add proper prlimit64() strace output. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20221222190639.124078-1-del...@gmx.de> [lvivier: use print_raw_param64()] Signed-off-by: Laurent Vivier --- linux-user/strace.c| 88 ++

[PULL 03/28] linux-user: add target to host netlink conversions

2023-03-08 Thread Laurent Vivier
From: Mathis Marion Added conversions for: - IFLA_MTU - IFLA_TXQLEN - IFLA_AF_SPEC AF_INET6 IFLA_INET6_ADDR_GEN_MODE These relate to the libnl functions rtnl_link_set_mtu, rtnl_link_set_txqlen, and rtnl_link_inet6_set_addr_gen_mode. Signed-off-by: Mathis Marion Reviewed-by: Philippe Mathieu-Dau

[PULL 15/28] linux-user/sparc: Tidy syscall error return

2023-03-08 Thread Laurent Vivier
From: Richard Henderson Reduce ifdefs with #define syscall_cc. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-4-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions

[PULL 02/28] linux-user: fix timerfd read endianness conversion

2023-03-08 Thread Laurent Vivier
From: Mathis Marion When reading the expiration count from a timerfd, the endianness of the 64bit value read is the one of the host, just as for eventfds. Signed-off-by: Mathis Marion Reviewed-by: Laurent Vivier Message-Id: <20230220085822.626798-2-mathis.mar...@silabs.com> Signed-off-by: Laur

[PULL 20/28] linux-user/sparc: Handle division by zero traps

2023-03-08 Thread Laurent Vivier
From: Richard Henderson In addition to the hw trap vector, there is a software trap assigned for older sparc without hw division instructions. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-9-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/spar

[PULL 00/28] Linux user for 8.0 patches

2023-03-08 Thread Laurent Vivier
linux-user 20230308 Fix gdt on i386/x86_64 Handle traps on sparc Add translation for argument of msync Emulate CLONE_PIDFD flag in clone handle netlink flag NLA_F_NESTED fix sockaddr_in6 endianness Fix brk() to release pages fill out task state in /proc/self/stat add support for xtensa FDPIC Fix unalig

[PULL 18/28] linux-user/sparc: Fix sparc64_{get, set}_context traps

2023-03-08 Thread Laurent Vivier
From: Richard Henderson These traps are present for sparc64 with ilp32, aka sparc32plus. Enabling them means adjusting the defines over in signal.c, and fixing an incorrect usage of abi_ulong when we really meant the full register, target_ulong. Signed-off-by: Richard Henderson Message-Id: <202

[PULL 23/28] linux-user/sparc: Handle privilidged action trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson This is raised by using an %asi < 0x80 in user-mode. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-12-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 6 ++ 1 file changed, 6 insertions(+) diff --

[PULL 17/28] linux-user/sparc: Tidy window spill/fill traps

2023-03-08 Thread Laurent Vivier
From: Richard Henderson Add some macros to localize the hw difference between v9 and pre-v9. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230216054516.1267305-6-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c

[PULL 19/28] linux-user/sparc: Handle software breakpoint trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-8-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[PULL 25/28] linux-user/sparc: Handle unimplemented flush trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson For sparc64, TT_UNIMP_FLUSH == TT_ILL_INSN, so this is already handled. For sparc32, the kernel uses SKIP_TRAP. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-14-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu

[PULL 28/28] linux-user: fix bug about incorrect base addresss of gdt on i386 and x86_64

2023-03-08 Thread Laurent Vivier
From: "fa...@mail.ustc.edu.cn" On linux user mode, CPUX86State::gdt::base from Different CPUX86State Objects have same value, It is incorrect! Every CPUX86State::gdt::base Must points to independent memory space. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1405 Signed-off-by: fanwe

[PULL 14/28] linux-user/sparc: Tidy syscall trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson Use TT_TRAP. For sparc32, 0x88 is the "Slowaris" system call, currently BAD_TRAP in the kernel's ttable_32.S. For sparc64, 0x110 is tl0_linux32, the sparc32 trap, now folded into the TARGET_ABI32 case via TT_TRAP. For sparc64, there does still exist trap 0x111 as tl0_ol

[PULL 12/28] linux-user: Add translation for argument of msync()

2023-03-08 Thread Laurent Vivier
From: Helge Deller msync() uses the flags MS_ASYNC, MS_INVALIDATE and MS_SYNC, which differ between platforms, specifcally on alpha and hppa. Add a target to host translation for those and wire up a nicer strace output. This fixes the testsuite of the macaulay2 debian package with a hppa-linux

[PULL 22/28] linux-user/sparc: Handle priviledged opcode trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson For the most part priviledged opcodes are ifdefed out of the user-only sparc translator, which will then incorrectly produce illegal opcode traps. But there are some code paths that properly raise TT_PRIV_INSN, so we must handle it. Signed-off-by: Richard Henderson Mess

[PULL 04/28] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-03-08 Thread Laurent Vivier
From: Ilya Leoshkevich target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This makes the host align

[PULL 21/28] linux-user/sparc: Handle getcc, setcc, getpsr traps

2023-03-08 Thread Laurent Vivier
From: Richard Henderson These are really only meaningful for sparc32, but they're still present for backward compatibility for sparc64. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-10-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_

[PULL 24/28] linux-user/sparc: Handle coprocessor disabled trap

2023-03-08 Thread Laurent Vivier
From: Richard Henderson Since qemu does not implement a sparc coprocessor, all such instructions raise this trap. Because of that, we never raise the coprocessor exception trap, which would be vector 0x28. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-13-richard.hender..

[PULL 27/28] linux-user/sparc: Handle tag overflow traps

2023-03-08 Thread Laurent Vivier
From: Richard Henderson This trap is raised by taddcctv and tsubcctv insns. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-16-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 3 +++ linux-user/sparc/target_signal.h | 2 +-

[PULL 11/28] linux-user: handle netlink flag NLA_F_NESTED

2023-03-08 Thread Laurent Vivier
From: Mathis Marion Newer kernel versions require this flag to be present contrary to older ones. Depending on the libnl version it is added or not. Typically when using rtnl_link_inet6_set_addr_gen_mode, the netlink packet generated may contain the following attribute: with libnl 3.4 {nla_l

[PULL 07/28] linux-user: Fix brk() to release pages

2023-03-08 Thread Laurent Vivier
From: Helge Deller The current brk() implementation does not de-allocate pages if a lower address is given compared to earlier brk() calls. But according to the manpage, brk() shall deallocate memory in this case and currently it breaks a real-world application, specifically building the debian g

[PULL 13/28] linux-user: Emulate CLONE_PIDFD flag in clone()

2023-03-08 Thread Laurent Vivier
From: Helge Deller Add emulation for the CLONE_PIDFD flag of the clone() syscall. This flag was added in Linux kernel 5.2. Successfully tested on a x86-64 Linux host with hppa-linux target. Can be verified by running the testsuite of the qcoro debian package, which breaks hard and kills the curr

[PULL 16/28] linux-user/sparc: Use TT_TRAP for flush windows

2023-03-08 Thread Laurent Vivier
From: Richard Henderson The v9 and pre-v9 code can be unified with this macro. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230216054516.1267305-5-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 7 +++ 1

[PULL 10/28] linux-user: fix sockaddr_in6 endianness

2023-03-08 Thread Laurent Vivier
From: Mathis Marion The sin6_scope_id field uses the host byte order, so there is a conversion to be made when host and target endianness differ. Signed-off-by: Mathis Marion Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230307154256.101528-2-mathis.mar...@sil

[PULL 26/28] linux-user/sparc: Handle floating-point exceptions

2023-03-08 Thread Laurent Vivier
From: Richard Henderson Raise SIGFPE for ieee exceptions. The other types, such as FSR_FTT_UNIMPFPOP, should not appear, because we enable normal emulation of missing insns at the start of sparc_cpu_realizefn(). Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-15-richard.he

Re: [PATCH v6 4/4] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-08 Thread Alexander Bulekov
[[ CCing qemu-devel in case someone can spot something wrong faster than me]] On 230308 1042, Thomas Huth wrote: [snip] > > > I'd really love to see this series included in QEMU 8.0, so to help with > > > testing a little bit, I've put it in my gitlab-CI for testing. However, it > > > hit a segf

Re: [PULL 14/20] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-03-08 Thread Philippe Mathieu-Daudé
Hi Zoltan, On 8/3/23 00:47, Philippe Mathieu-Daudé wrote: From: BALATON Zoltan According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north bridge and the PINT pins of the VT8231 south bridge so guests can get interrupts from either of t

Re: [PATCH v3] qapi: give available enum values as error hint

2023-03-08 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > This allows for a more pleasant user experience. > > Before: > $ ./qemu-system-x86_64 -display egl-headless,gl= > qemu-system-x86_64: -display egl-headless,gl=: Parameter 'gl' does not accept > value '' > > After: > $ ./qemu-syste

Re: [PATCH v3] qapi: give available enum values as error hint

2023-03-08 Thread Marc-André Lureau
Hi On Wed, Mar 8, 2023 at 5:55 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > This allows for a more pleasant user experience. > > > > Before: > > $ ./qemu-system-x86_64 -display egl-headless,gl= > > qemu-system-x86_64: -display egl-headl

Re: [PATCH RESEND v6 0/5] migration: reduce time of loading non-iterable vmstate

2023-03-08 Thread Chuang Xu
Hi, Peter, On 2023/3/8 上午1:04, Peter Xu wrote: > On Tue, Mar 07, 2023 at 09:24:31PM +0800, Chuang Xu wrote: >>> Why do we need address_space_get_flatview_rcu()? I'm not sure whether you >> address_space_cahce_init() uses address_space_get_flatview() to acquire >> a ref-ed flatview. If we want to u

[qemu-web PATCH] Add a blog post about the upcoming KVM Forum 2023

2023-03-08 Thread Thomas Huth
Based on the announcement e-mail that Paolo sent to the qemu-devel mailing list two days ago - let's spread the word via the blog, too! Signed-off-by: Thomas Huth --- _posts/2023-03-08-kvm-forum-cfp.md | 62 ++ 1 file changed, 62 insertions(+) create mode 100644 _pos

[PATCH] use qatzip to acclerate the live migration

2023-03-08 Thread dennis.wu
qatzip https://github.com/intel/QATzip is a project that supply the zlib like api with the Intel QAT hardware. compress and decompress performance with small data block (4kb page) is low with qatzip API. so we compose multiple pages into a multi page address structure which is a buffer list, then w

[PATCH] target/riscv/csr.c: fix H extension TVM trap

2023-03-08 Thread chenyi2000
From: Yi Chen Trap accesses to hgatp if MSTATUS_TVM is enabled. Don't trap accesses to vsatp even if MSTATUS_TVM is enabled. Signed-off-by: Yi Chen --- target/riscv/csr.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/c

Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all()

2023-03-08 Thread Stefan Hajnoczi
On Wed, Mar 08, 2023 at 09:48:17AM +0100, Kevin Wolf wrote: > Am 07.03.2023 um 20:20 hat Stefan Hajnoczi geschrieben: > > On Tue, Mar 07, 2023 at 06:17:22PM +0100, Kevin Wolf wrote: > > > Am 01.03.2023 um 21:57 hat Stefan Hajnoczi geschrieben: > > > > There is no need for the AioContext lock in bdr

Re: [PULL 14/20] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-03-08 Thread BALATON Zoltan
On Wed, 8 Mar 2023, Philippe Mathieu-Daudé wrote: Hi Zoltan, On 8/3/23 00:47, Philippe Mathieu-Daudé wrote: From: BALATON Zoltan According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north bridge and the PINT pins of the VT8231 south b

Re: [PATCH RESEND v6 0/5] migration: reduce time of loading non-iterable vmstate

2023-03-08 Thread Peter Xu
On Wed, Mar 08, 2023 at 06:03:45AM -0800, Chuang Xu wrote: > IIUC, Do you mean that different ways to get flatview are tricky? Yes, and properly define when to use which. > As you said, it's slightly beyond what this series does. Maybe it would be > better if we discuss it in a new series and kee

Re: Deadlock with ide_issue_trim and draining

2023-03-08 Thread Hanna Czenczek
On 08.03.23 11:35, Fiona Ebner wrote: Am 07.03.23 um 15:27 schrieb Hanna Czenczek: On 07.03.23 14:44, Hanna Czenczek wrote: On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in combination wi

Re: [PATCH v1 1/2] vhost: Defer filtering memory sections until building the vhost memory structure

2023-03-08 Thread David Hildenbrand
So we tricked used_memslots to be smaller than it actually has to be, because we're ignoring the memslots filtered out by the vhost-user device. Now, this is all far from relevant in practice as of now I think, and usually would indicate user errors already (memory that's not shared with vhost-

Re: [PATCH v16 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-03-08 Thread Pierre Morel
On 2/27/23 14:21, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-22 at 15:20 +0100, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology

Re: [PATCH RESEND v6 0/5] migration: reduce time of loading non-iterable vmstate

2023-03-08 Thread Chuang Xu
Hi, Peter, On 2023/3/8 下午10:58, Peter Xu wrote: On Wed, Mar 08, 2023 at 06:03:45AM -0800, Chuang Xu wrote: IIUC, Do you mean that different ways to get flatview are tricky? Yes, and properly define when to use which. As you said, it's slightly beyond what this series does. Maybe it would be

Re: [PATCH RESEND v6 0/5] migration: reduce time of loading non-iterable vmstate

2023-03-08 Thread Peter Xu
On Wed, Mar 08, 2023 at 11:27:40PM +0800, Chuang Xu wrote: > Hi, Peter, > > On 2023/3/8 下午10:58, Peter Xu wrote: > > On Wed, Mar 08, 2023 at 06:03:45AM -0800, Chuang Xu wrote: > > > IIUC, Do you mean that different ways to get flatview are tricky? > > Yes, and properly define when to use which. >

Re: [PATCH v5] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-08 Thread Dorinda Bassey
Hi Unfortunately, you are not calling pw_thread_loop_wait yourself, so > that doesn't help me what this is supposed to do. When signaling > things and expecting a certain state and side-effect from a different > thread or context, it's nice to document it. > > I guess this will break the thread lo

[RFC PATCH 0/2] Enable additional display heads on guest launch

2023-03-08 Thread Damian Hobson-Garcia
Hello all, I would like to propose an option to enable multiple heads (outputs) on startup when the "max_outputs" option is used on a vga device. Currently, only 1 head is enabled by default, and all others are enabled in response to commands from the host side UI interface. There is also an issue

[RFC PATCH 2/2] virtio-gpu: Add an option to connect all outputs on startup

2023-03-08 Thread Damian Hobson-Garcia
When multiple outputs are enabled using the "max_outputs" attribute, only the first connector appears as "Connected" in the guest DRM device. Additional connectors must be enabled from the host side UI frontend before they are usable by the guest. However, multiple outputs can still be of use on

[RFC PATCH 1/2] gtk: Make sure widget is realized before updating

2023-03-08 Thread Damian Hobson-Garcia
Check that a widget has a window before trying to update its contents. --- ui/gtk.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index fd82e9b1ca..e4e0980323 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -340,6 +340,10 @@ static void gd_update_full_redraw(VirtualConsole *v

Re: [PATCH v2 8/9] async: update documentation of the memory barriers

2023-03-08 Thread Richard Henderson
On 3/8/23 02:49, Paolo Bonzini wrote: On 3/7/23 18:26, Richard Henderson wrote: On 3/7/23 09:00, Paolo Bonzini wrote: while QSLIST_REMOVE_HEAD in the dequeuing thread is not ordered at all: y.store(0, mo_relaxed);   // QSLIST_REMOVE_HEAD x.store(0, mo_release);   

[PATCH 19/47] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-03-08 Thread Michael Tokarev
From: Stefan Hajnoczi When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O buffer and must be cleared because bdrv_co_do_pwrite_zeroes() fails

[PATCH 21/47] target/i386: Fix BEXTR instruction

2023-03-08 Thread Michael Tokarev
From: Richard Henderson There were two problems here: not limiting the input to operand bits, and not correctly handling large extraction length. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1372 Signed-off-by: Richard Henderson Message-Id: <20230114230542.3116013-3-richard.hender...

[PATCH 27/47] Revert "x86: do not re-randomize RNG seed on snapshot load"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit 14b29fea742034186403914b4d013d0e83f19e78. Signed-off-by: Michael S. Tsirkin Fixes: 14b29fea74 ("x86: do not re-randomize RNG seed on snapshot load") Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PATCH 16/47] migration/ram: Fix error handling in ram_write_tracking_start()

2023-03-08 Thread Michael Tokarev
From: David Hildenbrand If something goes wrong during uffd_change_protection(), we would miss to unregister uffd-wp and not release our reference. Fix it by performing the uffd_change_protection(true) last. Note that a uffd_change_protection(false) on the recovery path without a prior uffd_chan

[PATCH 40/47] vhost: avoid a potential use of an uninitialized variable in vhost_svq_poll()

2023-03-08 Thread Michael Tokarev
From: Carlos López In vhost_svq_poll(), if vhost_svq_get_buf() fails due to a device providing invalid descriptors, len is left uninitialized and returned to the caller, potentally leaking stack data or causing undefined behavior. Fix this by initializing len to 0. Found with GCC 13 and -fanaly

[PATCH 11/47] configure: fix GLIB_VERSION for cross-compilation

2023-03-08 Thread Michael Tokarev
From: Paolo Bonzini configure uses "pkg-config" directly so that GLIB_VERSION is always based on host glib version. To correctly handle cross-compilation it should use "$pkg_config" and take GLIB_VERSION from the cross-compiled glib. Reported-by: Валентин Resolves: https://gitlab.com/qemu-pro

[PATCH 35/47] vhost-user-rng: Back up vqs before cleaning up vhost_dev

2023-03-08 Thread Michael Tokarev
From: Akihiko Odaki vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 821d28b88f ("vhost-user-rng: Add vhost-user-rng implementation") Signed-off-by: Akihiko Odaki Message-Id: <20230130140516.78078-1-akihiko.od...@daynix.com> Reviewe

[PATCH 26/47] hw/smbios: fix field corruption in type 4 table

2023-03-08 Thread Michael Tokarev
From: Julia Suvorova Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the strings which follow immediately after the struct fields have been overwritten by unconditional filling of later fields such as core_count2. Make these fields dependent on the SMBIOS version. Fixes: 05e27d74c7

[PATCH 12/47] target/arm: Fix sve_probe_page

2023-03-08 Thread Michael Tokarev
From: Richard Henderson Don't dereference CPUTLBEntryFull until we verify that the page is valid. Move the other user-only info field updates after the valid check to match. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1412 Signed-off-by: Richard Henderson

[PATCH 33/47] vhost-user-gpio: Configure vhost_dev when connecting

2023-03-08 Thread Michael Tokarev
From: Akihiko Odaki vhost_dev_cleanup(), called from vu_gpio_disconnect(), clears vhost_dev so vhost-user-gpio must set the members of vhost_dev each time connecting. do_vhost_user_cleanup() should also acquire the pointer to vqs directly from VHostUserGPIO instead of referring to vhost_dev as i

[PATCH 34/47] vhost-user-i2c: Back up vqs before cleaning up vhost_dev

2023-03-08 Thread Michael Tokarev
From: Akihiko Odaki vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 7221d3b634 ("hw/virtio: add boilerplate for vhost-user-i2c device") Signed-off-by: Akihiko Odaki Message-Id: <20230130140435.78049-1-akihiko.od...@daynix.com> Revi

[PATCH 28/47] Revert "x86: re-initialize RNG seed when selecting kernel"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit cc63374a5a7c240b7d3be734ef589dabbefc7527. Fixes: cc63374a5a ("x86: re-initialize RNG seed when selecting kernel") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PATCH 47/47] build-sys: fix crlf-ending C code

2023-03-08 Thread Michael Tokarev
From: Marc-André Lureau On msys2, the shader-to-C script produces bad C: ./ui/shader/texture-blit-vert.h:2:5: error: missing terminating " character [-Werror] Fix it by changing the line ending from crlf to lf, and convert the script to Python (qemu build seems perl-free after that). Signed-of

[PATCH 39/47] vdpa: stop all svq on device deletion

2023-03-08 Thread Michael Tokarev
From: Eugenio Pérez Not stopping them leave the device in a bad state when virtio-net fronted device is unplugged with device_del monitor command. This is not triggable in regular poweroff or qemu forces shutdown because cleanup is called right after vhost_vdpa_dev_start(false). But devices hot

[PATCH 41/47] libvhost-user: check for NULL when allocating a virtqueue element

2023-03-08 Thread Michael Tokarev
From: Carlos López Check the return value for malloc(), avoiding a NULL pointer dereference, and propagate error in function callers. Found with GCC 13 and -fanalyzer: ../subprojects/libvhost-user/libvhost-user.c: In function ‘virtqueue_alloc_element’: ../subprojects/libvhost-user/libvhost-use

[PATCH 20/47] tests/tcg/i386: Introduce and use reg_t consistently

2023-03-08 Thread Michael Tokarev
From: Richard Henderson Define reg_t based on the actual register width. Define the inlines using that type. This will allow input registers to 32-bit insns to be set to 64-bit values on x86-64, which allows testing various edge cases. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mat

[PATCH 14/47] target/arm: Fix in_debug path in S1_ptw_translate

2023-03-08 Thread Michael Tokarev
From: Richard Henderson During the conversion, the test against get_phys_addr_lpae got inverted, meaning that successful translations went to the 'failed' label. Cc: qemu-sta...@nongnu.org Fixes: f3639a64f60 ("target/arm: Use softmmu tlbs for page table walking") Resolves: https://gitlab.com/qem

[PATCH 45/47] block: Handle curl 7.55.0, 7.85.0 version changes

2023-03-08 Thread Michael Tokarev
From: Anton Johansson * 7.55.0 deprecates CURLINFO_CONTENT_LENGTH_DOWNLOAD in favour of a *_T version, which returns curl_off_t instead of a double. * 7.85.0 deprecates CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS in favour of *_STR variants, specifying the desired protocols via a string.

[PATCH 32/47] Revert "hw/i386: pass RNG seed via setup_data entry"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit 67f7e426e53833a5db75b0d813e8d537b8a75bd2. Additionally to the automatic revert, I went over the code and dropped all mentions of legacy_no_rng_seed manually, effectively reverting a combination of 2 additional commits: commit ffe2d2382e5f1aae1a

[PATCH 24/47] target/i386: Fix BZHI instruction

2023-03-08 Thread Michael Tokarev
From: Richard Henderson We did not correctly handle N >= operand size. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1374 Signed-off-by: Richard Henderson Message-Id: <20230114233206.3118472-1-richard.hender...@linaro.org> Signed-off-by: Paolo Bonzini (cherry picked from commit 9ad2b

[PATCH 02/47] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2023-03-08 Thread Michael Tokarev
From: Jason Wang When vIOMMU is enabled, the vq->used_phys is actually the IOVA not GPA. So we need to translate it to GPA before the syncing otherwise we may hit the following crash since IOVA could be out of the scope of the GPA log size. This could be noted when using virtio-IOMMU with vhost u

[PATCH 29/47] Revert "x86: reinitialize RNG seed on system reboot"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit 763a2828bf313ed55878b09759dc435355035f2e. Fixes: 763a2828bf ("x86: reinitialize RNG seed on system reboot") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[PATCH 25/47] block/iscsi: fix double-free on BUSY or similar statuses

2023-03-08 Thread Michael Tokarev
From: Paolo Bonzini Commit 8c460269aa77 ("iscsi: base all handling of check condition on scsi_sense_to_errno", 2019-07-15) removed a "goto out" so that the same coroutine is re-entered twice; once from iscsi_co_generic_cb, once from the timer callback iscsi_retry_timer_expired. This can cause a

[PATCH 38/47] hw/timer/hpet: Fix expiration time overflow

2023-03-08 Thread Michael Tokarev
From: Akihiko Odaki The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting value can represent a past time after rounded, forcing the timer to fire immediately. If the timer is configured as periodic, it will rearm

  1   2   3   >