All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches
@ 2018-11-12 15:15 Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 1/4] bt: Mark the bluetooth subsystem as deprecated Gerd Hoffmann
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-12 15:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: libvir-list, Paolo Bonzini, Gerd Hoffmann

The following changes since commit 460f0236c12a86a38692c12d9bf8e2391dc10a77:

  Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2018-11-12 10:12:07 +0000)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/fixes-31-20181112-pull-request

for you to fetch changes up to f1aba960cc40ab65fa88c8678883bd2201708c55:

  ui/gtk: fix cursor in egl mode (2018-11-12 14:15:54 +0100)

----------------------------------------------------------------
fixes for 3.1: mark bt as deprecated, bugfixes for pulse, gtk and edid.

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

Gerd Hoffmann (2):
  pulseaudio: process audio data in smaller chunks
  ui/gtk: fix cursor in egl mode

Marc-André Lureau (1):
  edid: silence a stringop-overflow warning

Thomas Huth (1):
  bt: Mark the bluetooth subsystem as deprecated

 audio/paaudio.c            |  4 ++--
 hw/display/edid-generate.c |  2 +-
 ui/gtk-egl.c               | 17 ++++++++++++-----
 vl.c                       |  4 ++++
 qemu-deprecated.texi       |  7 +++++++
 qemu-options.hx            |  4 ++++
 6 files changed, 30 insertions(+), 8 deletions(-)

-- 
2.9.3

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

* [Qemu-devel] [PULL 1/4] bt: Mark the bluetooth subsystem as deprecated
  2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
@ 2018-11-12 15:15 ` Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 2/4] edid: silence a stringop-overflow warning Gerd Hoffmann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-12 15:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: libvir-list, Paolo Bonzini, Gerd Hoffmann, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

It has been unmaintained since years, and there were only trivial or
tree-wide changes to the related files since many years, so the
code is likely very bitrotten and broken. For example the following
segfaults as soon as as you press a key:

 qemu-system-x86_64 -usb -device usb-bt-dongle -bt hci -bt device:keyboard

Since we are not aware of anybody using bluetooth with the current
version of QEMU, let's mark the subsystem as deprecated, with a special
request for the users to write to the qemu-devel mailing list in case
they still use it (so we could revert the deprecation status in that
case).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 1542016830-19189-1-git-send-email-thuth@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 vl.c                 | 4 ++++
 qemu-deprecated.texi | 7 +++++++
 qemu-options.hx      | 4 ++++
 3 files changed, 15 insertions(+)

diff --git a/vl.c b/vl.c
index 55bab005b6..fa25d1ae2d 100644
--- a/vl.c
+++ b/vl.c
@@ -3269,6 +3269,10 @@ int main(int argc, char **argv, char **envp)
                 break;
 #endif
             case QEMU_OPTION_bt:
+                warn_report("The bluetooth subsystem is deprecated and will "
+                            "be removed soon. If the bluetooth subsystem is "
+                            "still useful for you, please send a mail to "
+                            "qemu-devel@nongnu.org with your usecase.");
                 add_device_config(DEV_BT, optarg);
                 break;
             case QEMU_OPTION_audio_help:
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 5d2d7a3588..cb4291f1e5 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -128,6 +128,13 @@ The @option{[hub_id name]} parameter tuple of the 'hostfwd_add' and
 The ``ivshmem'' device type is replaced by either the ``ivshmem-plain''
 or ``ivshmem-doorbell`` device types.
 
+@subsection bluetooth (since 3.1)
+
+The bluetooth subsystem is unmaintained since many years and likely bitrotten
+quite a bit. It will be removed without replacement unless some users speaks
+up at the @email{qemu-devel@@nongnu.org} mailing list with information about
+their usecases.
+
 @section System emulator machines
 
 @subsection pc-0.10 and pc-0.11 (since 3.0)
diff --git a/qemu-options.hx b/qemu-options.hx
index 38c7a978c1..ee379b32e3 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2772,6 +2772,10 @@ logic.  The Transport Layer is decided by the machine type.  Currently
 the machines @code{n800} and @code{n810} have one HCI and all other
 machines have none.
 
+Note: This option and the whole bluetooth subsystem is considered as deprecated.
+If you still use it, please send a mail to @email{qemu-devel@@nongnu.org} where
+you describe your usecase.
+
 @anchor{bt-hcis}
 The following three types are recognized:
 
-- 
2.9.3

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

* [Qemu-devel] [PULL 2/4] edid: silence a stringop-overflow warning
  2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 1/4] bt: Mark the bluetooth subsystem as deprecated Gerd Hoffmann
@ 2018-11-12 15:15 ` Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 3/4] pulseaudio: process audio data in smaller chunks Gerd Hoffmann
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-12 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: libvir-list, Paolo Bonzini, Gerd Hoffmann, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Simplify the code that doesn't need strncpy() since length of string
is already computed.

