All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/26] Kraxel 20221013 patches
@ 2022-10-13  6:51 Gerd Hoffmann
  2022-10-13  6:51 ` [PULL 01/26] audio: refactor code in audio_run_out() Gerd Hoffmann
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1:

  Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of https://github.com/stsquad/qemu into staging (2022-10-06 07:11:56 -0400)

are available in the Git repository at:

  https://gitlab.com/kraxel/qemu.git tags/kraxel-20221013-pull-request

for you to fetch changes up to 61ddafbcfac4975ee245cd3453be86b0632a5605:

  audio: improve out.voices test (2022-10-12 20:36:17 +0200)

----------------------------------------------------------------
pci: cleanup virtio ids.
audio: bugfixes and latency improvements.
misc fixes for hw/display and ui

----------------------------------------------------------------

Akihiko Odaki (1):
  ui/gtk: Fix the implicit mouse ungrabbing logic

Bryce Mills (1):
  gtk: Add show_menubar=on|off command line option.

Dongwon Kim (1):
  ui/gtk-egl: egl context needs to be unbound in the end of
    gd_egl_switch

Gerd Hoffmann (6):
  docs: add firmware feature flags
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM
  pci-ids: drop list of modern virtio devices
  pci-ids: document modern virtio-pci ids in pci.h too

Helge Konetzka (2):
  audio: fix in.voices test
  audio: improve out.voices test

Mauro Matteo Cascella (1):
  ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext

Sebastian Mitterle (1):
  qemu-edid: Restrict input parameter -d to avoid division by zero

Volker Rümelin (12):
  audio: refactor code in audio_run_out()
  audio: fix GUS audio playback with out.mixing-engine=off
  audio: run downstream playback queue unconditionally
  alsaaudio: reduce playback latency
  audio: add more audio rate control functions
  spiceaudio: add a pcm_ops buffer_get_free function
  spiceaudio: update comment
  audio: swap audio_rate_get_bytes() function parameters
  audio: rename audio_sw_bytes_free()
  audio: refactor audio_get_avail()
  audio: fix sw->buf size for audio recording
  audio: prevent an integer overflow in resampling code

lu zhipeng (1):
  cirrus_vga: fix potential memory overflow

 docs/specs/pci-ids.txt       |  16 +++--
 audio/audio_int.h            |   4 +-
 audio/audio_template.h       |   4 ++
 audio/rate_template.h        |  11 ++--
 include/hw/pci/pci.h         |  13 +++-
 audio/alsaaudio.c            |  38 +++++++++++-
 audio/audio.c                | 111 +++++++++++++++++++++++------------
 audio/dbusaudio.c            |   4 +-
 audio/noaudio.c              |   4 +-
 audio/spiceaudio.c           |  19 ++++--
 audio/wavaudio.c             |   2 +-
 hw/display/cirrus_vga.c      |   2 +-
 hw/virtio/virtio-iommu-pci.c |   4 +-
 hw/virtio/virtio-mem-pci.c   |   2 -
 hw/virtio/virtio-pci.c       |   2 +-
 hw/virtio/virtio-pmem-pci.c  |   2 -
 qemu-edid.c                  |   4 ++
 ui/gtk-egl.c                 |   3 +
 ui/gtk.c                     |  25 +++++---
 ui/vnc.c                     |  11 +++-
 docs/interop/firmware.json   |  21 +++++--
 qapi/ui.json                 |   5 +-
 qemu-options.hx              |   3 +
 23 files changed, 218 insertions(+), 92 deletions(-)

-- 
2.37.3



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PULL 01/26] audio: refactor code in audio_run_out()
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
@ 2022-10-13  6:51 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off Gerd Hoffmann
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Refactoring the code in audio_run_out() avoids code duplication
in the next patch. There's no functional change.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-1-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index df6818ed5598..08aec51e7085 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1121,8 +1121,12 @@ static void audio_run_out (AudioState *s)
     HWVoiceOut *hw = NULL;
     SWVoiceOut *sw;
 
-    if (!audio_get_pdo_out(s->dev)->mixing_engine) {
-        while ((hw = audio_pcm_hw_find_any_enabled_out(s, hw))) {
+    while ((hw = audio_pcm_hw_find_any_enabled_out(s, hw))) {
+        size_t played, live, prev_rpos;
+        size_t hw_free = audio_pcm_hw_get_free(hw);
+        int nb_live;
+
+        if (!audio_get_pdo_out(s->dev)->mixing_engine) {
             /* there is exactly 1 sw for each hw with no mixeng */
             sw = hw->sw_head.lh_first;
 
@@ -1137,14 +1141,9 @@ static void audio_run_out (AudioState *s)
             if (sw->active) {
                 sw->callback.fn(sw->callback.opaque, INT_MAX);
             }
-        }
-        return;
-    }
 
-    while ((hw = audio_pcm_hw_find_any_enabled_out(s, hw))) {
-        size_t played, live, prev_rpos;
-        size_t hw_free = audio_pcm_hw_get_free(hw);
-        int nb_live;
+            continue;
+        }
 
         for (sw = hw->sw_head.lh_first; sw; sw = sw->entries.le_next) {
             if (sw->active) {
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
  2022-10-13  6:51 ` [PULL 01/26] audio: refactor code in audio_run_out() Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 03/26] audio: run downstream playback queue unconditionally Gerd Hoffmann
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Fix GUS audio playback with out.mixing-engine=off.

The GUS audio device needs to know the amount of samples to
produce in advance.

To reproduce start qemu with
-parallel none -device gus,audiodev=audio0
-audiodev pa,id=audio0,out.mixing-engine=off

