qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7bacaf: usb-host: remove 'remote wakeup' flag


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7bacaf: usb-host: remove 'remote wakeup' flag from configu...
Date: Mon, 13 Jan 2020 07:00:15 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7bacaf5fea5729d400201106359f6803b15621af
      
https://github.com/qemu/qemu/commit/7bacaf5fea5729d400201106359f6803b15621af
  Author: Yuri Benditovich <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/core/machine.c
    M hw/usb/host-libusb.c
    M hw/usb/trace-events

  Log Message:
  -----------
  usb-host: remove 'remote wakeup' flag from configuration descriptor

If the redirected device has this capability, Windows guest may
place the device into D2 and expect it to wake when the device
becomes active, but this will never happen. For example, when
internal Bluetooth adapter is redirected, keyboards and mice
connected to it do not work. Current commit removes this
capability (starting from machine 5.0)
Set 'usb-host.suppress-remote-wake' property to 'off' to keep
'remote wake' as is or to 'on' to remove 'remote wake' on
4.2 or earlier.

Signed-off-by: Yuri Benditovich <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 32187f3d902afdfa9f4d861d9612739d3391fdc3
      
https://github.com/qemu/qemu/commit/32187f3d902afdfa9f4d861d9612739d3391fdc3
  Author: Yuri Benditovich <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/core/machine.c
    M hw/usb/redirect.c

  Log Message:
  -----------
  usb-redir: remove 'remote wakeup' flag from configuration descriptor

If the redirected device has this capability, Windows guest may
place the device into D2 and expect it to wake when the device
becomes active, but this will never happen. For example, when
internal Bluetooth adapter is redirected, keyboards and mice
connected to it do not work. Current commit removes this
capability (starting from machine 5.0)
Set 'usb-redir.suppress-remote-wake' property to 'off' to keep
'remote wake' as is or to 'on' to remove 'remote wake' on
4.2 or earlier.

Signed-off-by: Yuri Benditovich <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 394642a8d3742c885e397d5bb5ee0ec40743cdc6
      
https://github.com/qemu/qemu/commit/394642a8d3742c885e397d5bb5ee0ec40743cdc6
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/usb/redirect.c

  Log Message:
  -----------
  usbredir: Prevent recursion in usbredir_write

I've got a case where usbredir_write manages to call back into itself
via spice; this patch causes the recursion to fail (0 bytes) the write;
this seems to avoid the deadlock I was previously seeing.

I can't say I fully understand the interaction of usbredir and spice;
but there are a few similar guards in spice and usbredir
to catch other cases especially onces also related to 
spice_server_char_device_wakeup

This case seems to be triggered by repeated migration+repeated
reconnection of the viewer; but my debugging suggests the migration
finished before this hits.

The backtrace of the hang looks like:
  reds_handle_ticket
  reds_handle_other_links
  reds_channel_do_link
  red_channel_connect
  spicevmc_connect
  usbredir_create_parser
  usbredirparser_do_write
  usbredir_write
  qemu_chr_fe_write
  qemu_chr_write
  qemu_chr_write_buffer
  spice_chr_write
  spice_server_char_device_wakeup
  red_char_device_wakeup
  red_char_device_write_to_device
  vmc_write
  usbredirparser_do_write
  usbredir_write
  qemu_chr_fe_write
  qemu_chr_write
  qemu_chr_write_buffer
  qemu_mutex_lock_impl

and we fail as we lang through qemu_chr_write_buffer's lock
twice.

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1752320

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 34b9d6a1f8dfa8da08e084a7193a1fa3f669164e
      
https://github.com/qemu/qemu/commit/34b9d6a1f8dfa8da08e084a7193a1fa3f669164e
  Author: Chen Qun <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/usb/hcd-xhci.c

  Log Message:
  -----------
  xhci: Fix memory leak in xhci_kick_epctx when poweroff GuestOS

start vm with libvirt, when GuestOS running, enter poweroff command using
the xhci keyboard, then ASAN shows memory leak stack:

Direct leak of 80 byte(s) in 5 object(s) allocated from:
    #0 0xfffd1e6431cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
    #1 0xfffd1e107163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
    #2 0xaaad39051367 in qemu_sglist_init /qemu/dma-helpers.c:43
    #3 0xaaad3947c407 in pci_dma_sglist_init /qemu/include/hw/pci/pci.h:842
    #4 0xaaad3947c407 in xhci_xfer_create_sgl /qemu/hw/usb/hcd-xhci.c:1446
    #5 0xaaad3947c407 in xhci_setup_packet /qemu/hw/usb/hcd-xhci.c:1618
    #6 0xaaad3948625f in xhci_submit /qemu/hw/usb/hcd-xhci.c:1827
    #7 0xaaad3948625f in xhci_fire_transfer /qemu/hw/usb/hcd-xhci.c:1839
    #8 0xaaad3948625f in xhci_kick_epctx /qemu/hw/usb/hcd-xhci.c:1991
    #9 0xaaad3948f537 in xhci_doorbell_write /qemu/hw/usb/hcd-xhci.c:3158
    #10 0xaaad38bcbfc7 in memory_region_write_accessor /qemu/memory.c:483
    #11 0xaaad38bc654f in access_with_adjusted_size /qemu/memory.c:544
    #12 0xaaad38bd1877 in memory_region_dispatch_write /qemu/memory.c:1482
    #13 0xaaad38b1c77f in flatview_write_continue /qemu/exec.c:3167
    #14 0xaaad38b1ca83 in flatview_write /qemu/exec.c:3207
    #15 0xaaad38b268db in address_space_write /qemu/exec.c:3297
    #16 0xaaad38bf909b in kvm_cpu_exec /qemu/accel/kvm/kvm-all.c:2383
    #17 0xaaad38bb063f in qemu_kvm_cpu_thread_fn /qemu/cpus.c:1246
    #18 0xaaad39821c93 in qemu_thread_start /qemu/util/qemu-thread-posix.c:519
    #19 0xfffd1c8378bb  (/lib64/libpthread.so.0+0x78bb)
    #20 0xfffd1c77616b  (/lib64/libc.so.6+0xd616b)

Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 236846a019c4f7aa3111026fc9a1fe09684c8978
      
https://github.com/qemu/qemu/commit/236846a019c4f7aa3111026fc9a1fe09684c8978
  Author: Gerd Hoffmann <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/usb/hcd-xhci.c

  Log Message:
  -----------
  xhci: recheck slot status

Factor out slot status check into a helper function.  Add an additional
check after completing transfers.  This is needed in case a guest
queues multiple transfers in a row and a device unplug happens while
qemu processes them.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1786413
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden


  Commit: 3c8a6575985b1652b45bfa670b5e1907d642cfa0
      
https://github.com/qemu/qemu/commit/3c8a6575985b1652b45bfa670b5e1907d642cfa0
  Author: Peter Maydell <address@hidden>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M hw/core/machine.c
    M hw/usb/hcd-xhci.c
    M hw/usb/host-libusb.c
    M hw/usb/redirect.c
    M hw/usb/trace-events

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200113-pull-request' 
into staging

usb: bugfixes for xhci, usb pass-through and usb redirection.

# gpg: Signature made Mon 13 Jan 2020 13:06:35 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20200113-pull-request:
  xhci: recheck slot status
  xhci: Fix memory leak in xhci_kick_epctx when poweroff GuestOS
  usbredir: Prevent recursion in usbredir_write
  usb-redir: remove 'remote wakeup' flag from configuration descriptor
  usb-host: remove 'remote wakeup' flag from configuration descriptor

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/981c9b88e674...3c8a6575985b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]