/home/elmarco/src/qemu/hw/display/edid-generate.c: In function 'edid_desc_text':
/home/elmarco/src/qemu/hw/display/edid-generate.c:168:5: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
     strncpy((char *)(desc + 5), text, len);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/edid-generate.c:164:11: note: length computed here
     len = strlen(text);
           ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20181110111623.31356-1-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/edid-generate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c
index bdf5e1d4d4..77d9127344 100644
--- a/hw/display/edid-generate.c
+++ b/hw/display/edid-generate.c
@@ -165,7 +165,7 @@ static void edid_desc_text(uint8_t *desc, uint8_t type,
     if (len > 12) {
         len = 12;
     }
-    strncpy((char *)(desc + 5), text, len);
+    memcpy(desc + 5, text, len);
     desc[5 + len] = '\n';
 }
 
-- 
2.9.3

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

* [Qemu-devel] [PULL 3/4] pulseaudio: process audio data in smaller chunks
  2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 1/4] bt: Mark the bluetooth subsystem as deprecated Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 2/4] edid: silence a stringop-overflow warning Gerd Hoffmann
@ 2018-11-12 15:15 ` Gerd Hoffmann
  2018-11-12 15:15 ` [Qemu-devel] [PULL 4/4] ui/gtk: fix cursor in egl mode Gerd Hoffmann
  2018-11-12 16:25 ` [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-12 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: libvir-list, Paolo Bonzini, Gerd Hoffmann, Max Ehrlich, Martin Schrodt

The rate of pulseaudio absorbing the audio stream is used to control the
the rate of the guests audio stream.  When the emulated hardware uses
small chunks (like intel-hda does) we need small chunks on the audio
backend side too, otherwise that feedback loop doesn't work very well.

Cc: Max Ehrlich <maxehr@umiacs.umd.edu>
Cc: Martin Schrodt <martin@schrodt.org>
Buglink: https://bugs.launchpad.net/bugs/1795527
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181109142032.1628-1-kraxel@redhat.com
---
 audio/paaudio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/audio/paaudio.c b/audio/paaudio.c
index 949769774d..4c100bc318 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -227,7 +227,7 @@ static void *qpa_thread_out (void *arg)
             }
         }
 
-        decr = to_mix = audio_MIN (pa->live, pa->g->conf.samples >> 2);
+        decr = to_mix = audio_MIN(pa->live, pa->g->conf.samples >> 5);
         rpos = pa->rpos;
 
         if (audio_pt_unlock(&pa->pt, __func__)) {
@@ -319,7 +319,7 @@ static void *qpa_thread_in (void *arg)
             }
         }
 
-        incr = to_grab = audio_MIN (pa->dead, pa->g->conf.samples >> 2);
+        incr = to_grab = audio_MIN(pa->dead, pa->g->conf.samples >> 5);
         wpos = pa->wpos;
 
         if (audio_pt_unlock(&pa->pt, __func__)) {
-- 
2.9.3

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

* [Qemu-devel] [PULL 4/4] ui/gtk: fix cursor in egl mode
  2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2018-11-12 15:15 ` [Qemu-devel] [PULL 3/4] pulseaudio: process audio data in smaller chunks Gerd Hoffmann
@ 2018-11-12 15:15 ` Gerd Hoffmann
  2018-11-12 16:25 ` [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-12 15:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: libvir-list, Paolo Bonzini, Gerd Hoffmann

In egl mode the scale_x and scale_y variables are not set, so the
scaling logic in the mouse motion event handler does not work.

Fix that.  Also scale the cursor position in gd_egl_cursor_position().

Reported-by: Chen Zhang <tgfbeta@icloud.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Chen Zhang <tgfbeta@icloud.com>
Message-id: 20181107074949.13805-1-kraxel@redhat.com
---
 ui/gtk-egl.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index a77c25b490..5420c2362b 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -68,8 +68,15 @@ void gd_egl_draw(VirtualConsole *vc)
         return;
     }
 
