Re: [Stable-10.0.3 00/39] Patch Round-up for stable 10.0.3, freeze on 2025-07-21

2025-07-11 Thread Volker Rümelin
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine > 14 31753d5a336f Sairaj Kodilkar: > hw/i386/amd_iommu: Fix device setup failure when PT is on. > 15 0f178860df34 Vasant Hegde: >hw/i386/amd_iommu: Fix xtsup when vcpus < 255 > 16 5ddd6c8dc849 Volker Rümelin: >a

Re: [PULL 3/9] audio: fix size calculation in AUD_get_buffer_size_out()

2025-07-09 Thread Volker Rümelin
Am 09.07.25 um 04:24 schrieb Michael Tokarev: > On 25.05.2025 16:27, marcandre.lur...@redhat.com wrote: >> From: Volker Rümelin >> >> The buffer size calculated by AUD_get_buffer_size_out() is often >> incorrect. sw->hw->samples * sw->hw->info.bytes_per_fr

[PATCH 2/3] hw/audio/sb16: improve DMA handling

2025-07-07 Thread Volker Rümelin
utine of the audio subsystem raises the DREQ signal as soon as new samples are needed and also starts the DMA callback routine. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/469 Signed-off-by: Volker Rümelin --- hw/audio/sb16.c | 23 +-- 1 file changed, 21 insertions(

[PATCH 3/3] hw/audio/sb16: block structure coding style fixes

2025-07-07 Thread Volker Rümelin
Change the block structure according to the QEMU Coding Style documentation. Signed-off-by: Volker Rümelin --- hw/audio/sb16.c | 57 + 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index

[PATCH 1/3] hw/audio/sb16: introduce DMA helper functions

2025-07-07 Thread Volker Rümelin
Introduce the hold_DREQ() and release_DREQ() functions to ease the review of the next patch. Signed-off-by: Volker Rümelin --- hw/audio/sb16.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index bac64118fe

[PATCH 0/3] hw/audio/sb16: reduce the CPU load

2025-07-07 Thread Volker Rümelin
L2 chip is part of the Sound Blaster 16 emulation. The real Sound Blaster 16 used an OPL3 chip. Volker Rümelin (3):   hw/audio/sb16: introduce DMA helper functions   hw/audio/sb16: improve DMA handling   hw/audio/sb16: block structure coding style fixes  hw/aud

[PATCH v2 7/7] audio: add float sample endianness converters

2025-05-14 Thread Volker Rümelin
André Lureau Signed-off-by: Volker Rümelin --- audio/audio.c | 3 +- audio/audio_template.h | 12 --- audio/mixeng.c | 75 ++ audio/mixeng.h | 6 ++-- 4 files changed, 82 insertions(+), 14 deletions(-) diff --git a/audio/aud

[PATCH v2 5/7] hw/audio/asc: replace g_malloc0() with g_malloc()

2025-05-14 Thread Volker Rümelin
There is no need to allocate initialized memory with g_malloc0() if it's directly followed by a memset() function call. g_malloc() is sufficient. Reviewed-by: Marc-André Lureau Reviewed-by: Mark Cave-Ayland Signed-off-by: Volker Rümelin --- hw/audio/asc.c | 2 +- 1 file changed, 1 inse

[PATCH v2 4/7] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-14 Thread Volker Rümelin
AUD_open_out() may fail and return NULL. This may then lead to a segmentation fault in memset() below. The memset() behaviour is undefined if the pointer to the destination object is a null pointer. Add the missing error handling code. Reviewed-by: Marc-André Lureau Signed-off-by: Volker

[PATCH v2 1/7] tests/functional: use 'none' audio driver for q800 tests

2025-05-14 Thread Volker Rümelin
ed in all q800 tests. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2812 Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- tests/functional/test_m68k_q800.py | 3 ++- tests/functional/test_m68k_replay.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)

[PATCH v2 2/7] audio: fix SIGSEGV in AUD_get_buffer_size_out()

2025-05-14 Thread Volker Rümelin
audio_*_out() functions handle this case. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 41ee11aaad..70ef22b1a4 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -905,6

[PATCH v2 6/7] audio/mixeng: remove unnecessary pointer type casts

2025-05-14 Thread Volker Rümelin
A simple assignment automatically converts a void pointer type to any other pointer type. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/mixeng.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio/mixeng.c b/audio/mixeng.c index 69f6549224

[PATCH v2 3/7] audio: fix size calculation in AUD_get_buffer_size_out()