and start the cartoon.exe demo in a FreeDOS guest. The demo file
is available on the download page of the GUSemu32 author.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-2-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index 08aec51e7085..29da359b416b 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1139,7 +1139,8 @@ static void audio_run_out (AudioState *s)
             }
 
             if (sw->active) {
-                sw->callback.fn(sw->callback.opaque, INT_MAX);
+                sw->callback.fn(sw->callback.opaque,
+                                hw_free * sw->info.bytes_per_frame);
             }
 
             continue;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 03/26] audio: run downstream playback queue unconditionally
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
  2022-10-13  6:51 ` [PULL 01/26] audio: refactor code in audio_run_out() Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 04/26] alsaaudio: reduce playback latency Gerd Hoffmann
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Run the downstream playback queue even if the emulated audio
device didn't write new samples. There still may be buffered
audio samples downstream.

This is for the -audiodev out.mixing-engine=off case. Commit
a8a98cfd42 ("audio: run downstream playback queue uncondition-
ally") fixed the out.mixing-engine=on case.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 29da359b416b..567f953e66f9 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1143,6 +1143,10 @@ static void audio_run_out (AudioState *s)
                                 hw_free * sw->info.bytes_per_frame);
             }
 
+            if (hw->pcm_ops->run_buffer_out) {
+                hw->pcm_ops->run_buffer_out(hw);
+            }
+
             continue;
         }
 
@@ -1501,10 +1505,6 @@ size_t audio_generic_write(HWVoiceOut *hw, void *buf, size_t size)
         }
     }
 
-    if (hw->pcm_ops->run_buffer_out) {
-        hw->pcm_ops->run_buffer_out(hw);
-    }
-
     return total;
 }
 
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 04/26] alsaaudio: reduce playback latency
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 03/26] audio: run downstream playback queue unconditionally Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 05/26] audio: add more audio rate control functions Gerd Hoffmann
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Change the buffer_get_free pcm_ops function to report the free
ALSA playback buffer. The generic buffer becomes a temporary
buffer and is empty after a call to audio_run_out().

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-4-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/alsaaudio.c | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 4a61378cd757..7a2a94cd427d 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -602,6 +602,42 @@ static int alsa_open(bool in, struct alsa_params_req *req,
     return -1;
 }
 
+static size_t alsa_buffer_get_free(HWVoiceOut *hw)
+{
+    ALSAVoiceOut *alsa = (ALSAVoiceOut *)hw;
+    snd_pcm_sframes_t avail;
+    size_t alsa_free, generic_free, generic_in_use;
+
+    avail = snd_pcm_avail_update(alsa->handle);
+    if (avail < 0) {
+        if (avail == -EPIPE) {
+            if (!alsa_recover(alsa->handle)) {
+                avail = snd_pcm_avail_update(alsa->handle);
+            }
+        }
+        if (avail < 0) {
+            alsa_logerr(avail,
+                        "Could not obtain number of available frames\n");
+            avail = 0;
+        }
+    }
+
+    alsa_free = avail * hw->info.bytes_per_frame;
+    generic_free = audio_generic_buffer_get_free(hw);
+    generic_in_use = hw->samples * hw->info.bytes_per_frame - generic_free;
+    if (generic_in_use) {
+        /*
+         * This code can only be reached in the unlikely case that
+         * snd_pcm_avail_update() returned a larger number of frames
+         * than snd_pcm_writei() could write. Make sure that all
+         * remaining bytes in the generic buffer can be written.
+         */
+        alsa_free = alsa_free > generic_in_use ? alsa_free - generic_in_use : 0;
+    }
+
+    return alsa_free;
+}
+
 static size_t alsa_write(HWVoiceOut *hw, void *buf, size_t len)
 {
     ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
@@ -916,7 +952,7 @@ static struct audio_pcm_ops alsa_pcm_ops = {
     .init_out = alsa_init_out,
     .fini_out = alsa_fini_out,
     .write    = alsa_write,
-    .buffer_get_free = audio_generic_buffer_get_free,
+    .buffer_get_free = alsa_buffer_get_free,
     .run_buffer_out = audio_generic_run_buffer_out,
     .enable_out = alsa_enable_out,
 
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 05/26] audio: add more audio rate control functions
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 04/26] alsaaudio: reduce playback latency Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 06/26] spiceaudio: add a pcm_ops buffer_get_free function Gerd Hoffmann
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

The next patch needs two new rate control functions. The first
one returns the bytes needed at call time to maintain the
selected rate. The second one adjusts the bytes actually sent.

Split the audio_rate_get_bytes() function into these two
functions and reintroduce audio_rate_get_bytes().

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-5-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio_int.h |  2 ++
 audio/audio.c     | 35 ++++++++++++++++++++++++-----------
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/audio/audio_int.h b/audio/audio_int.h
index 2a6914d2aa65..97e20e842927 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -263,6 +263,8 @@ typedef struct RateCtl {
 } RateCtl;
 
 void audio_rate_start(RateCtl *rate);
+size_t audio_rate_peek_bytes(RateCtl *rate, struct audio_pcm_info *info);
+void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used);
 size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
                             size_t bytes_avail);
 
diff --git a/audio/audio.c b/audio/audio.c
index 567f953e66f9..61cdd73df5aa 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -2251,26 +2251,39 @@ void audio_rate_start(RateCtl *rate)
     rate->start_ticks = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
 }
 
-size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
-                            size_t bytes_avail)
+size_t audio_rate_peek_bytes(RateCtl *rate, struct audio_pcm_info *info)
 {
     int64_t now;
     int64_t ticks;
     int64_t bytes;
-    int64_t samples;
-    size_t ret;
+    int64_t frames;
 
     now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
     ticks = now - rate->start_ticks;
     bytes = muldiv64(ticks, info->bytes_per_second, NANOSECONDS_PER_SECOND);
-    samples = (bytes - rate->bytes_sent) / info->bytes_per_frame;
-    if (samples < 0 || samples > 65536) {
-        AUD_log(NULL, "Resetting rate control (%" PRId64 " samples)\n", samples);
+    frames = (bytes - rate->bytes_sent) / info->bytes_per_frame;
+    if (frames < 0 || frames > 65536) {
+        AUD_log(NULL, "Resetting rate control (%" PRId64 " frames)\n", frames);
         audio_rate_start(rate);
-        samples = 0;
+        frames = 0;
     }
 
-    ret = MIN(samples * info->bytes_per_frame, bytes_avail);
-    rate->bytes_sent += ret;
-    return ret;
+    return frames * info->bytes_per_frame;
+}
+
+void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used)
+{
+    rate->bytes_sent += bytes_used;
+}
+
+size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
+                            size_t bytes_avail)
+{
+    size_t bytes;
+
+    bytes = audio_rate_peek_bytes(rate, info);
+    bytes = MIN(bytes, bytes_avail);
+    audio_rate_add_bytes(rate, bytes);
+
+    return bytes;
 }
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 06/26] spiceaudio: add a pcm_ops buffer_get_free function
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (4 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 05/26] audio: add more audio rate control functions Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 07/26] spiceaudio: update comment Gerd Hoffmann
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

It seems there is a demand [1] for low latency playback over
SPICE. Add a pcm_ops buffer_get_free function to reduce the
playback latency. The mixing engine buffer becomes a temporary
buffer.

[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-01/msg01644.html

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-6-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/spiceaudio.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index a8d370fe6f31..22892a7b9d42 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -120,6 +120,13 @@ static void line_out_fini (HWVoiceOut *hw)
     spice_server_remove_interface (&out->sin.base);
 }
 
+static size_t line_out_get_free(HWVoiceOut *hw)
+{
+    SpiceVoiceOut *out = container_of(hw, SpiceVoiceOut, hw);
+
+    return audio_rate_peek_bytes(&out->rate, &hw->info);
+}
+
 static void *line_out_get_buffer(HWVoiceOut *hw, size_t *size)
 {
     SpiceVoiceOut *out = container_of(hw, SpiceVoiceOut, hw);
@@ -133,8 +140,6 @@ static void *line_out_get_buffer(HWVoiceOut *hw, size_t *size)
         *size = MIN((out->fsize - out->fpos) << 2, *size);
     }
 
-    *size = audio_rate_get_bytes(&hw->info, &out->rate, *size);
-
     return out->frame + out->fpos;
 }
 
@@ -142,6 +147,8 @@ static size_t line_out_put_buffer(HWVoiceOut *hw, void *buf, size_t size)
 {
     SpiceVoiceOut *out = container_of(hw, SpiceVoiceOut, hw);
 
+    audio_rate_add_bytes(&out->rate, size);
+
     if (buf) {
         assert(buf == out->frame + out->fpos && out->fpos <= out->fsize);
         out->fpos += size >> 2;
@@ -282,6 +289,7 @@ static struct audio_pcm_ops audio_callbacks = {
     .init_out = line_out_init,
     .fini_out = line_out_fini,
     .write    = audio_generic_write,
+    .buffer_get_free = line_out_get_free,
     .get_buffer_out = line_out_get_buffer,
     .put_buffer_out = line_out_put_buffer,
     .enable_out = line_out_enable,
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 07/26] spiceaudio: update comment
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (5 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 06/26] spiceaudio: add a pcm_ops buffer_get_free function Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 08/26] audio: swap audio_rate_get_bytes() function parameters Gerd Hoffmann
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Replace a comment with a question with the answer.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-7-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/spiceaudio.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 22892a7b9d42..f52f3a8bbb66 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -242,7 +242,10 @@ static size_t line_in_read(HWVoiceIn *hw, void *buf, size_t len)
     uint64_t to_read = audio_rate_get_bytes(&hw->info, &in->rate, len) >> 2;
     size_t ready = spice_server_record_get_samples(&in->sin, buf, to_read);
 
-    /* XXX: do we need this? */
+    /*
+     * If the client didn't send new frames, it most likely disconnected.
+     * Generate silence in this case to avoid a stalled audio stream.
+     */
     if (ready == 0) {
         memset(buf, 0, to_read << 2);
         ready = to_read;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 08/26] audio: swap audio_rate_get_bytes() function parameters
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (6 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 07/26] spiceaudio: update comment Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 09/26] audio: rename audio_sw_bytes_free() Gerd Hoffmann
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Swap the rate and info parameters of the audio_rate_get_bytes()
function to align the parameter order with the rest of the
audio_rate_*() functions.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-8-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio_int.h  | 2 +-
 audio/audio.c      | 2 +-
 audio/dbusaudio.c  | 4 ++--
 audio/noaudio.c    | 4 ++--
 audio/spiceaudio.c | 2 +-
 audio/wavaudio.c   | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/audio/audio_int.h b/audio/audio_int.h
index 97e20e842927..e87ce014a04b 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -265,7 +265,7 @@ typedef struct RateCtl {
 void audio_rate_start(RateCtl *rate);
 size_t audio_rate_peek_bytes(RateCtl *rate, struct audio_pcm_info *info);
 void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used);
-size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
+size_t audio_rate_get_bytes(RateCtl *rate, struct audio_pcm_info *info,
                             size_t bytes_avail);
 
 static inline size_t audio_ring_dist(size_t dst, size_t src, size_t len)
diff --git a/audio/audio.c b/audio/audio.c
index 61cdd73df5aa..7213f8bf07ca 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -2276,7 +2276,7 @@ void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used)
     rate->bytes_sent += bytes_used;
 }
 
-size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
+size_t audio_rate_get_bytes(RateCtl *rate, struct audio_pcm_info *info,
                             size_t bytes_avail)
 {
     size_t bytes;
diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c
index a3d656d3b017..722df0355e1e 100644
--- a/audio/dbusaudio.c
+++ b/audio/dbusaudio.c
@@ -82,7 +82,7 @@ static void *dbus_get_buffer_out(HWVoiceOut *hw, size_t *size)
     }
 
     *size = MIN(vo->buf_size - vo->buf_pos, *size);
-    *size = audio_rate_get_bytes(&hw->info, &vo->rate, *size);
+    *size = audio_rate_get_bytes(&vo->rate, &hw->info, *size);
 
     return vo->buf + vo->buf_pos;
 
@@ -343,7 +343,7 @@ dbus_read(HWVoiceIn *hw, void *buf, size_t size)
 
     trace_dbus_audio_read(size);
 
-    /* size = audio_rate_get_bytes(&hw->info, &vo->rate, size); */
+    /* size = audio_rate_get_bytes(&vo->rate, &hw->info, size); */
 
     g_hash_table_iter_init(&iter, da->in_listeners);
     while (g_hash_table_iter_next(&iter, NULL, (void **)&listener)) {
diff --git a/audio/noaudio.c b/audio/noaudio.c
index 84a6bfbb1c87..4fdee5adecff 100644
--- a/audio/noaudio.c
+++ b/audio/noaudio.c
@@ -44,7 +44,7 @@ typedef struct NoVoiceIn {
 static size_t no_write(HWVoiceOut *hw, void *buf, size_t len)
 {
     NoVoiceOut *no = (NoVoiceOut *) hw;
-    return audio_rate_get_bytes(&hw->info, &no->rate, len);
+    return audio_rate_get_bytes(&no->rate, &hw->info, len);
 }
 
 static int no_init_out(HWVoiceOut *hw, struct audsettings *as, void *drv_opaque)
@@ -89,7 +89,7 @@ static void no_fini_in (HWVoiceIn *hw)
 static size_t no_read(HWVoiceIn *hw, void *buf, size_t size)
 {
     NoVoiceIn *no = (NoVoiceIn *) hw;
-    int64_t bytes = audio_rate_get_bytes(&hw->info, &no->rate, size);
+    int64_t bytes = audio_rate_get_bytes(&no->rate, &hw->info, size);
 
     audio_pcm_info_clear_buf(&hw->info, buf, bytes / hw->info.bytes_per_frame);
     return bytes;
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index f52f3a8bbb66..d17ef1a25efb 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -239,7 +239,7 @@ static void line_in_fini (HWVoiceIn *hw)
 static size_t line_in_read(HWVoiceIn *hw, void *buf, size_t len)
 {
     SpiceVoiceIn *in = container_of (hw, SpiceVoiceIn, hw);
-    uint64_t to_read = audio_rate_get_bytes(&hw->info, &in->rate, len) >> 2;
+    uint64_t to_read = audio_rate_get_bytes(&in->rate, &hw->info, len) >> 2;
     size_t ready = spice_server_record_get_samples(&in->sin, buf, to_read);
 
     /*
diff --git a/audio/wavaudio.c b/audio/wavaudio.c
index ac666335c783..3e1d84db83ee 100644
--- a/audio/wavaudio.c
+++ b/audio/wavaudio.c
@@ -42,7 +42,7 @@ typedef struct WAVVoiceOut {
 static size_t wav_write_out(HWVoiceOut *hw, void *buf, size_t len)
 {
     WAVVoiceOut *wav = (WAVVoiceOut *) hw;
-    int64_t bytes = audio_rate_get_bytes(&hw->info, &wav->rate, len);
+    int64_t bytes = audio_rate_get_bytes(&wav->rate, &hw->info, len);
     assert(bytes % hw->info.bytes_per_frame == 0);
 
     if (bytes && fwrite(buf, bytes, 1, wav->f) != 1) {
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 09/26] audio: rename audio_sw_bytes_free()
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (7 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 08/26] audio: swap audio_rate_get_bytes() function parameters Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 10/26] audio: refactor audio_get_avail() Gerd Hoffmann
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Rename and refactor audio_sw_bytes_free(). This function is not
limited to calculate the free audio buffer size. The renamed
function returns the number of frames instead of bytes.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-9-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 7213f8bf07ca..28262ffd58a5 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1010,9 +1010,16 @@ static size_t audio_get_avail (SWVoiceIn *sw)
     return (((int64_t) live << 32) / sw->ratio) * sw->info.bytes_per_frame;
 }
 
-static size_t audio_sw_bytes_free(SWVoiceOut *sw, size_t free)
+/**
+ * audio_frontend_frames_out() - returns the number of frames needed to
+ * get frames_out frames after resampling
+ *
+ * @sw: audio playback frontend
+ * @frames_out: number of frames
+ */
+static size_t audio_frontend_frames_out(SWVoiceOut *sw, size_t frames_out)
 {
-    return (((int64_t)free << 32) / sw->ratio) * sw->info.bytes_per_frame;
+    return ((int64_t)frames_out << 32) / sw->ratio;
 }
 
 static size_t audio_get_free(SWVoiceOut *sw)
@@ -1034,8 +1041,8 @@ static size_t audio_get_free(SWVoiceOut *sw)
     dead = sw->hw->mix_buf->size - live;
 
 #ifdef DEBUG_OUT
-    dolog("%s: get_free live %zu dead %zu sw_bytes %zu\n",
-          SW_NAME(sw), live, dead, audio_sw_bytes_free(sw, dead));
+    dolog("%s: get_free live %zu dead %zu frontend frames %zu\n",
+          SW_NAME(sw), live, dead, audio_frontend_frames_out(sw, dead));
 #endif
 
     return dead;
@@ -1156,13 +1163,14 @@ static void audio_run_out (AudioState *s)
                 size_t free;
 
                 if (hw_free > sw->total_hw_samples_mixed) {
-                    free = audio_sw_bytes_free(sw,
+                    free = audio_frontend_frames_out(sw,
                         MIN(sw_free, hw_free - sw->total_hw_samples_mixed));
                 } else {
                     free = 0;
                 }
                 if (free > 0) {
-                    sw->callback.fn(sw->callback.opaque, free);
+                    sw->callback.fn(sw->callback.opaque,
+                                    free * sw->info.bytes_per_frame);
                 }
             }
         }
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 10/26] audio: refactor audio_get_avail()
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (8 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 09/26] audio: rename audio_sw_bytes_free() Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 11/26] audio: fix sw->buf size for audio recording Gerd Hoffmann
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

Split out the code in audio_get_avail() that calculates the
buffer size that the audio frontend can read. This is similar
to the code changes in audio_get_free().

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-10-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 28262ffd58a5..ed2b9d5f7e15 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -986,6 +986,18 @@ void AUD_set_active_in (SWVoiceIn *sw, int on)
     }
 }
 
+/**
+ * audio_frontend_frames_in() - returns the number of frames the resampling
+ * code generates from frames_in frames
+ *
+ * @sw: audio recording frontend
+ * @frames_in: number of frames
+ */
+static size_t audio_frontend_frames_in(SWVoiceIn *sw, size_t frames_in)
+{
+    return ((int64_t)frames_in << 32) / sw->ratio;
+}
+
 static size_t audio_get_avail (SWVoiceIn *sw)
 {
     size_t live;
@@ -1002,12 +1014,12 @@ static size_t audio_get_avail (SWVoiceIn *sw)
     }
 
     ldebug (
-        "%s: get_avail live %zu ret %" PRId64 "\n",
+        "%s: get_avail live %zu frontend frames %zu\n",
         SW_NAME (sw),
-        live, (((int64_t) live << 32) / sw->ratio) * sw->info.bytes_per_frame
+        live, audio_frontend_frames_in(sw, live)
         );
 
-    return (((int64_t) live << 32) / sw->ratio) * sw->info.bytes_per_frame;
+    return live;
 }
 
 /**
@@ -1309,11 +1321,13 @@ static void audio_run_in (AudioState *s)
             sw->total_hw_samples_acquired -= min;
 
             if (sw->active) {
+                size_t sw_avail = audio_get_avail(sw);
                 size_t avail;
 
-                avail = audio_get_avail (sw);
+                avail = audio_frontend_frames_in(sw, sw_avail);
                 if (avail > 0) {
-                    sw->callback.fn (sw->callback.opaque, avail);
+                    sw->callback.fn(sw->callback.opaque,
+                                    avail * sw->info.bytes_per_frame);
                 }
             }
         }
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 11/26] audio: fix sw->buf size for audio recording
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (9 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 10/26] audio: refactor audio_get_avail() Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 12/26] audio: prevent an integer overflow in resampling code Gerd Hoffmann
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

The calculation of the buffer size needed to store audio samples
after resampling is wrong for audio recording. For audio recording
sw->ratio is calculated as

sw->ratio = frontend sample rate / backend sample rate.

From this follows

frontend samples = frontend sample rate / backend sample rate
 * backend samples
frontend samples = sw->ratio * backend samples

In 2 of 3 places in the audio recording code where sw->ratio
is used in a calculation to get the number of frontend frames,
the calculation is wrong. Fix this. The 3rd formula in
audio_pcm_sw_read() is correct.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/71
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-11-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio_template.h | 4 ++++
 audio/audio.c          | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/audio/audio_template.h b/audio/audio_template.h
index 98ab557684d8..720a32e57e7d 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -110,7 +110,11 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw)
         return 0;
     }
 
+#ifdef DAC
     samples = ((int64_t) sw->HWBUF->size << 32) / sw->ratio;
+#else
+    samples = (int64_t)sw->HWBUF->size * sw->ratio >> 32;
+#endif
 
     sw->buf = audio_calloc(__func__, samples, sizeof(struct st_sample));
     if (!sw->buf) {
diff --git a/audio/audio.c b/audio/audio.c
index ed2b9d5f7e15..886725747bda 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -995,7 +995,7 @@ void AUD_set_active_in (SWVoiceIn *sw, int on)
  */
 static size_t audio_frontend_frames_in(SWVoiceIn *sw, size_t frames_in)
 {
-    return ((int64_t)frames_in << 32) / sw->ratio;
+    return (int64_t)frames_in * sw->ratio >> 32;
 }
 
 static size_t audio_get_avail (SWVoiceIn *sw)
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 12/26] audio: prevent an integer overflow in resampling code
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (10 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 11/26] audio: fix sw->buf size for audio recording Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 13/26] ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext Gerd Hoffmann
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Volker Rümelin

From: Volker Rümelin <vr_qemu@t-online.de>

There are corner cases where rate->opos can overflow. For
example, if QEMU is started with -audiodev pa,id=audio0,
out.frequency=11025 -device ich9-intel-hda -device hda-duplex,
audiodev=audio0 and the guest plays audio with a sampling
frequency of 44100Hz, rate->opos will overflow after 27.05h
and the audio stream will be silent for a long time.

To prevent a rate->opos and also a rate->ipos overflow, both
are wrapped around after a short time. The wrap around point
rate->ipos >= 0x10001 is an arbitrarily selected value and can
be any small value, 0 and 1 included.

The comment that an ipos overflow will result in an infinite
loop has been removed, because in this case the resampling code
only generates no more output samples and the audio stream stalls.
However, there is no infinite loop.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20220923183640.8314-12-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/rate_template.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/audio/rate_template.h b/audio/rate_template.h
index f94c940c61b1..b432719ebbaa 100644
--- a/audio/rate_template.h
+++ b/audio/rate_template.h
@@ -72,11 +72,6 @@ void NAME (void *opaque, struct st_sample *ibuf, struct st_sample *obuf,
             ilast = *ibuf++;
             rate->ipos++;
 
-            /* if ipos overflow, there is  a infinite loop */
-            if (rate->ipos == 0xffffffff) {
-                rate->ipos = 1;
-                rate->opos = rate->opos & 0xffffffff;
-            }
             /* See if we finished the input buffer yet */
             if (ibuf >= iend) {
                 goto the_end;
@@ -85,6 +80,12 @@ void NAME (void *opaque, struct st_sample *ibuf, struct st_sample *obuf,
 
         icur = *ibuf;
 
+        /* wrap ipos and opos around long before they overflow */
+        if (rate->ipos >= 0x10001) {
+            rate->ipos = 1;
+            rate->opos &= 0xffffffff;
+        }
+
         /* interpolate */
 #ifdef FLOAT_MIXENG
 #ifdef RECIPROCAL
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 13/26] ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (11 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 12/26] audio: prevent an integer overflow in resampling code Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 14/26] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch Gerd Hoffmann
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Mauro Matteo Cascella, TangPeng

From: Mauro Matteo Cascella <mcascell@redhat.com>

Extended ClientCutText messages start with a 4-byte header. If len < 4,
an integer underflow occurs in vnc_client_cut_text_ext. The result is
used to decompress data in a while loop in inflate_buffer, leading to
CPU consumption and denial of service. Prevent this by checking dlen in
protocol_client_msg.

Fixes: CVE-2022-3165
Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support")
Reported-by: TangPeng <tangpeng@qianxin.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Message-Id: <20220925204511.1103214-1-mcascell@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/vnc.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 6a05d061479e..acb3629cd8e2 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
         if (len == 1) {
             return 8;
         }
+        uint32_t dlen = abs(read_s32(data, 4));
         if (len == 8) {
-            uint32_t dlen = abs(read_s32(data, 4));
             if (dlen > (1 << 20)) {
                 error_report("vnc: client_cut_text msg payload has %u bytes"
                              " which exceeds our limit of 1MB.", dlen);
@@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
         }
 
         if (read_s32(data, 4) < 0) {
-            vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)),
-                                    read_u32(data, 8), data + 12);
+            if (dlen < 4) {
+                error_report("vnc: malformed payload (header less than 4 bytes)"
+                             " in extended clipboard pseudo-encoding.");
+                vnc_client_error(vs);
+                break;
+            }
+            vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12);
             break;
         }
         vnc_client_cut_text(vs, read_u32(data, 4), data + 8);
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 14/26] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (12 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 13/26] ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 15/26] cirrus_vga: fix potential memory overflow Gerd Hoffmann
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Dongwon Kim

From: Dongwon Kim <dongwon.kim@intel.com>

A thread often fails to bind an egl context to itself after guest VM is
rebooted because the context is still owned by another thread. It is not
very clear what condition makes this happen but this can be prevented
by unbinding the context from the thread in the end of gd_egl_switch.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20220928215805.4661-1-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk-egl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index b5bffbab2522..35f917ceb15e 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -195,6 +195,9 @@ void gd_egl_switch(DisplayChangeListener *dcl,
     if (resized) {
         gd_update_windowsize(vc);
     }
+
+    eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                   EGL_NO_CONTEXT);
 }
 
 QEMUGLContext gd_egl_create_context(DisplayGLCtx *dgc,
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 15/26] cirrus_vga: fix potential memory overflow
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (13 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 14/26] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 16/26] docs: add firmware feature flags Gerd Hoffmann
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, lu zhipeng

From: lu zhipeng <luzhipeng@cestc.cn>

Signed-off-by: lu zhipeng <luzhipeng@cestc.cn>
Message-Id: <20220929122352.1891-1-luzhipeng@cestc.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/cirrus_vga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 3bb6a58698c1..2577005d03ce 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -834,7 +834,7 @@ static void cirrus_bitblt_cputovideo_next(CirrusVGAState * s)
                    word alignment, so we keep them for the next line */
                 /* XXX: keep alignment to speed up transfer */
                 end_ptr = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;
-                copy_count = s->cirrus_srcptr_end - end_ptr;
+                copy_count = MIN(s->cirrus_srcptr_end - end_ptr, CIRRUS_BLTBUFSIZE);
                 memmove(s->cirrus_bltbuf, end_ptr, copy_count);
                 s->cirrus_srcptr = s->cirrus_bltbuf + copy_count;
                 s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 16/26] docs: add firmware feature flags
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (14 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 15/26] cirrus_vga: fix potential memory overflow Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 17/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU Gerd Hoffmann
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

Add new firmware feature flags for the recently added confidential
computing operating modes by amd and intel.

While being at it also fix the path to the amd sev documentation.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
Message-Id: <20220930133220.1771336-1-kraxel@redhat.com>
---
 docs/interop/firmware.json | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
index 4e049b1c7ca0..56814f02b3c0 100644
--- a/docs/interop/firmware.json
+++ b/docs/interop/firmware.json
@@ -113,13 +113,22 @@
 #           Virtualization, as specified in the AMD64 Architecture
 #           Programmer's Manual. QEMU command line options related to
 #           this feature are documented in
-#           "docs/amd-memory-encryption.txt".
+#           "docs/system/i386/amd-memory-encryption.rst".
 #
 # @amd-sev-es: The firmware supports running under AMD Secure Encrypted
 #              Virtualization - Encrypted State, as specified in the AMD64
 #              Architecture Programmer's Manual. QEMU command line options
 #              related to this feature are documented in
-#              "docs/amd-memory-encryption.txt".
+#              "docs/system/i386/amd-memory-encryption.rst".
+#
+# @amd-sev-snp: The firmware supports running under AMD Secure Encrypted
+#               Virtualization - Secure Nested Paging, as specified in the
+#               AMD64 Architecture Programmer's Manual. QEMU command line
+#               options related to this feature are documented in
+#               "docs/system/i386/amd-memory-encryption.rst".
+#
+# @intel-tdx: The firmware supports running under Intel Trust Domain
+#             Extensions (TDX).
 #
 # @enrolled-keys: The variable store (NVRAM) template associated with
 #                 the firmware binary has the UEFI Secure Boot
@@ -185,9 +194,11 @@
 # Since: 3.0
 ##
 { 'enum' : 'FirmwareFeature',
-  'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'amd-sev-es', 'enrolled-keys',
-             'requires-smm', 'secure-boot', 'verbose-dynamic',
-             'verbose-static' ] }
+  'data' : [ 'acpi-s3', 'acpi-s4',
+             'amd-sev', 'amd-sev-es', 'amd-sev-snp',
+             'intel-tdx',
+             'enrolled-keys', 'requires-smm', 'secure-boot',
+             'verbose-dynamic', 'verbose-static' ] }
 
 ##
 # @FirmwareFlashFile:
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 17/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (15 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 16/26] docs: add firmware feature flags Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 18/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM Gerd Hoffmann
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

Not needed for a virtio 1.0 device.  virtio_pci_device_plugged()
overrides them anyway (so no functional change).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20221004112100.301935-2-kraxel@redhat.com>
---
 include/hw/pci/pci.h         | 1 -
 hw/virtio/virtio-iommu-pci.c | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index b54b6ef88fc3..89eaca429389 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -85,7 +85,6 @@ extern bool pci_available;
 #define PCI_DEVICE_ID_VIRTIO_9P          0x1009
 #define PCI_DEVICE_ID_VIRTIO_VSOCK       0x1012
 #define PCI_DEVICE_ID_VIRTIO_PMEM        0x1013
-#define PCI_DEVICE_ID_VIRTIO_IOMMU       0x1014
 #define PCI_DEVICE_ID_VIRTIO_MEM         0x1015
 
 #define PCI_VENDOR_ID_REDHAT             0x1b36
diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c
index 844d64770406..79ea8334f04e 100644
--- a/hw/virtio/virtio-iommu-pci.c
+++ b/hw/virtio/virtio-iommu-pci.c
@@ -74,8 +74,6 @@ static void virtio_iommu_pci_class_init(ObjectClass *klass, void *data)
     k->realize = virtio_iommu_pci_realize;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     device_class_set_props(dc, virtio_iommu_pci_properties);
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_IOMMU;
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
     pcidev_k->class_id = PCI_CLASS_OTHERS;
     dc->hotpluggable = false;
@@ -90,7 +88,7 @@ static void virtio_iommu_pci_instance_init(Object *obj)
 }
 
 static const VirtioPCIDeviceTypeInfo virtio_iommu_pci_info = {
-    .generic_name          = TYPE_VIRTIO_IOMMU_PCI,
+    .generic_name  = TYPE_VIRTIO_IOMMU_PCI,
     .instance_size = sizeof(VirtIOIOMMUPCI),
     .instance_init = virtio_iommu_pci_instance_init,
     .class_init    = virtio_iommu_pci_class_init,
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 18/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (16 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 17/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 19/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM Gerd Hoffmann
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

Not needed for a virtio 1.0 device.  virtio_pci_device_plugged()
overrides them anyway (so no functional change).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20221004112100.301935-3-kraxel@redhat.com>
---
 include/hw/pci/pci.h       | 1 -
 hw/virtio/virtio-mem-pci.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 89eaca429389..b6aefb33fb17 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -85,7 +85,6 @@ extern bool pci_available;
 #define PCI_DEVICE_ID_VIRTIO_9P          0x1009
 #define PCI_DEVICE_ID_VIRTIO_VSOCK       0x1012
 #define PCI_DEVICE_ID_VIRTIO_PMEM        0x1013
-#define PCI_DEVICE_ID_VIRTIO_MEM         0x1015
 
 #define PCI_VENDOR_ID_REDHAT             0x1b36
 #define PCI_DEVICE_ID_REDHAT_BRIDGE      0x0001
diff --git a/hw/virtio/virtio-mem-pci.c b/hw/virtio/virtio-mem-pci.c
index be2383b0c522..5c5c1e3ae3da 100644
--- a/hw/virtio/virtio-mem-pci.c
+++ b/hw/virtio/virtio-mem-pci.c
@@ -104,8 +104,6 @@ static void virtio_mem_pci_class_init(ObjectClass *klass, void *data)
 
     k->realize = virtio_mem_pci_realize;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_MEM;
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
     pcidev_k->class_id = PCI_CLASS_OTHERS;
 
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 19/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (17 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 18/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 20/26] pci-ids: drop list of modern virtio devices Gerd Hoffmann
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Pankaj Gupta

Not needed for a virtio 1.0 device.  virtio_pci_device_plugged()
overrides them anyway (so no functional change).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Tested-by: Pankaj Gupta <pankaj.gupta@amd.com>
Message-Id: <20221004112100.301935-4-kraxel@redhat.com>
---
 include/hw/pci/pci.h        | 1 -
 hw/virtio/virtio-pmem-pci.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index b6aefb33fb17..42c83cb5ed00 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -84,7 +84,6 @@ extern bool pci_available;
 #define PCI_DEVICE_ID_VIRTIO_RNG         0x1005
 #define PCI_DEVICE_ID_VIRTIO_9P          0x1009
 #define PCI_DEVICE_ID_VIRTIO_VSOCK       0x1012
-#define PCI_DEVICE_ID_VIRTIO_PMEM        0x1013
 
 #define PCI_VENDOR_ID_REDHAT             0x1b36
 #define PCI_DEVICE_ID_REDHAT_BRIDGE      0x0001
diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
index 2b2a0b1eae10..7d9f4ec189b9 100644
--- a/hw/virtio/virtio-pmem-pci.c
+++ b/hw/virtio/virtio-pmem-pci.c
@@ -90,8 +90,6 @@ static void virtio_pmem_pci_class_init(ObjectClass *klass, void *data)
 
     k->realize = virtio_pmem_pci_realize;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_PMEM;
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
     pcidev_k->class_id = PCI_CLASS_OTHERS;
 
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 20/26] pci-ids: drop list of modern virtio devices
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (18 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 19/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 21/26] pci-ids: document modern virtio-pci ids in pci.h too Gerd Hoffmann
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

Drop the list of modern virtio devices and explain how they
are calculated instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20221004112100.301935-5-kraxel@redhat.com>
---
 docs/specs/pci-ids.txt | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt
index dd6859d039d0..e463c4cb3a22 100644
--- a/docs/specs/pci-ids.txt
+++ b/docs/specs/pci-ids.txt
@@ -22,16 +22,14 @@ maintained as part of the virtio specification.
 1af4:1004  SCSI host bus adapter device (legacy)
 1af4:1005  entropy generator device (legacy)
 1af4:1009  9p filesystem device (legacy)
+1af4:1012  vsock device (bug compatibility)
 
-1af4:1041  network device (modern)
-1af4:1042  block device (modern)
-1af4:1043  console device (modern)
-1af4:1044  entropy generator device (modern)
-1af4:1045  balloon device (modern)
-1af4:1048  SCSI host bus adapter device (modern)
-1af4:1049  9p filesystem device (modern)
-1af4:1050  virtio gpu device (modern)
-1af4:1052  virtio input device (modern)
+1af4:1040  Start of ID range for modern virtio devices.  The PCI device
+   to      ID is calculated from the virtio device ID by adding the
+1af4:10ef  0x1040 offset.  The virtio IDs are defined in the virtio
+           specification.  The Linux kernel has a header file with
+           defines for all virtio IDs (linux/virtio_ids.h), qemu has a
+           copy in include/standard-headers/.
 
 1af4:10f0  Available for experimental usage without registration.  Must get
    to      official ID when the code leaves the test lab (i.e. when seeking
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 21/26] pci-ids: document modern virtio-pci ids in pci.h too
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (19 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 20/26] pci-ids: drop list of modern virtio devices Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 22/26] ui/gtk: Fix the implicit mouse ungrabbing logic Gerd Hoffmann
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

While being at it add a #define for the magic 0x1040 number.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20221004112100.301935-6-kraxel@redhat.com>
---
 include/hw/pci/pci.h   | 10 ++++++++++
 hw/virtio/virtio-pci.c |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 42c83cb5ed00..d1ac308574f1 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -76,6 +76,7 @@ extern bool pci_available;
 #define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4
 #define PCI_SUBDEVICE_ID_QEMU            0x1100
 
+/* legacy virtio-pci devices */
 #define PCI_DEVICE_ID_VIRTIO_NET         0x1000
 #define PCI_DEVICE_ID_VIRTIO_BLOCK       0x1001
 #define PCI_DEVICE_ID_VIRTIO_BALLOON     0x1002
@@ -85,6 +86,15 @@ extern bool pci_available;
 #define PCI_DEVICE_ID_VIRTIO_9P          0x1009
 #define PCI_DEVICE_ID_VIRTIO_VSOCK       0x1012
 
+/*
+ * modern virtio-pci devices get their id assigned automatically,
+ * there is no need to add #defines here.  It gets calculated as
+ *
+ * PCI_DEVICE_ID = PCI_DEVICE_ID_VIRTIO_10_BASE +
+ *                 virtio_bus_get_vdev_id(bus)
+ */
+#define PCI_DEVICE_ID_VIRTIO_10_BASE     0x1040
+
 #define PCI_VENDOR_ID_REDHAT             0x1b36
 #define PCI_DEVICE_ID_REDHAT_BRIDGE      0x0001
 #define PCI_DEVICE_ID_REDHAT_SERIAL      0x0002
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index a50c5a57d7e5..e7d80242b73f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1688,7 +1688,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
         pci_set_word(config + PCI_VENDOR_ID,
                      PCI_VENDOR_ID_REDHAT_QUMRANET);
         pci_set_word(config + PCI_DEVICE_ID,
-                     0x1040 + virtio_bus_get_vdev_id(bus));
+                     PCI_DEVICE_ID_VIRTIO_10_BASE + virtio_bus_get_vdev_id(bus));
         pci_config_set_revision(config, 1);
     }
     config[PCI_INTERRUPT_PIN] = 1;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 22/26] ui/gtk: Fix the implicit mouse ungrabbing logic
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (20 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 21/26] pci-ids: document modern virtio-pci ids in pci.h too Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 23/26] qemu-edid: Restrict input parameter -d to avoid division by zero Gerd Hoffmann
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Akihiko Odaki

From: Akihiko Odaki <akihiko.odaki@daynix.com>

Although the grab menu item represents the tabbed displays, the old
implicit mouse ungrabbing logic changes the grab menu item even for
an untabbed display.

Leave the grab menu item when implicitly ungrabbing mouse for an
untabbed display. The new ungrabbing logic introduced in
gd_mouse_mode_change() strictly follows the corresponding grabbing
logic found in gd_button_event().

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20221008140116.11473-1-akihiko.odaki@daynix.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 1467b8c7d7f0..6fc2e2396393 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -681,9 +681,13 @@ static void gd_mouse_mode_change(Notifier *notify, void *data)
 
     s = container_of(notify, GtkDisplayState, mouse_mode_notifier);
     /* release the grab at switching to absolute mode */
-    if (qemu_input_is_absolute() && gd_is_grab_active(s)) {
-        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item),
-                                       FALSE);
+    if (qemu_input_is_absolute() && s->ptr_owner) {
+        if (!s->ptr_owner->window) {
+            gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item),
+                                           FALSE);
+        } else {
+            gd_ungrab_pointer(s);
+        }
     }
     for (i = 0; i < s->nb_vcs; i++) {
         VirtualConsole *vc = &s->vc[i];
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 23/26] qemu-edid: Restrict input parameter -d to avoid division by zero
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (21 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 22/26] ui/gtk: Fix the implicit mouse ungrabbing logic Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 24/26] gtk: Add show_menubar=on|off command line option Gerd Hoffmann
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake,
	Sebastian Mitterle, Thomas Huth

From: Sebastian Mitterle <smitterl@redhat.com>

A zero value for dpi will lead to a division by zero in qemu_edid_dpi_to_mm().
Tested by runnig qemu-edid -dX, X = 0, 100.

Resolves: qemu-project/qemu#1249

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Message-Id: <20221011151216.64897-1-smitterl@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-edid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qemu-edid.c b/qemu-edid.c
index 20c958d9c7eb..92e1a660a76b 100644
--- a/qemu-edid.c
+++ b/qemu-edid.c
@@ -92,6 +92,10 @@ int main(int argc, char *argv[])
                 fprintf(stderr, "not a number: %s\n", optarg);
                 exit(1);
             }
+            if (dpi == 0) {
+                fprintf(stderr, "cannot be zero: %s\n", optarg);
+                exit(1);
+            }
             break;
         case 'v':
             info.vendor = optarg;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 24/26] gtk: Add show_menubar=on|off command line option.
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (22 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 23/26] qemu-edid: Restrict input parameter -d to avoid division by zero Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 25/26] audio: fix in.voices test Gerd Hoffmann
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Bryce Mills

From: Bryce Mills <brycemills@proton.me>

The patch adds "show_menubar" command line option for GTK UI similar to
"show_tabs". This option allows to hide menu bar initially, it still can
be toggled by shortcut and other shortcuts still work.

Signed-off-by: Bryce Mills <brycemills@proton.me>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <NWO_zx1CT5Aj9vAXsRlqBppXd63gcKwL9V1qM1Meh36M_9tCw-EsCnfpvONXhHjmtKIUoSuCy9OO6cHS7M8b0oHBOCZG6f1jZ4Q2tqgI2Qo=@proton.me>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c        | 15 ++++++++++-----
 qapi/ui.json    |  5 ++++-
 qemu-options.hx |  3 +++
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 6fc2e2396393..92daaa6a6edb 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2171,7 +2171,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
     return group;
 }
 
-static GtkWidget *gd_create_menu_view(GtkDisplayState *s)
+static GtkWidget *gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
 {
     GSList *group = NULL;
     GtkWidget *view_menu;
@@ -2269,7 +2269,8 @@ static GtkWidget *gd_create_menu_view(GtkDisplayState *s)
     s->show_menubar_item = gtk_check_menu_item_new_with_mnemonic(
             _("Show Menubar"));
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->show_menubar_item),
-                                   TRUE);
+                                   !opts->u.gtk.has_show_menubar ||
+                                   opts->u.gtk.show_menubar);
     gtk_accel_group_connect(s->accel_group, GDK_KEY_m, HOTKEY_MODIFIERS, 0,
             g_cclosure_new_swap(G_CALLBACK(gd_accel_show_menubar), s, NULL));
     gtk_accel_label_set_accel(
@@ -2280,13 +2281,13 @@ static GtkWidget *gd_create_menu_view(GtkDisplayState *s)
     return view_menu;
 }
 
-static void gd_create_menus(GtkDisplayState *s)
+static void gd_create_menus(GtkDisplayState *s, DisplayOptions *opts)
 {
     GtkSettings *settings;
 
     s->accel_group = gtk_accel_group_new();
     s->machine_menu = gd_create_menu_machine(s);
-    s->view_menu = gd_create_menu_view(s);
+    s->view_menu = gd_create_menu_view(s, opts);
 
     s->machine_menu_item = gtk_menu_item_new_with_mnemonic(_("_Machine"));
     gtk_menu_item_set_submenu(GTK_MENU_ITEM(s->machine_menu_item),
@@ -2363,7 +2364,7 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
 
     gtk_window_set_icon_name(GTK_WINDOW(s->window), "qemu");
 
-    gd_create_menus(s);
+    gd_create_menus(s, opts);
 
     gd_connect_signals(s);
 
@@ -2378,6 +2379,10 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
     gtk_container_add(GTK_CONTAINER(s->window), s->vbox);
 
     gtk_widget_show_all(s->window);
+    if (opts->u.gtk.has_show_menubar &&
+        !opts->u.gtk.show_menubar) {
+        gtk_widget_hide(s->menu_bar);
+    }
 
     vc = gd_vc_find_current(s);
     gtk_widget_set_sensitive(s->view_menu, vc != NULL);
diff --git a/qapi/ui.json b/qapi/ui.json
index 286c5731d1c3..0abba3e930a4 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1199,13 +1199,16 @@
 #               interfaces (e.g. VGA and virtual console character devices)
 #               by default.
 #               Since 7.1
+# @show-menubar: Display the main window menubar. Defaults to "on".
+#                Since 8.0
 #
 # Since: 2.12
 ##
 { 'struct'  : 'DisplayGTK',
   'data'    : { '*grab-on-hover' : 'bool',
                 '*zoom-to-fit'   : 'bool',
-                '*show-tabs'     : 'bool'  } }
+                '*show-tabs'     : 'bool',
+                '*show-menubar'  : 'bool'  } }
 
 ##
 # @DisplayEGLHeadless:
diff --git a/qemu-options.hx b/qemu-options.hx
index 95b998a13b01..bb0979bef908 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1969,6 +1969,7 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
 #if defined(CONFIG_GTK)
     "-display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off]\n"
     "            [,show-tabs=on|off][,show-cursor=on|off][,window-close=on|off]\n"
+    "            [,show-menubar=on|off]\n"
 #endif
 #if defined(CONFIG_VNC)
     "-display vnc=<display>[,<optargs>]\n"
@@ -2061,6 +2062,8 @@ SRST
 
         ``window-close=on|off`` : Allow to quit qemu with window close button
 
+        ``show-menubar=on|off`` : Display the main window menubar, defaults to "on"
+
     ``curses[,charset=<encoding>]``
         Display video output via curses. For graphics device models
         which support a text mode, QEMU can display this output using a
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 25/26] audio: fix in.voices test
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (23 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 24/26] gtk: Add show_menubar=on|off command line option Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13  6:52 ` [PULL 26/26] audio: improve out.voices test Gerd Hoffmann
  2022-10-13 20:29 ` [PULL 00/26] Kraxel 20221013 patches Stefan Hajnoczi
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Helge Konetzka

From: Helge Konetzka <hk@zapateado.de>

Calling qemu with valid -audiodev ...,in.voices=0 results in an obsolete
warning:
  audio: Bogus number of capture voices 0, setting to 0
This patch fixes the in.voices test.

Signed-off-by: Helge Konetzka <hk@zapateado.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221012114925.5084-2-hk@zapateado.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index 886725747bda..1ecdbc4191f2 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1778,7 +1778,7 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
         s->nb_hw_voices_out = 1;
     }
 
-    if (s->nb_hw_voices_in <= 0) {
+    if (s->nb_hw_voices_in < 0) {
         dolog ("Bogus number of capture voices %d, setting to 0\n",
                s->nb_hw_voices_in);
         s->nb_hw_voices_in = 0;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PULL 26/26] audio: improve out.voices test
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (24 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 25/26] audio: fix in.voices test Gerd Hoffmann
@ 2022-10-13  6:52 ` Gerd Hoffmann
  2022-10-13 20:29 ` [PULL 00/26] Kraxel 20221013 patches Stefan Hajnoczi
  26 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2022-10-13  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake, Helge Konetzka

From: Helge Konetzka <hk@zapateado.de>

Improve readability of audio out.voices test:
If 1 is logged and set after positive test, 1 should be tested.

Signed-off-by: Helge Konetzka <hk@zapateado.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221012114925.5084-3-hk@zapateado.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index 1ecdbc4191f2..cc664271ebb5 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1772,7 +1772,7 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
     s->nb_hw_voices_out = audio_get_pdo_out(dev)->voices;
     s->nb_hw_voices_in = audio_get_pdo_in(dev)->voices;
 
-    if (s->nb_hw_voices_out <= 0) {
+    if (s->nb_hw_voices_out < 1) {
         dolog ("Bogus number of playback voices %d, setting to 1\n",
                s->nb_hw_voices_out);
         s->nb_hw_voices_out = 1;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PULL 00/26] Kraxel 20221013 patches
  2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
                   ` (25 preceding siblings ...)
  2022-10-13  6:52 ` [PULL 26/26] audio: improve out.voices test Gerd Hoffmann
@ 2022-10-13 20:29 ` Stefan Hajnoczi
  26 siblings, 0 replies; 28+ messages in thread
