qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] usb: hotplug support for usb-bot and usb-uas
@ 2016-06-15  9:46 Gerd Hoffmann
  2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 1/5] usb-storage: qcow2 encryption support is finally gone, zap dead code Gerd Hoffmann
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2016-06-15  9:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Composite device hotplug is a long-standing issue in qemu.

PCI multifunction hotplug has been solved recently in a pci-specific
way, by simply not showing hot-plugged functions to the guest until
function #0 is plugged.

So I figured we maybe should check whenever we can apply a simliar trick
to USB composite devices.  As the usb subsystem already can hide usb
devices from the guest (used for example with usb-host, in case the
physical usb device is not plugged in the host machine) this turned out
to be surprisingly simple.

So, here we go.  Basic idea is the "attached" state becomes settable via
monitor.  Now you can create a usb-bot (or usb-uas) device, then attach
the scsi device(s) you want, and when you are done you flip attached to
true to make the composed device visible to the guest.

v2 changes:
 * rebased to latest master.
 * add patch #1 (kill dead code for qcow2 encryption).
 * reword patch #3 as suggested by Markus.

please review,
  Gerd

Gerd Hoffmann (5):
  usb-storage: qcow2 encryption support is finally gone, zap dead code
  usb: make USBDevice->attached bool
  usb: Add QOM property "attached ".
  usb-bot: hotplug support
  usb-uas: hotplug support

 hw/usb/bus.c         | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
 hw/usb/dev-storage.c | 42 ++++++------------------------------------
 hw/usb/dev-uas.c     |  5 +++++
 include/hw/usb.h     |  3 ++-
 4 files changed, 59 insertions(+), 41 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2016-06-15  9:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15  9:46 [Qemu-devel] [PATCH v2 0/5] usb: hotplug support for usb-bot and usb-uas Gerd Hoffmann
2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 1/5] usb-storage: qcow2 encryption support is finally gone, zap dead code Gerd Hoffmann
2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 2/5] usb: make USBDevice->attached bool Gerd Hoffmann
2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 3/5] usb: Add QOM property "attached " Gerd Hoffmann
2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 4/5] usb-bot: hotplug support Gerd Hoffmann
2016-06-15  9:46 ` [Qemu-devel] [PATCH v2 5/5] usb-uas: " Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).