+    window = gtk_widget_get_window(vc->gfx.drawing_area);
+    ww = gdk_window_get_width(window);
+    wh = gdk_window_get_height(window);
+
     if (vc->gfx.scanout_mode) {
         gd_egl_scanout_flush(&vc->gfx.dcl, 0, 0, vc->gfx.w, vc->gfx.h);
+
+        vc->gfx.scale_x = (double)ww / vc->gfx.w;
+        vc->gfx.scale_y = (double)wh / vc->gfx.h;
     } else {
         if (!vc->gfx.ds) {
             return;
@@ -77,13 +84,13 @@ void gd_egl_draw(VirtualConsole *vc)
         eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
                        vc->gfx.esurface, vc->gfx.ectx);
 
-        window = gtk_widget_get_window(vc->gfx.drawing_area);
-        ww = gdk_window_get_width(window);
-        wh = gdk_window_get_height(window);
         surface_gl_setup_viewport(vc->gfx.gls, vc->gfx.ds, ww, wh);
         surface_gl_render_texture(vc->gfx.gls, vc->gfx.ds);
 
         eglSwapBuffers(qemu_egl_display, vc->gfx.esurface);
+
+        vc->gfx.scale_x = (double)ww / surface_width(vc->gfx.ds);
+        vc->gfx.scale_y = (double)wh / surface_height(vc->gfx.ds);
     }
 }
 
@@ -232,8 +239,8 @@ void gd_egl_cursor_position(DisplayChangeListener *dcl,
 {
     VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
 
-    vc->gfx.cursor_x = pos_x;
-    vc->gfx.cursor_y = pos_y;
+    vc->gfx.cursor_x = pos_x * vc->gfx.scale_x;
+    vc->gfx.cursor_y = pos_y * vc->gfx.scale_y;
 }
 
 void gd_egl_release_dmabuf(DisplayChangeListener *dcl,
-- 
2.9.3

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

* Re: [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches
  2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2018-11-12 15:15 ` [Qemu-devel] [PULL 4/4] ui/gtk: fix cursor in egl mode Gerd Hoffmann
@ 2018-11-12 16:25 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2018-11-12 16:25 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers, Libvirt, Paolo Bonzini

On 12 November 2018 at 15:15, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The following changes since commit 460f0236c12a86a38692c12d9bf8e2391dc10a77:
>
>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2018-11-12 10:12:07 +0000)
>
> are available in the git repository at:
>
>   git://git.kraxel.org/qemu tags/fixes-31-20181112-pull-request
>
> for you to fetch changes up to f1aba960cc40ab65fa88c8678883bd2201708c55:
>
>   ui/gtk: fix cursor in egl mode (2018-11-12 14:15:54 +0100)
>
> ----------------------------------------------------------------
> fixes for 3.1: mark bt as deprecated, bugfixes for pulse, gtk and edid.
>
> ----------------------------------------------------------------
>
> Gerd Hoffmann (2):
>   pulseaudio: process audio data in smaller chunks
>   ui/gtk: fix cursor in egl mode
>
> Marc-André Lureau (1):
>   edid: silence a stringop-overflow warning
>
> Thomas Huth (1):
>   bt: Mark the bluetooth subsystem as deprecated


Applied, thanks.

-- PMM

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

end of thread, other threads:[~2018-11-12 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 15:15 [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Gerd Hoffmann
2018-11-12 15:15 ` [Qemu-devel] [PULL 1/4] bt: Mark the bluetooth subsystem as deprecated Gerd Hoffmann
2018-11-12 15:15 ` [Qemu-devel] [PULL 2/4] edid: silence a stringop-overflow warning Gerd Hoffmann
2018-11-12 15:15 ` [Qemu-devel] [PULL 3/4] pulseaudio: process audio data in smaller chunks Gerd Hoffmann
2018-11-12 15:15 ` [Qemu-devel] [PULL 4/4] ui/gtk: fix cursor in egl mode Gerd Hoffmann
2018-11-12 16:25 ` [Qemu-devel] [PULL 0/4] Fixes 31 20181112 patches Peter Maydell

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.