2025-05-14 Thread Volker Rümelin
size of the frontend buffer can differ significantly. Return the correct buffer size when the mixing engine is used. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 70ef22b1a4

[PATCH v2 0/7] audio related fixes for 10.1

2025-05-14 Thread Volker Rümelin
GV in asc_realize()" Only call AUD_remove_card() to handle cleanup. Volker Rümelin (7): tests/functional: use 'none' audio driver for q800 tests audio: fix SIGSEGV in AUD_get_buffer_size_out() audio: fix size calculation in AUD_get_buffer_size_out() hw/audio/asc: fix SIG

Re: [PATCH 0/7] audio related fixes for 10.1

2025-05-13 Thread Volker Rümelin
Am 13.05.25 um 08:40 schrieb Michael Tokarev: > 11.05.2025 10:36, Volker Rümelin wrote: >> A few audio related fixes for 10.1. >> >> The virtio-sound device is the first QEMU audio front end that >> supports floating point samples. The audio subsystem is only >>

Re: [PATCH 4/7] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-13 Thread Volker Rümelin
Am 13.05.25 um 10:17 schrieb Mark Cave-Ayland: > On 13/05/2025 07:14, Volker Rümelin wrote: > >> Am 11.05.25 um 13:52 schrieb Mark Cave-Ayland: >>> On 11/05/2025 08:38, Volker Rümelin wrote: >>> >>>> AUD_open_out() may fail and return NULL. This may then l

Re: [PATCH 4/7] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-12 Thread Volker Rümelin
Am 11.05.25 um 13:52 schrieb Mark Cave-Ayland: > On 11/05/2025 08:38, Volker Rümelin wrote: > >> AUD_open_out() may fail and return NULL. This may then lead to >> a segmentation fault in memset() below. The memset() behaviour >> is undefined if the pointer to the dest

[PATCH 7/7] audio: add float sample endianness converters

2025-05-11 Thread Volker Rümelin
evice that supports floating point samples crept in with commit eb9ad377bb ("virtio-sound: handle control messages and streams"). Add code for the audio subsystem to convert float samples to the correct endianness. The type punning code was taken from the PipeWire project. Signed-of

[PATCH 4/7] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-11 Thread Volker Rümelin
AUD_open_out() may fail and return NULL. This may then lead to a segmentation fault in memset() below. The memset() behaviour is undefined if the pointer to the destination object is a null pointer. Add the missing error handling code. Signed-off-by: Volker Rümelin --- hw/audio/asc.c | 7

[PATCH 2/7] audio: fix SIGSEGV in AUD_get_buffer_size_out()

