[PATCH 18/24] audio: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- audio/mixeng.h| 2 +- hw/audio/fmopl.c | 8 hw/audio/fmopl.h | 2 +- hw/audio/gusemu_hal.c | 4 ++-- hw/audio/intel-hda-defs.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/audio/mixeng.h

[PATCH 11/24] hexagon: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- target/hexagon/README | 2 +- target/hexagon/fma_emu.c| 2 +- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/idef-parser/idef-parser.h| 2 +- target/hexagon/idef-parser/parser-helpers.c | 6

Re: [PATCH trivial for-8.1 0/3] trivial-patches for 2023-08-07

2023-08-22 Thread Michael Tokarev
07.08.2023 13:56, Michael Tokarev wrote: https://gitlab.com/mjt0k/qemu.git tags/trivial-patches-pull This is what happens when one does development in ENOCOFFEE mode.. :) Obviously these 3 patches together with the cover letter should not have been sent to the mailing list, it's an old

[PATCH 07/24] i386: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- host/include/i386/host/cpuinfo.h | 2 +- hw/i386/acpi-build.c | 4 ++-- hw/i386/amd_iommu.c | 4 ++-- hw/i386/intel_iommu.c| 4 ++-- hw/i386/kvm/xen_xenstore.c | 2 +- hw/i386/kvm/xenstore_impl.c | 2 +-

[PATCH 22/24] tests/: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- tests/avocado/acpi-bits.py | 4 ++-- tests/avocado/acpi-bits/bits-tests/testacpi.py2 | 4 ++-- tests/decode/err_pattern_group_ident2.decode| 2 +- tests/docker/common.rc | 2 +-

[PATCH 19/24] hw/other: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/acpi/aml-build.c | 6 +++--- hw/acpi/hmat.c | 2 +- hw/acpi/nvdimm.c | 2 +- hw/block/hd-geometry.c | 4 ++-- hw/block/pflash_cfi01.c | 2 +- hw/char/cadence_uart.c | 2 +-

[PATCH 14/24] hw/tpm: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/tpm/tpm_tis.h| 2 +- hw/tpm/tpm_tis_common.c | 2 +- hw/tpm/tpm_tis_i2c.c| 4 ++-- hw/tpm/tpm_tis_isa.c| 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h

[PATCH 10/24] riscv: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/riscv/microchip_pfsoc.c| 2 +- hw/riscv/virt.c | 4 ++-- include/hw/riscv/riscv_hart.h | 2 +- target/riscv/cpu.h| 2 +- target/riscv/cpu_bits.h | 4 ++--

[PATCH 20/24] include/: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- include/block/block_int-common.h | 2 +- include/chardev/char-fe.h| 4 ++-- include/crypto/akcipher.h| 2 +- include/crypto/ivgen.h | 4 ++-- include/elf.h| 4 ++-- include/hw/acpi/aml-build.h | 2 +-

[PATCH 09/24] ppc: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- host/include/ppc/host/cpuinfo.h | 2 +- hw/ppc/ppc.c| 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/spapr.c | 8 hw/ppc/spapr_hcall.c| 2 +- hw/ppc/spapr_nvdimm.c

[PATCH 24/24] misc/other: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- accel/tcg/tb-maint.c | 2 +- backends/tpm/tpm_ioctl.h | 2 +- chardev/char-socket.c | 6 +++--- chardev/char.c | 2 +- contrib/plugins/cache.c| 2 +- contrib/plugins/lockstep.c | 2 +- crypto/afalg.c | 2 +-

[PATCH 21/24] scripts/: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- scripts/checkpatch.pl | 2 +- scripts/ci/gitlab-pipeline-status | 2 +- scripts/codeconverter/codeconverter/qom_macros.py | 2 +- scripts/oss-fuzz/minimize_qtest_trace.py | 8

[PATCH 12/24] hw/net: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/net/cadence_gem.c | 10 +- hw/net/dp8393x.c | 2 +- hw/net/e1000_regs.h | 2 +- hw/net/e1000x_regs.h | 2 +- hw/net/fsl_etsec/rings.c | 2 +- hw/net/igb_regs.h | 4 ++-- hw/net/mcf_fec.c | 2 +-

