aboutsummaryrefslogtreecommitdiff
path: root/docs/qdev-device-use.txt
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-08-06 10:11:47 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-09-03 09:58:39 +0200
commit923fbd4cbd485dc72e9f2578cd891607ec43ac70 (patch)
treed6ff5f7cf1a556d7e15a56369750082ba2e3e361 /docs/qdev-device-use.txt
parent382bd1cbbde73a5815df0ba189e72b82a11fff04 (diff)
downloadqemu-923fbd4cbd485dc72e9f2578cd891607ec43ac70.zip
qemu-923fbd4cbd485dc72e9f2578cd891607ec43ac70.tar.gz
qemu-923fbd4cbd485dc72e9f2578cd891607ec43ac70.tar.bz2
docs/qdev-device-use: Don't suggest -drive and -net can do USB
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>
Diffstat (limited to 'docs/qdev-device-use.txt')
-rw-r--r--docs/qdev-device-use.txt34
1 files changed, 32 insertions, 2 deletions
diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt
index 9889521..245cdf2 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