From patchwork Thu Jun 23 07:45:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9194645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 63D806077D for ; Thu, 23 Jun 2016 07:45:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5808928435 for ; Thu, 23 Jun 2016 07:45:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CFB62843B; Thu, 23 Jun 2016 07:45:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D35C528435 for ; Thu, 23 Jun 2016 07:45:35 +0000 (UTC) Received: from localhost ([::1]:34989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFzKQ-00042E-JX for patchwork-qemu-devel@patchwork.kernel.org; Thu, 23 Jun 2016 03:45:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFzK4-0003wR-8T for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:45:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFzJz-0004lv-5M for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:45:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFzJz-0004lb-0F for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:45:07 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7465185542 for ; Thu, 23 Jun 2016 07:45:06 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5N7j5GG025012; Thu, 23 Jun 2016 03:45:06 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id BE1CB821D6; Thu, 23 Jun 2016 09:45:04 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 23 Jun 2016 09:45:01 +0200 Message-Id: <1466667901-1341-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 23 Jun 2016 07:45:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] usb: add storage hotplug documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Suggested-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann --- docs/usb-storage.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/usb-storage.txt b/docs/usb-storage.txt index c5a3866..fbc1f2e 100644 --- a/docs/usb-storage.txt +++ b/docs/usb-storage.txt @@ -40,6 +40,18 @@ numbers must be continuous, i.e. for three devices you must use 0+1+2. The 0+1+5 numbering from the "usb-uas" example isn't going to work with "usb-bot". +Starting with qemu version 2.7 usb-bot and usb-uas devices can be +hotplugged. In the hotplug case they are added with "attached = +false" so the guest will not see the device until the "attached" +property is explicitly set to true. That allows to attach one or more +scsi devices before making the device visible to the guest, i.e. the +workflow looks like this: + + (1) device-add usb-bot,id=foo + (2) device-add scsi-{hd,cd},bus=foo.0,lun=0 + (2b) optionally add more devices (luns 1 ... 15). + (3) scripts/qmp/qom-set foo.attached = true + enjoy, Gerd