[PATCH 23/24] qga/: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qga/channel-posix.c | 2 +- qga/commands-posix-ssh.c | 2 +- qga/commands-posix.c | 2 +- qga/commands-win32.c | 4 ++-- qga/main.c| 2 +- qga/vss-win32/install.cpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-)

[PATCH 13/24] hw/pci: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/pci-bridge/cxl_downstream.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/pci-host/bonito.c| 2 +- hw/pci-host/designware.c| 4 ++-- hw/pci-host/dino.c | 2 +- hw/pci-host/gpex-acpi.c | 2

[PATCH 15/24] hw/usb hw/ide hw/i2c: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/i2c/pm_smbus.c | 2 +- hw/i2c/pmbus_device.c | 2 +- hw/i2c/smbus_slave.c| 2 +- hw/ide/ahci_internal.h | 4 ++-- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 2 +- hw/usb/ccid-card-emulated.c | 2 +-

[PATCH 03/24] ui: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- ui/cocoa.m| 2 +- ui/keymaps.h | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2.c | 2 +- ui/vnc-enc-zrle.c.inc | 2 +- ui/vnc-enc-zywrle.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/cocoa.m

[PATCH 17/24] xen: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/xen/xen_pvdev.c | 2 +- include/hw/xen/interface/arch-x86/xen-x86_64.h | 2 +- include/hw/xen/interface/arch-x86/xen.h| 2 +- include/hw/xen/interface/event_channel.h | 2 +- include/hw/xen/interface/grant_table.h

[PATCH 01/24] block: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- block.c | 2 +- block/block-copy.c | 4 ++-- block/export/vduse-blk.c | 2 +- block/export/vhost-user-blk-server.c | 2 +- block/export/vhost-user-blk-server.h | 2 +- block/file-posix.c

[PATCH 08/24] mips: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/mips/malta.c | 2 +- target/mips/cpu-defs.c.inc | 2 +- target/mips/tcg/msa_helper.c| 12 ++-- target/mips/tcg/mxu_translate.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/mips/malta.c

[PATCH 04/24] util: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- util/cpuinfo-aarch64.c | 4 ++-- util/cpuinfo-i386.c| 4 ++-- util/cpuinfo-ppc.c | 2 +- util/main-loop.c | 2 +- util/oslib-posix.c | 2 +- util/qdist.c | 2 +- util/qemu-sockets.c| 2 +- util/rcu.c | 2 +- 8 files

[PATCH 16/24] hw/display: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/display/bochs-display.c | 2 +- hw/display/qxl.c | 2 +- hw/display/ssd0303.c | 2 +- hw/display/ssd0323.c | 2 +- hw/display/xlnx_dp.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 06/24] docs: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- docs/devel/qapi-code-gen.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index 7f78183cd4..b0852da97b 100644 --- a/docs/devel/qapi-code-gen.rst +++

[PATCH 02/24] bsd-user: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- bsd-user/errno_defs.h| 2 +- bsd-user/freebsd/target_os_siginfo.h | 2 +- bsd-user/freebsd/target_os_stack.h | 4 ++-- bsd-user/freebsd/target_os_user.h| 2 +- bsd-user/qemu.h | 2 +- bsd-user/signal-common.h

[PATCH v2 00/24] tree-wide spelling fixes

2023-08-22 Thread Michael Tokarev
This is a v2 of large tree-wide spelling patch set. Mostly fixes spelling errors in comments, but also in some messages too, in documentation, in trace event formats and so on. I tried to group the fixes into more-or-less reasonable chunks, but due to large amount of changes it's a trade- off, -

[PATCH 05/24] tcg: spelling fixes

2023-08-22 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc | 4 ++-- tcg/riscv/tcg-target.c.inc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index

[PATCH v4 02/10] linux-user: Exit not abort in die_with_backtrace

