From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 0/4] usb: hotplug support for usb-bot and usb-uas
Date: Tue, 26 Jan 2016 11:41:21 +0100 [thread overview]
Message-ID: <1453804885-15544-1-git-send-email-kraxel@redhat.com> (raw)
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.
pleae review & comment,
Gerd
Gerd Hoffmann (4):
usb: make USBDevice->attached bool
usb: add attached property
usb-bot: hotplug support
usb-uas: hotplug support
hw/usb/bus.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
hw/usb/dev-storage.c | 8 ++++++--
hw/usb/dev-uas.c | 5 +++++
include/hw/usb.h | 3 ++-
4 files changed, 59 insertions(+), 7 deletions(-)
--
1.8.3.1
next reply other threads:[~2016-01-26 10:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 10:41 Gerd Hoffmann [this message]
2016-01-26 10:41 ` [Qemu-devel] [PATCH 1/4] usb: make USBDevice->attached bool Gerd Hoffmann
2016-02-02 13:06 ` Markus Armbruster
2016-01-26 10:41 ` [Qemu-devel] [PATCH 2/4] usb: add attached property Gerd Hoffmann
2016-02-02 13:33 ` Markus Armbruster
2016-02-02 14:25 ` Gerd Hoffmann
2016-02-02 15:37 ` Markus Armbruster
2016-01-26 10:41 ` [Qemu-devel] [PATCH 3/4] usb-bot: hotplug support Gerd Hoffmann
2016-02-02 13:36 ` Markus Armbruster
2016-02-02 18:16 ` Andreas Färber
2016-02-03 7:58 ` Gerd Hoffmann
2016-01-26 10:41 ` [Qemu-devel] [PATCH 4/4] usb-uas: " Gerd Hoffmann
2016-02-02 13:36 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453804885-15544-1-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).