2025-05-11 Thread Volker Rümelin
audio_*_out() functions handle this case. Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 41ee11aaad..70ef22b1a4 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -905,6 +905,10 @@ size_t AUD_read(SWVoiceIn

[PATCH 5/7] hw/audio/asc: replace g_malloc0() with g_malloc()

2025-05-11 Thread Volker Rümelin
There is no need to allocate initialized memory with g_malloc0() if it's directly followed by a memset() function call. g_malloc() is sufficient. Signed-off-by: Volker Rümelin --- hw/audio/asc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/asc.c b/hw/audio/

[PATCH 3/7] audio: fix size calculation in AUD_get_buffer_size_out()

2025-05-11 Thread Volker Rümelin
size of the frontend buffer can differ significantly. Return the correct buffer size when the mixing engine is used. Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 70ef22b1a4..3f5baf0cc6 100644 --- a/audio/a

[PATCH 1/7] tests/functional: use 'none' audio driver for q800 tests

2025-05-11 Thread Volker Rümelin
ed in all q800 tests. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2812 Signed-off-by: Volker Rümelin --- tests/functional/test_m68k_q800.py | 3 ++- tests/functional/test_m68k_replay.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/functional/test_m

[PATCH 6/7] audio/mixeng: remove unnecessary pointer type casts

2025-05-11 Thread Volker Rümelin
A simple assignment automatically converts a void pointer type to any other pointer type. Signed-off-by: Volker Rümelin --- audio/mixeng.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio/mixeng.c b/audio/mixeng.c index 69f6549224..13e1ff9b08 100644 --- a/audio

[PATCH 0/7] audio related fixes for 10.1

2025-05-11 Thread Volker Rümelin
s. The new code paths in patch 7/7 are only compile tested. I don't have a big endian host to test. checkpatch.pl complains about missing space characters in the type punning macros in patch 7/7. I don't agree. Volker Rümelin (7): tests/functional: use 'none' audio driv

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-04-08 Thread Volker Rümelin
5, Christian Schoenebeck wrote: >>>>> On Sunday, March 16, 2025 1:20:46 AM CET BALATON Zoltan wrote: >>>>>> Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to >>>>>> use an event loop instead of the audio timer. This works

Re: [PATCH] vvfat: refresh writing long filename

2025-01-18 Thread Volker Rümelin
Am 18.01.25 um 21:55 schrieb Michael Tokarev: > 18.01.2025 23:32, Volker Rümelin wrote: > >> The rules are: >> If the file name length in characters is a multiple of 13 you are done. >> Otherwise the remaining unused LFN direntry name array elements have to >> be fill

Re: [PATCH] vvfat: refresh writing long filename

2025-01-18 Thread Volker Rümelin
Am 18.01.25 um 18:35 schrieb Michael Tokarev: > In function create_long_filname(), the array name[8 + 3] in > struct direntry_t is used as if it were defined as name[32]. > This is intentional and works. It's nevertheless an out of > bounds array access. To avoid this problem, this patch adds a > s

[PATCH] vvfat: fix out of bounds array write

2025-01-05 Thread Volker Rümelin
ys. A directory entry for a long FAT file name is significantly different from a directory entry for a regular FAT file name. Signed-off-by: Volker Rümelin --- block/vvfat.c | 55 ++- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/

Re: [PATCH v3] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure

2025-01-03 Thread Volker Rümelin
Am 02.01.25 um 08:23 schrieb Thomas Huth: > On 02/01/2025 08.06, Philippe Mathieu-Daudé wrote: >> Hi Volker, >> >> On 31/12/24 12:59, Volker Rümelin wrote: >>> Windows only: >>> >>> The libSDL2 Windows message loop needs the libSDL2 Windows low &g

[PATCH v3] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure

2024-12-31 Thread Volker Rümelin
/qemu-project/qemu/-/issues/2323 Signed-off-by: Volker Rümelin --- v2: Remove the QEMU lowlevel keyboard hook procedure from the SDL2 UI backend. v3: Rebase to current master because of a merge conflict. ui/meson.build | 4 ui/sdl2.c | 26 -- 2 files changed

Re: [PULL 04/11] vvfat: fix ubsan issue in create_long_filename

2024-12-29 Thread Volker Rümelin
> Found with test sbsaref introduced in [1]. > > [1] > https://patchew.org/QEMU/20241203213629.2482806-1-pierrick.bouv...@linaro.org/ > > ../block/vvfat.c:433:24: runtime error: index 14 out of bounds for type > 'uint8_t [11]' > #0 0x56151a66b93a in create_long_filename ../block/vvfat.c:433 >

[PATCH v2] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure

2024-12-07 Thread Volker Rümelin
/qemu-project/qemu/-/issues/2323 Signed-off-by: Volker Rümelin --- ui/meson.build | 4 ui/sdl2.c | 26 -- 2 files changed, 30 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index 28c7381dd1..35fb04cadf 100644 --- a/ui/meson.build +++ b/ui/meson.build

Re: [PULL 16/18] hw/audio/virtio-sound: fix heap buffer overflow

2024-09-13 Thread Volker Rümelin
Cc: qemu-sta...@nongnu.org stable-8.2, stable-9.0 and stable-9.1 > From: Volker Rümelin > > Currently, the guest may write to the device configuration space, > whereas the virtio sound device specification in chapter 5.14.4 > clearly states that the fields in the device conf

Re: [PATCH 1/3] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure

2024-09-09 Thread Volker Rümelin
Am 09.09.24 um 09:26 schrieb Marc-André Lureau: > Hi > > On Mon, Sep 9, 2024 at 10:22 AM Volker Rümelin wrote: >> Windows only: >> >> The libSDL2 Windows message loop needs the libSDL2 Windows low >> level keyboard hook procedure to grab the left and right Window

[PATCH 2/3] ui/sdl2: release all modifiers

2024-09-08 Thread Volker Rümelin
-by: Volker Rümelin --- include/ui/sdl2.h | 1 + ui/sdl2-input.c | 5 + ui/sdl2.c | 1 + 3 files changed, 7 insertions(+) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index e3acc7c82a..6907115809 100644 --- a/include/ui/sdl2.h +++ b/include/ui/sdl2.h @@ -60,6 +60,7 @@ void

[PATCH 1/3] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure

2024-09-08 Thread Volker Rümelin
/qemu/-/issues/2323 Tested-by: Howard Spoelstra Signed-off-by: Volker Rümelin --- ui/sdl2.c | 53 ++--- ui/win32-kbd-hook.c | 3 +++ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 98ed974371..ac37c

[PATCH 3/3] ui/sdl2: ignore GUI keys in SDL_TEXTINPUT handler

2024-09-08 Thread Volker Rümelin
. Tested-by: Howard Spoelstra Signed-off-by: Volker Rümelin --- include/ui/sdl2.h | 1 + ui/sdl2.c | 17 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index 6907115809..dbe6e3d973 100644 --- a/include/ui/sdl2.h

SDL2 keyboard fixes on Windows

2024-09-08 Thread Volker Rümelin
there are other key combinations such as Win-Space or Win-L where it's not possible to prevent the operating system from executing the corresponding functions. The other two patches prevent stuck modifier keys and unexpected text input on Windows. Volker Rümelin (3):   ui/sdl2: reenabl

Re: [PATCH v1 0/4] virtio_snd_set_config: Fix #2296

2024-09-01 Thread Volker Rümelin
Am 22.04.24 um 14:52 schrieb Manos Pitsidianakis: > Changing the number of streams via virtio_snd_set_config() did not > re-configure the audio card, leaving it in an invalid state. > > Reported in https://gitlab.com/qemu-project/qemu/-/issues/2296 > > Manos Pitsidianakis (4): > virtio-snd: add v

[PATCH] hw/audio/virtio-sound: fix heap buffer overflow

2024-09-01 Thread Volker Rümelin
heap buffer overflow. See QEMU issue #2296. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2296 Signed-off-by: Volker Rümelin --- hw/audio/trace-events | 1 - hw/audio/virtio-snd.c | 24 2 files changed, 25 deletions(-) diff --git a/hw/audio/trace-events b/hw

Re: [PULL 2/3] hw/audio/virtio-snd: fix invalid param check

2024-08-29 Thread Volker Rümelin
Cc: qemu-sta...@nongnu.org Without this patch, the virtio-sound device will not work in the next QEMU stable-8.2 and stable-9.0 versions. With best regards, Volker > From: Volker Rümelin > > Commit 9b6083465f ("virtio-snd: check for invalid param shift > operands") tr

[PATCH] hw/audio/virtio-snd: fix invalid param check

2024-08-02 Thread Volker Rümelin
data type. Fixes: 9b6083465f ("virtio-snd: check for invalid param shift operands") Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index e5196aa4bb..d1cf5eb445 1

Re: [PULL v2 17/61] virtio-snd: check for invalid param shift operands

2024-08-01 Thread Volker Rümelin
Am 01.08.24 um 10:22 schrieb Michael S. Tsirkin: > On Sat, Jul 27, 2024 at 08:55:10AM +0200, Volker Rümelin wrote: >>> From: Manos Pitsidianakis >>> >>> When setting the parameters of a PCM stream, we compute the bit flag >>> with the format and rate value

Re: [PULL v2 17/61] virtio-snd: check for invalid param shift operands

2024-07-26 Thread Volker Rümelin
> From: Manos Pitsidianakis > > When setting the parameters of a PCM stream, we compute the bit flag > with the format and rate values as shift operand to check if they are > set in supported_formats and supported_rates. > > If the guest provides a format/rate value which when shifting 1 results >

Re: [PATCH] docs: fix the html docs search function

2024-07-18 Thread Volker Rümelin
Am 18.07.24 um 11:17 schrieb Peter Maydell: > On Wed, 17 Jul 2024 at 21:11, Volker Rümelin wrote: >> Fix the search function in Sphinx generated html docs when built >> with Sphinx >= 6.0.0. >> >> Quote from the Sphinx blog at >> https://blog.readthedocs.com/s

[PATCH] docs: fix the html docs search function

2024-07-17 Thread Volker Rümelin
new extension sphinxcontrib-jquery. It is included automatically by sphinx-rtd-theme, so if you are using our theme, you will also continue to have jQuery available in your documentation. Signed-off-by: Volker Rümelin --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d

Re: [PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-29 Thread Volker Rümelin
Am 28.05.24 um 12:02 schrieb Gerd Hoffmann: > Hi, > >>> virtio-snd >>> -M: Gerd Hoffmann >>> -R: Manos Pitsidianakis >>> +M: Manos Pitsidianakis >>> +R: Matias Ezequiel Vara Larsen >>> S: Supported >>> F: hw/audio/virtio-snd.c >>> F: hw/audio/virtio-snd-pci.c >> While extra reviewers are

Re: [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field

2024-04-28 Thread Volker Rümelin
Am 26.04.24 um 21:41 schrieb Philippe Mathieu-Daudé: > WHPX has a specific use of the CPUState::vcpu_dirty field > (CPUState::vcpu_dirty is not used by common code). > To make this field accel-specific, add and use a new > @dirty variable in the AccelCPUState structure. > > Signed-off-by: Philippe

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-22 Thread Volker Rümelin
Am 20.04.24 um 07:40 schrieb Mark Cave-Ayland: > On 20/04/2024 02:21, Richard Henderson wrote: > >> On 4/19/24 12:51, Mark Cave-Ayland wrote: >>> The various Intel CPU manuals claim that SGDT and SIDT can write >>> either 24-bits >>> or 32-bits depending upon the operand size, but this is incorrect

Re: [PATCH] usb-audio: Fix invalid values in AudioControl descriptors

2024-03-17 Thread Volker Rümelin
0x37, not 0x38. In Linux, "lsusb -D ..." displays > incomplete descriptor information when this length is incorrect. > > Signed-off-by: Joonas Kankaala lsusb also misinterprets the invalid interface protocol 0x4 and uses 0x30 instead. Reviewed-by: Volker Rümelin > --- >

Re: [PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-25 Thread Volker Rümelin
Am 21.02.24 um 22:16 schrieb Philippe Mathieu-Daudé: > From: Bernhard Beschow > > Rather than distributing PC system flash handling across three files, let's > confine it to one. Now, pc_system_firmware_init() creates, configures and > cleans > up the system flash which makes the code easier to u

[PATCH v2 09/11] hw/audio/virtio-sound: introduce virtio_snd_set_active()

2024-02-18 Thread Volker Rümelin
Split out the function virtio_snd_pcm_set_active() from virtio_snd_pcm_start_stop(). A later patch also needs this new funcion. There is no functional change. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 21 - 1 file changed, 16

[PATCH v2 08/11] hw/audio/virtio-sound: introduce virtio_snd_pcm_open()

2024-02-18 Thread Volker Rümelin
Split out the function virtio_snd_pcm_open() from virtio_snd_pcm_prepare(). A later patch also needs the new function. There is no functional change. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 57 +++ 1 file

[PATCH v2 06/11] hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()

2024-02-18 Thread Volker Rümelin
Split out virtio_snd_pcm_start_stop(). This is a preparation for the next patch so that it doesn't become too big. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/trace-events | 3 ++- hw/audio/virtio-snd.c | 57 --- 2

[PATCH v2 05/11] hw/audio/virtio-sound: free all stream buffers on reset

2024-02-18 Thread Volker Rümelin
All remaining stream buffers in the stream queues must be freed after a reset. This is the initial state of the virtio-sound device. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio

[PATCH v2 02/11] hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler

2024-02-18 Thread Volker Rümelin
. Don't try to handle the invalid virtio queue element with a stream queue. Instead, push the invalid queue element back to the guest immediately. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 100 ++ include/hw/audio/virtio-snd.h | 1

[PATCH v2 07/11] hw/audio/virtio-sound: add stream state variable

2024-02-18 Thread Volker Rümelin
, only one copy of the audio stream parameters is required and these do not need to be initialised with default values. The state variable will also make it easier to restore the audio stream after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 213

[PATCH v2 03/11] hw/audio/virtio-sound: remove command and stream mutexes

2024-02-18 Thread Volker Rümelin
All code in virtio-snd.c runs with the BQL held. Remove the command queue mutex and the stream queue mutexes. The qatomic functions are also not needed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 215 +++--- include/hw/audio/virtio-snd.h | 3

[PATCH v2 04/11] hw/audio/virtio-sound: allocate an array of streams

2024-02-18 Thread Volker Rümelin
immediately after allocation. This makes it easier to remove the virtio_snd_set_pcm_params() and virtio_snd_pcm_prepare() calls in the realisation phase and to migrate the audio streams of the virtio sound device after the next few patches. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c

[PATCH v2 11/11] hw/audio/virtio-sound: add placeholder for buffer write position

2024-02-18 Thread Volker Rümelin
issues. However, the placeholder makes it possible to add code in a backwards and forwards compatible way. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 2 ++ include/hw/audio/virtio-snd.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH v2 10/11] hw/audio/virtio-sound: add missing vmstate fields

2024-02-18 Thread Volker Rümelin
after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 84 +++ include/hw/audio/virtio-snd.h | 1 + 2 files changed, 77 insertions(+), 8 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 06a27ef8d9..b0a0ff2456

[PATCH v2 01/11] hw/audio/virtio-sound: return correct command response size

2024-02-18 Thread Volker Rümelin
virtio_snd_ctrl_command to allow for additional payloads. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 7 +-- include/hw/audio/virtio-snd.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH v2 00/11] virtio-sound migration part 1

2024-02-18 Thread Volker Rümelin
iable on reset. Once a stream has been opened, it will only be closed after a reset or when QEMU shuts down. Patch 10/11 "add missing vmstate fields" resets the inuse variables on reset. Volker Rümelin (11):   hw/audio/virtio-sound: return correct command response size   hw/audio/virti

Re: [PATCH 05/10] hw/audio/virtio-sound: return correct command response size

2024-02-18 Thread Volker Rümelin
Am 05.01.24 um 12:36 schrieb Marc-André Lureau: > Hi > > On Fri, Jan 5, 2024 at 12:34 AM Volker Rümelin wrote: >> The payload size returned by command VIRTIO_SND_R_PCM_INFO is >> wrong. The code in process_cmd() assumes that all commands >> return only a virtio_snd_hdr

Re: [PATCH 02/10] hw/audio/virtio-sound: allocate all streams in advance

2024-01-06 Thread Volker Rümelin
Am 05.01.24 um 11:54 schrieb Marc-André Lureau: > Hi > > On Fri, Jan 5, 2024 at 12:34 AM Volker Rümelin wrote: >> It is much easier to migrate an array of structs than individual >> structs that are accessed via a pointer to a pointer to an array >> of pointers to stru

[PATCH 07/10] hw/audio/virtio-sound: introduce virtio_snd_set_active()

2024-01-04 Thread Volker Rümelin
Split out the function virtio_snd_pcm_set_active() from virtio_snd_pcm_start_stop(). A later patch also needs this new funcion. There is no functional change. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 21 - 1 file changed, 16 insertions(+), 5 deletions

[PATCH 04/10] hw/audio/virtio-sound: add stream state variable

2024-01-04 Thread Volker Rümelin
, only one copy of the audio stream parameters is required and these do not need to be initialised with default values. The state variable will also make it easier to restore the audio stream after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 219

[PATCH 08/10] hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler

2024-01-04 Thread Volker Rümelin
quite early so they are always available to avoid this kind of issue. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 84 --- include/hw/audio/virtio-snd.h | 8 +++- 2 files changed, 45 insertions(+), 47 deletions(-) diff --git a/hw/audio/v

[PATCH 10/10] hw/audio/virtio-sound: add placeholder for buffer write position

2024-01-04 Thread Volker Rümelin
issues. However, the placeholder makes it possible to add code in a backwards and forwards compatible way. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 2 ++ include/hw/audio/virtio-snd.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH 09/10] hw/audio/virtio-sound: add missing vmstate fields

2024-01-04 Thread Volker Rümelin
after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 81 +++ include/hw/audio/virtio-snd.h | 1 + 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 92b10287ad..328ee54808

[PATCH 03/10] hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()

2024-01-04 Thread Volker Rümelin
Split out virtio_snd_pcm_start_stop(). This is a preparation for the next patch so that it doesn't become too big. Signed-off-by: Volker Rümelin --- hw/audio/trace-events | 3 ++- hw/audio/virtio-snd.c | 57 --- 2 files changed, 39 insertions(+

[PATCH 05/10] hw/audio/virtio-sound: return correct command response size

2024-01-04 Thread Volker Rümelin
virtio_snd_ctrl_command to allow for additional payloads. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 7 +-- include/hw/audio/virtio-snd.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index a2817a64b5

[PATCH 02/10] hw/audio/virtio-sound: allocate all streams in advance

2024-01-04 Thread Volker Rümelin
variables that are constant at runtime are initialised immediately after allocation. This is a step towards being able to migrate the audio streams of the virtio sound device after the next few patches. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 35

[PATCH 06/10] hw/audio/virtio-sound: introduce virtio_snd_pcm_open()

2024-01-04 Thread Volker Rümelin
Split out the function virtio_snd_pcm_open() from virtio_snd_pcm_prepare(). A later patch also needs the new function. There is no functional change. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 57 +++ 1 file changed, 31 insertions(+), 26

[PATCH 01/10] hw/audio/virtio-sound: remove command and stream mutexes

2024-01-04 Thread Volker Rümelin
All code in virtio-snd.c runs with the BQL held. Remove the command queue mutex and the stream queue mutexes. The qatomic functions are also not needed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 294 +++--- include/hw/audio/virtio-snd.h | 3

[PATCH 00/10] virtio-sound migration part 1

2024-01-04 Thread Volker Rümelin
Here is the first part of my virtio-sound patches. Most of them are a preparation to make migration work. Patch 09/10 enables migration of the virtio-sound device. The second part isn't finished yet and will have to do with virtio-sound jack and channel maps configuration and migration. V

[PATCH] hw/vfio: fix iteration over global VFIODevice list

2023-12-29 Thread Volker Rümelin
roduce a global VFIODevice list") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2061 Signed-off-by: Volker Rümelin --- hw/vfio/common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 08a3e57672..3ba892d7d3

Re: [PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-03 Thread Volker Rümelin
Am 04.12.23 um 08:28 schrieb Volker Rümelin: > The virtio-sound device is currently not migratable. QEMU crashes > on the source machine at some point during the migration with a > segmentation fault. > > Even with this bug fixed, the virtio-sound device doesn't migrate >

[PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-03 Thread Volker Rümelin
ce on the destination machine in a broken condition. Mark the device as unmigratable until these issues have been fixed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 2fe96

Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-12-03 Thread Volker Rümelin
Am 13.11.23 um 09:26 schrieb Marc-André Lureau: > Hi > > On Sat, Nov 11, 2023 at 2:40 PM Volker Rümelin wrote: >> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing >> scanout") introduced a regression when QEMU is running with a >> virtio-gpu-gl-

pending hw/audio patches for 8.2

2023-11-26 Thread Volker Rümelin
Hi, there are five pending reviewed hw/audio patches for 8.2. They are all bug fixes. It would be good if someone could send a pull request for rc2. I don't think Gerd will send it. The five patches are: ("hw/audio/hda-codec: fix multiplication overflow") https://lists.nongnu.org/archive/html/qe

virtio-sound segmentation fault

2023-11-15 Thread Volker Rümelin
Cc: qemu-devel Hi Manos, it's easy to trigger a segmentation fault with the virtio-sound device. The basic problem is that in function virtio_snd_realize() there is no code in the errror paths to undo the previous steps. To reproduce the segmentation fault start QEMU with an empty PCIe root port

Re: [PATCH] Fix Windows 2000 and XP HDAudio Support

2023-11-12 Thread Volker Rümelin
Am 12.11.23 um 01:37 schrieb Christopher Lentocha: > So wait, you want me to add it as another device name? Because > it is going to be the same exact way as the 1af4 device > just with a number change. Ok, work it is then ... > (Sorry about not getting back sooner also) > > Christopher Hi Christ

Re: disable-pie build

2023-11-11 Thread Volker Rümelin
Am 11.11.23 um 17:09 schrieb Paolo Bonzini: > On Sat, Nov 11, 2023 at 3:40 AM Michael Tokarev wrote: >> Hi! >> >> It looks like --disable-pie configure, which uses -fno-pie -no-pie flags >> for the compiler, is broken: it does not not tell the *linker* about the >> option, so the link fails (at le

Re: [PATCH] hw/audio/es1370: Clean up comment

2023-11-11 Thread Volker Rümelin
Am 10.11.23 um 17:43 schrieb Peter Maydell: > Replace a sweary comment with one that's a bit more helpful to > future readers of the code. > > Signed-off-by: Peter Maydell Reviewed-by: Volker Rümelin > --- > hw/audio/es1370.c | 9 +++-- > 1 file changed, 7

Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-11-11 Thread Volker Rümelin
> the regular code path so they get always called if one of the > gd_egl_init() calls was successful. > > Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") > Signed-off-by: Volker Rümelin > --- > ui/gtk-egl.c | 12 ++-- > 1 file c

[PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-11-11 Thread Volker Rümelin
gd_egl_init() calls was successful. Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") Signed-off-by: Volker Rümelin --- ui/gtk-egl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index cd2f176502..

Re: [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout

2023-11-10 Thread Volker Rümelin
>> From: Antonio Caggiano >> >> The first time gd_egl_scanout_texture() is called, there's a possibility >> that the GTK drawing area might not be realized yet, in which case its >> associated GdkWindow is NULL. This means gd_egl_init() was also skipped >> and the EGLContext and EGLSurface stored

Re: [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout

2023-11-09 Thread Volker Rümelin
> From: Antonio Caggiano > > The first time gd_egl_scanout_texture() is called, there's a possibility > that the GTK drawing area might not be realized yet, in which case its > associated GdkWindow is NULL. This means gd_egl_init() was also skipped > and the EGLContext and EGLSurface stored in the

[PATCH] hw/audio/virtio-snd-pci: fix the PCI class code

2023-11-07 Thread Volker Rümelin
the device to a multimedia audio controller. ~> sudo lspci -s '00:02.0' -v -nn | head -n 2 00:02.0 Multimedia audio controller [0401]: Red Hat, Inc. Device [1af4:1059] (rev 01) Subsystem: Red Hat, Inc. Device [1af4:1100] Signed-off-by: Volker Rümelin --- The two addit

Re: [PATCH 0/2] hw/audio/hda-codec bug fixes

2023-11-06 Thread Volker Rümelin
Am 06.11.23 um 20:54 schrieb Michael Tokarev: > 05.11.2023 20:23, Volker Rümelin : >> Patch 1/2 fixes a bug that was reported and correctly diagnosed on the >> QEMU devel mailing list. >> https://lists.nongnu.org/archive/html/qemu-devel/2023-08/msg02539.html >> There wa

[PATCH 2/2] hw/audio/hda-codec: reenable the audio mixer

2023-11-05 Thread Volker Rümelin
ng streams don't start muted by default. Fixes: b7639b7dd0 ("hw/audio: Simplify hda audio init") Signed-off-by: Volker Rümelin --- hw/audio/hda-codec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index f756

[PATCH 1/2] hw/audio/hda-codec: fix multiplication overflow

2023-11-05 Thread Volker Rümelin
econd timers that handle IO") Reported-by: M_O_Bz Signed-off-by: Volker Rümelin --- hw/audio/hda-codec.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index b9ad1f4c39..f756e419bb 100644 --- a/hw

[PATCH 0/2] hw/audio/hda-codec bug fixes

2023-11-05 Thread Volker Rümelin
.html Patch 2/2 corrects the sense of hda codec property mixer during initialization. It was inverted not too long ago. I guess Gerd is still busy with other projects. Another maintainer probably will have to take these patches. Volker Rümelin (2):   hw/audio/hda-codec: fix multiplication overflow

Re: [PATCH v12 02/11] Add virtio-sound-pci device

2023-10-22 Thread Volker Rümelin
Am 22.10.23 um 11:58 schrieb Manos Pitsidianakis: > Hello Volker, > > On Sat, 21 Oct 2023 12:07, Volker Rümelin wrote: >> the virtio-sound device alias doesn't work. > > Yes, there's no virtio-sound alias hence why it does not work. Sorry, I don't underst

Re: [PATCH v2 11/13] migration: Use vmstate_register_any() for audio

2023-10-21 Thread Volker Rümelin
Am 20.10.23 um 11:07 schrieb Juan Quintela: > We can have more than one audio card. Hi Juan, I wouldn't use the term "audio card" here. In QEMU speak, Audiodev is an "audio backend". With best regards, Volker > > void audio_init_audiodevs(void) > { > AudiodevListEntry *e; > > QSIMPLEQ_F

Re: [PATCH v12 02/11] Add virtio-sound-pci device

2023-10-21 Thread Volker Rümelin
Am 19.10.23 um 12:03 schrieb 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

Re: [PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-06 Thread Volker Rümelin
Am 06.10.23 um 00:13 schrieb BALATON Zoltan: > The Articia S is a generic chipset supporting several different CPUs > that were used on some PPC boards. This is a minimal emulation of the > parts needed for emulating the AmigaOne board. > > Signed-off-by: BALATON Zoltan > --- > hw/pci-host/Kconfi

Re: [PATCH v2 07/20] audio: add Apple Sound Chip (ASC) emulation

2023-09-23 Thread Volker Rümelin
Am 20.09.23 um 17:39 schrieb Mark Cave-Ayland: > On 14/09/2023 08:06, Volker Rümelin wrote: > >> Am 09.09.23 um 11:48 schrieb Mark Cave-Ayland: >>> The Apple Sound Chip was primarily used by the Macintosh II to >>> generate sound >>> in hardware which was pre

  1   2   3   4   5   6   7   >