2023-08-22 Thread Richard Henderson
This line is supposed to be unreachable, but if we're going to have it at all, SIGABRT via abort() is subject to the same signal peril that created this function in the first place. We can _exit immediately without peril. Signed-off-by: Richard Henderson --- linux-user/signal.c | 2 +- 1 file

[PATCH v4 05/10] linux-user: Only register handlers for core_dump_signal by default

2023-08-22 Thread Richard Henderson
The set of fatal signals is really immaterial. If one arrives, and is unhandled, then the qemu process dies and the parent gets the correct signal. It is only for those signals which we would like to perform a guest core dump instead of a host core dump that we need to catch. Signed-off-by:

[PATCH v4 01/10] linux-user: Split out die_with_signal

2023-08-22 Thread Richard Henderson
Because we trap so many signals for use by the guest, we have to take extra steps to exit properly. Signed-off-by: Richard Henderson --- linux-user/signal.c | 52 - 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/linux-user/signal.c

[PATCH v4 07/10] linux-user: Remap SIGPROF when CONFIG_GPROF

2023-08-22 Thread Richard Henderson
Protect the host's use of SIGPROF by remapping TARGET_SIGPROF to one of the RT signals. Signed-off-by: Richard Henderson --- linux-user/signal.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 9d16e3c8c5..b8913968cc

[PATCH v4 06/10] linux-user: Map unsupported signals to an out-of-bounds value

2023-08-22 Thread Richard Henderson
Do not return a valid signal number in one domain when given an invalid signal number in the other domain. Signed-off-by: Richard Henderson --- linux-user/signal.c | 72 - 1 file changed, 38 insertions(+), 34 deletions(-) diff --git

[PATCH v4 08/10] linux-user: Simplify signal_init

2023-08-22 Thread Richard Henderson
Install the host signal handler at the same time we are probing the target signals for SIG_IGN/SIG_DFL. Ignore unmapped target signals. Signed-off-by: Richard Henderson --- linux-user/signal.c | 47 + 1 file changed, 22 insertions(+), 25 deletions(-)

[PATCH v4 03/10] linux-user: Use die_with_signal with abort

2023-08-22 Thread Richard Henderson
Describe the convoluted way by which we can see ERROR:../alt/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu) Bail out! ERROR:../alt/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu) for encountering an an abort()

[PATCH v4 04/10] linux-user: Detect and report host crashes

2023-08-22 Thread Richard Henderson
From: Helge Deller If there is an internal program error in the qemu source code which raises SIGSEGV or SIGBUS, we currently assume the signal belongs to the guest. With an artificial error introduced, we will now print QEMU internal SIGSEGV {si_code=1, si_addr=(nil)} QEMU v8.1.50 target

[PATCH v4 00/10] linux-user: Detect and report host crashes

2023-08-22 Thread Richard Henderson
More signal cleanups. Mostly tested by temporarily adding an abort, divide by zero, undefined instruction, null dereference, within the implementation of a guest syscall to induce an error. r~ Helge Deller (1): linux-user: Detect and report host crashes Richard Henderson (9): linux-user:

[PATCH v4 10/10] linux-user: Detect and report host SIGILL, SIGFPE, SIGTRAP

2023-08-22 Thread Richard Henderson
These signals, when not spoofed via kill(), are always bugs. Use die_with_backtrace to report this sensibly. Signed-off-by: Richard Henderson --- linux-user/signal.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index

[PATCH v4 09/10] linux-user: Split out host_sig{segv,bus}_handler

2023-08-22 Thread Richard Henderson
Make host_signal_handler slightly easier to read. Signed-off-by: Richard Henderson --- linux-user/signal.c | 145 ++-- 1 file changed, 85 insertions(+), 60 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index a6917eadd8..68ceb2e4bd

Re: [PATCH v2 08/58] i386/tdx: Adjust the supported CPUID based on TDX restrictions

