aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2022-11-23 15:17:54 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2022-11-23 15:17:54 -0500
commita33c25399f9bc3dcf83064adeba2a82e61bf4608 (patch)
treea58dbde980dcafbc6c4e60090f67fc7f20548d39
parente72db29ace58e5ed798859c112bf8205fcc2418a (diff)
parent7d3cf19548b7f9afd9d25c30dd1450aad7d1877d (diff)
Merge tag 'fixes-20221123-pull-request' of https://gitlab.com/kraxel/qemu into staging
ui+usb+audio: bugfixes for 7.2 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmN+MaYACgkQTLbY7tPo # cTiJ7A//dN/US7zHSHcgAscyjSClZRU4gHyJcnN0BoNtrOXW9lIGEnMzQBfOn2nb # 5vaL2u2+Ooz/92pEi6P2qKUxHo63P7RfXXEOhPdi+kENK3UYOzlyJmlUUUrXyu78 # W8BM/styxb1s84KmPauRFGmgCoXCZZ4IklZUaVLqLYwJUv6/BGlbxorEdeuCGev0 # LgeyZTWaWcI5jOdIaL+Hl9PKzQCyKigT3HWA8lPvs31+hvdK5RvL5mai6SD+4Mtj # JaLGqZ3N7oSo7a/LT+f0jebwg/QUV9EGkJmnF6tlGg3IM34/Mqbl+BMJjGAh3xqx # z3qks/z2baHtz59CHGVS8sxWPC+5Wh3hgkpzOJ83fCUqueS7cMXBF6fcf0y0MJqP # ne6ePE/4ZWcHnoycpZqNRDqao+Lh62PSdteAjf2yq8ZLhhm9HgP4bl/4je8tbi/I # Z6WrP4yv8l7ea5jZUbtURbe0pYKAmzMr2rwv34jJbXAn+BU5vV1/5j7jyz2UlETK # G7fiLJEUutFhYaCWhgNCE8HTgYt9V0PEjGfIJXkKHRHLd/229VSjlvdQyP/vtSLt # EzaP1JdtGZ++QEzMBY8lzrozNHaJglGBjonG9fUnJ4VSB4+J8b3KqBEXlmWL16Fx # UvV8MtOuQ6Y377ErbQJYjui6BOArV6iI5NBlbvWuc+CgA09orYs= # =m/Hx # -----END PGP SIGNATURE----- # gpg: Signature made Wed 23 Nov 2022 09:43:50 EST # gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * tag 'fixes-20221123-pull-request' of https://gitlab.com/kraxel/qemu: hw/audio/intel-hda: Drop unnecessary prototype hw/audio/intel-hda: don't reset codecs twice hw/usb/hcd-xhci: Reset the XHCIState with device_cold_reset() ui/gtk: prevent ui lock up when dpy_gl_update called again before current draw event occurs hw/usb/hcd-xhci.c: spelling: tranfer gtk: disable GTK Clipboard with a new meson option Revert "usbredir: avoid queuing hello packet on snapshot restore" Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--hw/audio/intel-hda.c6
-rw-r--r--hw/usb/hcd-xhci-pci.c2
-rw-r--r--hw/usb/hcd-xhci-sysbus.c2
-rw-r--r--hw/usb/hcd-xhci.c2
-rw-r--r--hw/usb/redirect.c3
-rw-r--r--meson.build5
-rw-r--r--meson_options.txt7
-rw-r--r--scripts/meson-buildoptions.sh3
-rw-r--r--ui/gtk-egl.c2
-rw-r--r--ui/gtk-gl-area.c2
-rw-r--r--ui/gtk.c2
-rw-r--r--ui/meson.build5
12 files changed, 28 insertions, 13 deletions
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index f38117057b..b9ed231fe8 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -220,8 +220,6 @@ struct IntelHDAReg {
void (*rhandler)(IntelHDAState *d, const IntelHDAReg *reg);
};
-static void intel_hda_reset(DeviceState *dev);
-
/* --------------------------------------------------------------------- */
static hwaddr intel_hda_addr(uint32_t lbase, uint32_t ubase)
@@ -516,7 +514,7 @@ static void intel_hda_notify_codecs(IntelHDAState *d, uint32_t stream, bool runn
static void intel_hda_set_g_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old)
{
if ((d->g_ctl & ICH6_GCTL_RESET) == 0) {
- intel_hda_reset(DEVICE(d));
+ device_cold_reset(DEVICE(d));
}
}
@@ -1083,11 +1081,9 @@ static void intel_hda_reset(DeviceState *dev)
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
- /* reset codecs */
QTAILQ_FOREACH(kid, &d->codecs.qbus.children, sibling) {
DeviceState *qdev = kid->child;
cdev = HDA_CODEC_DEVICE(qdev);
- device_legacy_reset(DEVICE(cdev));
d->state_sts |= (1 << cdev->cad);
}
intel_hda_update_irq(d);
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index e934b1a5b1..643d4643e4 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -85,7 +85,7 @@ static void xhci_pci_reset(DeviceState *dev)
{
XHCIPciState *s = XHCI_PCI(dev);
- device_legacy_reset(DEVICE(&s->xhci));
+ device_cold_reset(DEVICE(&s->xhci));
}
static int xhci_pci_vmstate_post_load(void *opaque, int version_id)
diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index a14e438196..faf57b4797 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -29,7 +29,7 @@ void xhci_sysbus_reset(DeviceState *dev)
{
XHCISysbusState *s = XHCI_SYSBUS(dev);
- device_legacy_reset(DEVICE(&s->xhci));
+ device_cold_reset(DEVICE(&s->xhci));
}
static void xhci_sysbus_realize(DeviceState *dev, Error **errp)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 8299f35e66..b89b618ec2 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -796,7 +796,7 @@ static int xhci_ring_chain_length(XHCIState *xhci, const XHCIRing *ring)
*/
} while (length < TRB_LINK_LIMIT * 65536 / TRB_SIZE);
- qemu_log_mask(LOG_GUEST_ERROR, "%s: exceeded maximum tranfer ring size!\n",
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: exceeded maximum transfer ring size!\n",
__func__);
return -1;
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 1bd30efc3e..fd7df599bc 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1280,8 +1280,7 @@ static void usbredir_create_parser(USBRedirDevice *dev)
}
#endif
- if (runstate_check(RUN_STATE_INMIGRATE) ||
- runstate_check(RUN_STATE_PRELAUNCH)) {
+ if (runstate_check(RUN_STATE_INMIGRATE)) {
flags |= usbredirparser_fl_no_hello;
}
usbredirparser_init(dev->parser, VERSION, caps, USB_REDIR_CAPS_SIZE,
diff --git a/meson.build b/meson.build
index cf3e517e56..5c6b5a1c75 100644
--- a/meson.build
+++ b/meson.build
@@ -1246,6 +1246,8 @@ endif
gtk = not_found
gtkx11 = not_found
vte = not_found
+have_gtk_clipboard = get_option('gtk_clipboard').enabled()
+
if not get_option('gtk').auto() or have_system
gtk = dependency('gtk+-3.0', version: '>=3.22.0',
method: 'pkg-config',
@@ -1264,6 +1266,8 @@ if not get_option('gtk').auto() or have_system
required: get_option('vte'),
kwargs: static_kwargs)
endif
+ elif have_gtk_clipboard
+ error('GTK clipboard requested, but GTK not found')
endif
endif
@@ -1842,6 +1846,7 @@ if glusterfs.found()
endif
config_host_data.set('CONFIG_GTK', gtk.found())
config_host_data.set('CONFIG_VTE', vte.found())
+config_host_data.set('CONFIG_GTK_CLIPBOARD', have_gtk_clipboard)
config_host_data.set('CONFIG_LIBATTR', have_old_libattr)
config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found())
config_host_data.set('CONFIG_EBPF', libbpf.found())
diff --git a/meson_options.txt b/meson_options.txt
index 66128178bf..4b749ca549 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -219,6 +219,13 @@ option('vnc_sasl', type : 'feature', value : 'auto',
description: 'SASL authentication for VNC server')
option('vte', type : 'feature', value : 'auto',
description: 'vte support for the gtk UI')
+
+# GTK Clipboard implementation is disabled by default, since it may cause hangs
+# of the guest VCPUs. See gitlab issue 1150:
+# https://gitlab.com/qemu-project/qemu/-/issues/1150
+
+option('gtk_clipboard', type: 'feature', value : 'disabled',
+ description: 'clipboard support for the gtk UI (EXPERIMENTAL, MAY HANG)')
option('xkbcommon', type : 'feature', value : 'auto',
description: 'xkbcommon support')
option('zstd', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 2cb0de5601..aa6e30ea91 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -93,6 +93,7 @@ meson_options_help() {
printf "%s\n" ' glusterfs Glusterfs block device driver'
printf "%s\n" ' gnutls GNUTLS cryptography support'
printf "%s\n" ' gtk GTK+ user interface'
+ printf "%s\n" ' gtk-clipboard clipboard support for GTK (EXPERIMENTAL, MAY HANG)'
printf "%s\n" ' guest-agent Build QEMU Guest Agent'
printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Agent'
printf "%s\n" ' hax HAX acceleration support'
@@ -274,6 +275,8 @@ _meson_option_parse() {
--disable-gprof) printf "%s" -Dgprof=false ;;
--enable-gtk) printf "%s" -Dgtk=enabled ;;
--disable-gtk) printf "%s" -Dgtk=disabled ;;
+ --enable-gtk-clipboard) printf "%s" -Dgtk_clipboard=enabled ;;
+ --disable-gtk-clipboard) printf "%s" -Dgtk_clipboard=disabled ;;
--enable-guest-agent) printf "%s" -Dguest_agent=enabled ;;
--disable-guest-agent) printf "%s" -Dguest_agent=disabled ;;
--enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=enabled ;;
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 35f917ceb1..e84431790c 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -341,7 +341,7 @@ void gd_egl_flush(DisplayChangeListener *dcl,
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
GtkWidget *area = vc->gfx.drawing_area;
- if (vc->gfx.guest_fb.dmabuf) {
+ if (vc->gfx.guest_fb.dmabuf && !vc->gfx.guest_fb.dmabuf->draw_submitted) {
graphic_hw_gl_block(vc->gfx.dcl.con, true);
vc->gfx.guest_fb.dmabuf->draw_submitted = true;
gtk_widget_queue_draw_area(area, x, y, w, h);
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 682638a197..7696df1f6b 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -278,7 +278,7 @@ void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,
{
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
- if (vc->gfx.guest_fb.dmabuf) {
+ if (vc->gfx.guest_fb.dmabuf && !vc->gfx.guest_fb.dmabuf->draw_submitted) {
graphic_hw_gl_block(vc->gfx.dcl.con, true);
vc->gfx.guest_fb.dmabuf->draw_submitted = true;
}
diff --git a/ui/gtk.c b/ui/gtk.c
index 7ec21f7798..4817623c8f 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2403,7 +2403,9 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
opts->u.gtk.show_tabs) {
gtk_menu_item_activate(GTK_MENU_ITEM(s->show_tabs_item));
}
+#ifdef CONFIG_GTK_CLIPBOARD
gd_clipboard_init(s);
+#endif /* CONFIG_GTK_CLIPBOARD */
}
static void early_gtk_display_init(DisplayOptions *opts)
diff --git a/ui/meson.build b/ui/meson.build
index ec13949776..c1b137bf33 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -97,7 +97,10 @@ if gtk.found()
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
gtk_ss = ss.source_set()
- gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c'))
+ gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
+ if have_gtk_clipboard
+ gtk_ss.add(files('gtk-clipboard.c'))
+ endif
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c'))
gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c'))