From: Stefan Hajnoczi @ 2022-10-13 20:29 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: qemu-devel, David Hildenbrand, Gerd Hoffmann, Kashyap Chamarthy,
	Marc-André Lureau, Markus Armbruster, Eric Auger,
	Christian Schoenebeck, Daniel P. Berrangé,
	Philippe Mathieu-Daudé,
	Marcel Apfelbaum, Michael S. Tsirkin, Eric Blake

[-- Attachment #1: Type: text/plain, Size: 115 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2022-10-13 20:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13  6:51 [PULL 00/26] Kraxel 20221013 patches Gerd Hoffmann
2022-10-13  6:51 ` [PULL 01/26] audio: refactor code in audio_run_out() Gerd Hoffmann
2022-10-13  6:52 ` [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off Gerd Hoffmann
2022-10-13  6:52 ` [PULL 03/26] audio: run downstream playback queue unconditionally Gerd Hoffmann
2022-10-13  6:52 ` [PULL 04/26] alsaaudio: reduce playback latency Gerd Hoffmann
2022-10-13  6:52 ` [PULL 05/26] audio: add more audio rate control functions Gerd Hoffmann
2022-10-13  6:52 ` [PULL 06/26] spiceaudio: add a pcm_ops buffer_get_free function Gerd Hoffmann
2022-10-13  6:52 ` [PULL 07/26] spiceaudio: update comment Gerd Hoffmann
2022-10-13  6:52 ` [PULL 08/26] audio: swap audio_rate_get_bytes() function parameters Gerd Hoffmann
2022-10-13  6:52 ` [PULL 09/26] audio: rename audio_sw_bytes_free() Gerd Hoffmann
2022-10-13  6:52 ` [PULL 10/26] audio: refactor audio_get_avail() Gerd Hoffmann
2022-10-13  6:52 ` [PULL 11/26] audio: fix sw->buf size for audio recording Gerd Hoffmann
2022-10-13  6:52 ` [PULL 12/26] audio: prevent an integer overflow in resampling code Gerd Hoffmann
2022-10-13  6:52 ` [PULL 13/26] ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext Gerd Hoffmann
2022-10-13  6:52 ` [PULL 14/26] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch Gerd Hoffmann
2022-10-13  6:52 ` [PULL 15/26] cirrus_vga: fix potential memory overflow Gerd Hoffmann
2022-10-13  6:52 ` [PULL 16/26] docs: add firmware feature flags Gerd Hoffmann
2022-10-13  6:52 ` [PULL 17/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU Gerd Hoffmann
2022-10-13  6:52 ` [PULL 18/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM Gerd Hoffmann
2022-10-13  6:52 ` [PULL 19/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM Gerd Hoffmann
2022-10-13  6:52 ` [PULL 20/26] pci-ids: drop list of modern virtio devices Gerd Hoffmann
2022-10-13  6:52 ` [PULL 21/26] pci-ids: document modern virtio-pci ids in pci.h too Gerd Hoffmann
2022-10-13  6:52 ` [PULL 22/26] ui/gtk: Fix the implicit mouse ungrabbing logic Gerd Hoffmann
2022-10-13  6:52 ` [PULL 23/26] qemu-edid: Restrict input parameter -d to avoid division by zero Gerd Hoffmann
2022-10-13  6:52 ` [PULL 24/26] gtk: Add show_menubar=on|off command line option Gerd Hoffmann
2022-10-13  6:52 ` [PULL 25/26] audio: fix in.voices test Gerd Hoffmann
2022-10-13  6:52 ` [PULL 26/26] audio: improve out.voices test Gerd Hoffmann
2022-10-13 20:29 ` [PULL 00/26] Kraxel 20221013 patches Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.