2023-08-22 Thread Xiaoyao Li
On 8/22/2023 7:00 AM, Isaku Yamahata wrote: On Fri, Aug 18, 2023 at 05:49:51AM -0400, Xiaoyao Li wrote: diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c index 56cb826f6125..3198bc9fd5fb 100644 --- a/target/i386/kvm/tdx.c +++ b/target/i386/kvm/tdx.c ... +static inline uint32_t

[ANNOUNCE] QEMU 8.1.0 is now available

2023-08-22 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 8.1.0 release. This release contains 2900+ commits from 250 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at:

Re: [PATCH] target/loongarch: cpu: Implement get_arch_id callback

2023-08-22 Thread bibo mao
在 2023/8/23 09:14, gaosong 写道: > 在 2023/8/22 下午8:26, Bibo Mao 写道: >> Implement the callback for getting the architecture-dependent CPU >> ID, the cpu ID is physical id described in ACPI MADT table, this >> will be used for cpu hotplug. >> >> Signed-off-by: Bibo Mao >> Change-Id:

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

2023-08-22 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 Reviewed-by: Emmanouil Pitsidianakis --- v3: Fix alignment issues (Akihiko)

[PATCH v11 8/9] gfxstream + rutabaga: enable rutabaga

2023-08-22 Thread Gurchetan Singh
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v3: Whitespace fix (Akihiko) v9: reorder virtio_gpu_have_udmabuf() after

[PATCH v11 1/9] virtio: Add shared memory capability

2023-08-22 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David

[PATCH v11 9/9] docs/system: add basic virtio-gpu documentation

2023-08-22 Thread Gurchetan Singh
This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v2: - Incorporated suggestions by Akihiko Odaki - Listed the currently supported

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

2023-08-22 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 Acked-by: Michael S. Tsirkin --- hw/display/virtio-gpu-pci.c| 14 ++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 33

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

2023-08-22 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 v11 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-08-22 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 Reviewed-by: Emmanouil Pitsidianakis --- v1: void *rutabaga --> struct

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

2023-08-22 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 Reviewed-by: Emmanouil

[PATCH v11 0/9] rutabaga_gfx + gfxstream

2023-08-22 Thread Gurchetan Singh
From: Gurchetan Singh Changes since v10: - Licensing and comment fixes - Official "release commits" issued for rutabaga_gfx_ffi, gfxstream, aemu-base. For example, see crrev.com/c/4778941 - The release commits can make packaging easier, though once again all known users will likely just

[PATCH v11 2/9] virtio-gpu: CONTEXT_INIT feature

2023-08-22 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-base.c

Re: [PATCH] target/loongarch: cpu: Implement get_arch_id callback

2023-08-22 Thread gaosong
在 2023/8/22 下午8:26, Bibo Mao 写道: Implement the callback for getting the architecture-dependent CPU ID, the cpu ID is physical id described in ACPI MADT table, this will be used for cpu hotplug. Signed-off-by: Bibo Mao Change-Id: I53bcfb9f4279e491f33e8b99a9102534ad53409e --- Drop Chang-Id.

[PATCH] target/arm: Fix bug in memory translation for executable Realm memory pages

2023-08-22 Thread Matti Schulze
This patch fixes a bug in the memory translation for target/arm. If in realm space, e.g., R-EL2 executing code from an executable memory page currently results in a level 3 permission fault. As we cannot access secure memory from an insecure space, QEMU checks on each memory translation if the

Re: [PATCH qemu 2/2] dump: Only use the makedumpfile flattened format when necessary

2023-08-22 Thread Stephen Brennan
Stephen Brennan writes: > Marc-André Lureau writes: >> I am a bit reluctant to change the dump format by default. But since the >> flatten format is more "complicated" than the "normal" format, perhaps we >> can assume all users will handle it. >> >> The change is probably late for 8.1 though..

Re: [PATCH] tcg: Unify TCG_TARGET_HAS_extr[lh]_i64_i32

2023-08-22 Thread Richard Henderson
On 8/22/23 15:05, Philippe Mathieu-Daudé wrote: On 22/8/23 19:51, Richard Henderson wrote: Replace the separate defines with TCG_TARGET_HAS_extr_i64_i32, so that the two parts of backend-specific type changing cannot be out of sync. Reported-by: Philippe Mathieu-Daudé Signed-off-by: Richard

