qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Thomas Huth <thuth@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [PULL 8/8] docs/qdev-device-use: Don't suggest -drive and -net can do USB
Date: Thu,  3 Sep 2020 10:23:44 +0200	[thread overview]
Message-ID: <20200903082344.1877175-9-armbru@redhat.com> (raw)
In-Reply-To: <20200903082344.1877175-1-armbru@redhat.com>

Commit 480324ec8d "docs/qdev-device-use: Clean up the sentences
related to -usbdevice" deleted the information on syntax that no
longer works.  Unfortunately, the resulting text suggests you can
configure USB block devices with -drive, and USB network devices with
-net, which is misleading.

Instead of rephrasing the now misleading text, I'm putting the
information back, and just make clear it's about old versions of QEMU.

Cc: Thomas Huth <thuth@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200806081147.3123652-4-armbru@redhat.com>
---
 docs/qdev-device-use.txt | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt
index 9889521e3c..245cdf29c7 100644
--- a/docs/qdev-device-use.txt
+++ b/docs/qdev-device-use.txt
@@ -125,7 +125,14 @@ The -device argument differs in detail for each type of drive:
 
 * if=pflash, if=mtd, if=sd, if=xen are not yet available with -device
 
-For USB storage devices, you can use something like:
+For USB devices, the old way was actually different:
+
+    -usbdevice disk:format=FMT:FILENAME
+
+"Was" because "disk:" is gone since v2.12.0.
+
+The old way provided much less control than -drive's OPTS...  The new
+way fixes that:
 
     -device usb-storage,drive=DRIVE-ID,removable=RMB
 
@@ -178,6 +185,9 @@ The appropriate DEVNAME depends on the machine type.  For type "pc":
 
   -device usb-braille,chardev=braille -chardev braille,id=braille
 
+* -usbdevice serial::chardev is gone since v2.12.0.  It became
+  -device usb-serial,chardev=dev.
+
 LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows:
 
 * null becomes -chardev null
@@ -231,6 +241,12 @@ The old way to define the guest part looks like this:
 
     -net nic,netdev=NET-ID,macaddr=MACADDR,model=MODEL,name=ID,addr=STR,vectors=V
 
+Except for USB it looked like this:
+
+    -usbdevice net:netdev=NET-ID,macaddr=MACADDR,name=ID
+
+"Looked" because "net:" is gone since v2.12.0.
+
 The new way is -device:
 
     -device DEVNAME,netdev=NET-ID,mac=MACADDR,DEV-OPTS...
@@ -328,6 +344,13 @@ The new way is -device DEVNAME,DEV-OPTS...  Details depend on DRIVER:
 * u2f             -device u2f-{emulated,passthru}
 * braille         See "Character Devices"
 
+Until v2.12.0, we additionally had
+
+* host:...        See "Host Device Assignment"
+* disk:...        See "Block Devices"
+* serial:...      See "Character Devices"
+* net:...         See "Network Devices"
+
 === Watchdog Devices ===
 
 Host and guest part of watchdog devices have always been separate.
@@ -343,7 +366,14 @@ and host USB devices.  PCI devices can only be assigned with -device:
 
     -device vfio-pci,host=ADDR,id=ID
 
-To assign a host USB device use:
+The old way to assign a USB host device
+
+    -usbdevice host:auto:BUS.ADDR:VID:PRID
+
+was removed in v2.12.0.  Any of BUS, ADDR, VID, PRID could be the
+wildcard *.
+
+The new way is
 
     -device usb-host,hostbus=BUS,hostaddr=ADDR,vendorid=VID,productid=PRID
 
-- 
2.26.2



  parent reply	other threads:[~2020-09-03  8:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03  8:23 [PULL 0/8] QAPI patches patches for 2020-09-03 Markus Armbruster
2020-09-03  8:23 ` [PULL 1/8] qapi: enable use of g_autoptr with QAPI types Markus Armbruster
2020-09-03  8:23 ` [PULL 2/8] qapi/block-core.json: Remove stale description of 'blockdev-add' Markus Armbruster
2020-09-03  8:23 ` [PULL 3/8] scripts/qmp/qom-fuse: Unbreak import of QEMUMonitorProtocol Markus Armbruster
2020-09-03  8:23 ` [PULL 4/8] scripts/qmp/qom-fuse: Port to current Python module fuse Markus Armbruster
2020-09-03  8:23 ` [PULL 5/8] scripts/qmp/qom-fuse: Fix getattr(), read() for files in / Markus Armbruster
2020-09-03  8:23 ` [PULL 6/8] docs/interop/qmp-spec: Point to the QEMU QMP reference manual Markus Armbruster
2020-09-03  8:23 ` [PULL 7/8] qapi: Document event VSERPORT_CHANGE is rate-limited Markus Armbruster
2020-09-03  8:23 ` Markus Armbruster [this message]
2020-09-05 14:27 ` [PULL 0/8] QAPI patches patches for 2020-09-03 Peter Maydell

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=20200903082344.1877175-9-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).