Re: [PATCH v7 10/12] virtio-sound: implement audio output (TX)

2023-08-22 Thread Philippe Mathieu-Daudé
Hi Emmanouil, On 22/8/23 21:18, Emmanouil Pitsidianakis wrote: Handle output IO messages in the transmit (TX) virtqueue. It allocates a VirtIOSoundPCMBlock for each IO message and copies the data buffer to it. When the IO buffer is written to the host's sound card, the guest will be notified

Re: [PATCH v3 2/3] linux-user: Exit not abort in die_with_backtrace

2023-08-22 Thread Philippe Mathieu-Daudé
On 22/8/23 22:34, Richard Henderson wrote: This line is supposed to be unreachable, but if we're going to have it at all, SIGABRT via abort() is subject to the same signal peril that created this function in the first place. :) Reviewed-by: Philippe Mathieu-Daudé We can _exit immediately

Re: [PATCH v3 1/3] linux-user: Split out die_with_signal

2023-08-22 Thread Philippe Mathieu-Daudé
On 22/8/23 22:34, Richard Henderson wrote: Because we trap so many signals for use by the guest, we have to take extra steps to exit properly. Signed-off-by: Richard Henderson --- linux-user/signal.c | 52 - 1 file changed, 28 insertions(+), 24

Re: [PATCH] tcg: Unify TCG_TARGET_HAS_extr[lh]_i64_i32

2023-08-22 Thread Philippe Mathieu-Daudé
On 22/8/23 19:51, Richard Henderson wrote: Replace the separate defines with TCG_TARGET_HAS_extr_i64_i32, so that the two parts of backend-specific type changing cannot be out of sync. Reported-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 4

Re: [PATCH 1/7] tcg/tcg-op: Document bswap16() byte pattern

2023-08-22 Thread Philippe Mathieu-Daudé
On 22/8/23 19:29, Richard Henderson wrote: On 8/22/23 10:22, Philippe Mathieu-Daudé wrote: } else { tcg_gen_shli_i32(t1, arg, 8);   /*  t1 = xab. (IZ=0) */ /*   .ab. (IZ=1) */ } tcg_gen_or_i32(ret, t0,

Re: [PATCH 21/22] Implement shmat(2) and shmdt(2)

2023-08-22 Thread Richard Henderson
On 8/22/23 12:54, Warner Losh wrote: As a practical matter, they both consume about the same resources until the MAP_ANON region starts to get populated with data... With PROT_NONE, I think they would have the same effect. If it is to be a backing store for something like malloc, then

[PATCH v3 1/3] linux-user: Split out die_with_signal

2023-08-22 Thread Richard Henderson
Because we trap so many signals for use by the guest, we have to take extra steps to exit properly. Signed-off-by: Richard Henderson --- linux-user/signal.c | 52 - 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/linux-user/signal.c

[PATCH v3 0/3] linux-user: Detect and report host crashes

2023-08-22 Thread Richard Henderson
Supercedes: 20230812164314.352131-1-del...@gmx.de ("[PATCH] Fix signal handler to detect crashes in qemu-linux-user") Fixes the issues I pointed out vs Helge's v2. r~ Helge Deller (1): linux-user: Detect and report host crashes Richard Henderson (2): linux-user: Split out die_with_signal

[PATCH v3 2/3] linux-user: Exit not abort in die_with_backtrace

2023-08-22 Thread Richard Henderson
This line is supposed to be unreachable, but if we're going to have it at all, SIGABRT via abort() is subject to the same signal peril that created this function in the first place. We can _exit immediately without peril. Signed-off-by: Richard Henderson --- linux-user/signal.c | 2 +- 1 file

[PATCH v3 3/3] linux-user: Detect and report host crashes

2023-08-22 Thread Richard Henderson
From: Helge Deller If there is an internal program error in the qemu source code which raises SIGSEGV or SIGBUS, we currently assume the signal belongs to the guest. With an artificial error introduced, we will now print QEMU internal SIGSEGV {si_code=1, si_addr=(nil)} QEMU v8.1.50 target

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-08-22 Thread John Snow
On Tue, Aug 22, 2023 at 1:33 PM Andrey Drobyshev wrote: > > On 8/16/23 12:22, Andrey Drobyshev wrote: > > On 7/31/23 17:51, Andrey Drobyshev wrote: > >> On 7/24/23 16:11, Andrey Drobyshev wrote: > >>> On 7/11/23 20:25, Andrey Drobyshev wrote: > v1 --> v2: > * Fixed line indentation; >

Re: [PATCH 21/22] Implement shmat(2) and shmdt(2)

2023-08-22 Thread Warner Losh
On Tue, Aug 22, 2023 at 12:11 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/22/23 11:03, Warner Losh wrote: > > Hmm, bug with linux-user as well, because here we should > re-establish the reserved_va > > reservation. > > > > > > ... of the shared memory region we just

Re: [PATCH v2 4/4] iotests: test the zoned format feature for qcow2 file

2023-08-22 Thread Stefan Hajnoczi
On Mon, Aug 14, 2023 at 04:58:02PM +0800, Sam Li wrote: > The zoned format feature can be tested by: > $ tests/qemu-iotests/check zoned-qcow2 > > Signed-off-by: Sam Li > --- > tests/qemu-iotests/tests/zoned-qcow2 | 135 ++ > tests/qemu-iotests/tests/zoned-qcow2.out | 140

Re: [PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-22 Thread Stefan Hajnoczi
On Mon, Aug 14, 2023 at 04:58:01PM +0800, Sam Li wrote: > By adding zone operations and zoned metadata, the zoned emulation > capability enables full emulation support of zoned device using > a qcow2 file. The zoned device metadata includes zone type, > zoned device state and write pointer of each

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-08-22 Thread Michael Tokarev
22.08.2023 22:33, Michael Tokarev wrote: 22.08.2023 22:02, timothee.coca...@gmail.com wrote: Hi, Maybe its too late for the 8.1 window, but I noticed that this patchset fixes a segfault in qemu-system-ppc (and other 32 bits archs ?) introduced by commit fb2c53c. Therefore maybe it would be

Re: [PATCH 21/21] block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:20PM +0200, Kevin Wolf wrote: > The functions read the parents list in the generic block layer, so we > need to hold the graph lock already there. The BlockDriver > implementations actually modify the graph, so it has to be a writer > lock. > > Signed-off-by: Kevin

Re: [PATCH 20/21] block: Mark bdrv_unref_child() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:19PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_unref_child(). These callers will typically > already hold the graph lock once the locking work is completed, which > means that they

Re: [PATCH 19/21] block: Mark bdrv_root_unref_child() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:18PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_root_unref_child(). These callers will > typically already hold the graph lock once the locking work is > completed, which means that

Re: [PATCH 07/12] target/ppc: Use generic hrev64_i64() in BRH / BSWAP16x8 opcodes

2023-08-22 Thread Daniel Henrique Barboza
On 8/22/23 09:53, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Daniel Henrique Barboza target/ppc/translate.c | 10 +- target/ppc/translate/vsx-impl.c.inc | 19 ++- 2 files changed, 3 insertions(+), 26

Re: [PATCH 17/21] block: Take graph rdlock in bdrv_drop_intermediate()

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:16PM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > Signed-off-by: Kevin Wolf > --- > block.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/block.c b/block.c > index 7df8780d6e..a82389f742

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-08-22 Thread Michael Tokarev
22.08.2023 22:02, timothee.coca...@gmail.com wrote: Hi, Maybe its too late for the 8.1 window, but I noticed that this patchset fixes a segfault in qemu-system-ppc (and other 32 bits archs ?) introduced by commit fb2c53c. Therefore maybe it would be relevant to get merge it before 8.2. It's

Re: [PATCH 16/21] block: Mark bdrv_parent_cb_change_media() GRAPH_RDLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:15PM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > Signed-off-by: Kevin Wolf > --- > block.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc

Re: [PATCH 15/21] block: Mark bdrv_child_perm() GRAPH_RDLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:14PM +0200, Kevin Wolf wrote: > This adds GRAPH_RDLOCK annotations to declare that callers of > bdrv_child_perm() need to hold a reader lock for the graph because > some implementations access the children list of a node. > > The callers of bdrv_child_perm()

Re: [PATCH 14/21] block: Mark bdrv_get_cumulative_perm() and callers GRAPH_RDLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:13PM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > This happens to result in BlockDriver.bdrv_set_perm() to be called with > the graph lock held. For consistency, make it the same for all of the > BlockDriver

Re: [PATCH v2 1/9] nvdimm: Reject writing label data to ROM instead of crashing QEMU

2023-08-22 Thread Stefan Hajnoczi
On Tue, Aug 22, 2023 at 01:44:49PM +0200, David Hildenbrand wrote: > Currently, when using a true R/O NVDIMM (ROM memory backend) with a label > area, the VM can easily crash QEMU by trying to write to the label area, > because the ROM memory is mmap'ed without PROT_WRITE. > > [root@vm-0 ~]#

Re: [PATCH 13/21] block: Mark bdrv_parent_perms_conflict() and callers GRAPH_RDLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:12PM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > Signed-off-by: Kevin Wolf > --- > include/block/block_int-common.h| 6 ++--- > include/block/block_int-global-state.h | 8 +++--- >

Re: [PATCH 12/21] block: Mark bdrv_attach_child() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:11PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_attach_child_common(). These callers will > typically already hold the graph lock once the locking work is > completed, which means

[PATCH v7 01/12] Add virtio-sound device stub

2023-08-22 Thread Emmanouil Pitsidianakis
Add a new VIRTIO device for the virtio sound device id. Functionality will be added in the following commits. Signed-off-by: Emmanouil Pitsidianakis --- MAINTAINERS| 6 + hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + hw/virtio/trace-events

[PATCH v7 08/12] virtio-sound: handle VIRTIO_SND_R_PCM_PREPARE

2023-08-22 Thread Emmanouil Pitsidianakis
Handles the PCM prepare control request. It initializes a PCM stream when the guests asks for it. Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/virtio-snd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/virtio/virtio-snd.c b/hw/virtio/virtio-snd.c index

[PATCH v7 05/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-08-22 Thread Emmanouil Pitsidianakis
Respond to the VIRTIO_SND_R_PCM_INFO control request with the parameters of each requested PCM stream. Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 1 + hw/virtio/virtio-snd.c | 76 ++ 2 files changed, 77 insertions(+) diff --git

[PATCH v7 10/12] virtio-sound: implement audio output (TX)

2023-08-22 Thread Emmanouil Pitsidianakis
Handle output IO messages in the transmit (TX) virtqueue. It allocates a VirtIOSoundPCMBlock for each IO message and copies the data buffer to it. When the IO buffer is written to the host's sound card, the guest will be notified that it has been consumed. The lifetime of an IO message is: 1.

[PATCH v7 03/12] virtio-sound: handle control messages and streams

2023-08-22 Thread Emmanouil Pitsidianakis
Receive guest requests in the control (CTRL) queue of the virtio sound device and reply with a NOT SUPPORTED error to all control commands. The receiving handler is virtio_snd_handle_ctrl(). It stores all control messages in the queue in the device's command queue. Then it calls

[PATCH v7 04/12] virtio-sound: set PCM stream parameters

2023-08-22 Thread Emmanouil Pitsidianakis
This commit sets the virtio-snd device's default PCM parameters in virtio_snd_pcm_set_params_impl(). The same function will be used to set parameters from the guest with VIRTIO_SND_R_PCM_SET_PARAMS in a follow-up commit. PCM parameters describe the sound card parameters that the guest's kernel

[PATCH v7 12/12] docs/system: add basic virtio-snd documentation

2023-08-22 Thread Emmanouil Pitsidianakis
This commit adds basic documentation for using virtio-snd. Signed-off-by: Emmanouil Pitsidianakis --- docs/system/device-emulation.rst | 1 + docs/system/devices/virtio-snd.rst | 49 ++ 2 files changed, 50 insertions(+) create mode 100644

[PATCH v7 09/12] virtio-sound: handle VIRTIO_SND_PCM_RELEASE

2023-08-22 Thread Emmanouil Pitsidianakis
Handle the PCM release control request, which is necessary for flushing pending sound IO. No IO is handled yet so currently it only replies to the request. Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 1 + hw/virtio/virtio-snd.c | 38

[PATCH v7 07/12] virtio-sound: handle VIRTIO_SND_PCM_SET_PARAMS

2023-08-22 Thread Emmanouil Pitsidianakis
Handle the set parameters control request. It reconfigures a stream based on a guest's preference if the values are valid and supported. Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 1 + hw/virtio/virtio-snd.c | 26 ++ 2 files changed, 27

[PATCH v7 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_{START,STOP}

2023-08-22 Thread Emmanouil Pitsidianakis
Handle the start and stop control messages for a stream_id. This request does nothing at the moment except for replying to it. Audio playback or capture will be started/stopped here in follow-up commits. Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 1 +

[PATCH v7 11/12] virtio-sound: implement audio capture (RX)

2023-08-22 Thread Emmanouil Pitsidianakis
To perform audio capture we duplicate the TX logic of the previous commit with the following difference: we receive data from the QEMU audio backend and write it in the virt queue IO buffers the guest sends to QEMU. When they are full (i.e. they have `period_bytes` amount of data) or when

Re: [PATCH 11/21] block: Call transaction callbacks with lock held

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:10PM +0200, Kevin Wolf wrote: > In previous patches, we changed some transactionable functions to be > marked as GRAPH_WRLOCK, but required that tran_finalize() is still > called without the lock. This was because all callbacks that can be in > the same transaction

[PATCH v7 02/12] Add virtio-sound-pci device

2023-08-22 Thread Emmanouil Pitsidianakis
This patch adds a PCI wrapper device for the virtio-sound device. It is necessary to instantiate a virtio-snd device in a guest. All sound logic will be added to the virtio-snd device in the following commits. To add this device with a guest, you'll need a >=5.13 kernel compiled with

[PATCH v7 00/12] Add VIRTIO sound card

2023-08-22 Thread Emmanouil Pitsidianakis
This patch series adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. v7 can be found online at: https://github.com/epilys/qemu-virtio-snd/tree/virtio-snd-v7 Main differences with v6 patch series [^v6] : - Removed minor stale/duplicate

Re: [PATCH 10/21] block: Mark bdrv_attach_child_common() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:09PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_attach_child_common(). These callers will > typically already hold the graph lock once the locking work is > completed, which means

Re: [PATCH 09/21] block: Mark bdrv_replace_child_tran() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:08PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_replace_child_tran(). These callers will > typically already hold the graph lock once the locking work is > completed, which means that

Re: [PATCH 08/21] block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCK

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:07PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_replace_child_noperm(). These callers will > typically already hold the graph lock once the locking work is > completed, which means

Re: [PATCH 07/21] block-coroutine-wrapper: Allow arbitrary parameter names

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:06PM +0200, Kevin Wolf wrote: > Don't assume specific parameter names like 'bs' or 'blk' in the > generated code, but use the actual name. > > Signed-off-by: Kevin Wolf > --- > scripts/block-coroutine-wrapper.py | 7 --- > 1 file changed, 4 insertions(+), 3

Re: [PATCH 06/21] block-coroutine-wrapper: Add no_co_wrapper_bdrv_wrlock functions

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:05PM +0200, Kevin Wolf wrote: > Add a new wrapper type for GRAPH_WRLOCK functions that should be called > from coroutine context. > > Signed-off-by: Kevin Wolf > --- > include/block/block-common.h | 4 > scripts/block-coroutine-wrapper.py | 11

  1   2   3   4   >