Statistics
| Branch: | Revision:

root / docs / qdev-device-use.txt @ 96560cb3

History | View | Annotate | Download (11 kB)

1 96560cb3 Markus Armbruster
= How to convert to -device & friends =
2 96560cb3 Markus Armbruster
3 96560cb3 Markus Armbruster
=== Specifying Bus and Address on Bus ===
4 96560cb3 Markus Armbruster
5 96560cb3 Markus Armbruster
In qdev, each device has a parent bus.  Some devices provide one or
6 96560cb3 Markus Armbruster
more buses for children.  You can specify a device's parent bus with
7 96560cb3 Markus Armbruster
-device parameter bus.
8 96560cb3 Markus Armbruster
9 96560cb3 Markus Armbruster
A device typically has a device address on its parent bus.  For buses
10 96560cb3 Markus Armbruster
where this address can be configured, devices provide a bus-specific
11 96560cb3 Markus Armbruster
property.  These are
12 96560cb3 Markus Armbruster
13 96560cb3 Markus Armbruster
    bus     property name       value format
14 96560cb3 Markus Armbruster
    PCI     addr                %x.%x (dev.fn, .fn optional)
15 96560cb3 Markus Armbruster
    I2C     address             %u
16 96560cb3 Markus Armbruster
    SCSI    scsi-id             %u
17 96560cb3 Markus Armbruster
18 96560cb3 Markus Armbruster
Example: device i440FX-pcihost is on the root bus, and provides a PCI
19 96560cb3 Markus Armbruster
bus named pci.0.  To put a FOO device into its slot 4, use -device
20 96560cb3 Markus Armbruster
FOO,bus=/i440FX-pcihost/pci.0,addr=4.  The abbreviated form bus=pci.0
21 96560cb3 Markus Armbruster
also works as long as the bus name is unique.
22 96560cb3 Markus Armbruster
23 96560cb3 Markus Armbruster
Note: the USB device address can't be controlled at this time.
24 96560cb3 Markus Armbruster
25 96560cb3 Markus Armbruster
=== Block Devices ===
26 96560cb3 Markus Armbruster
27 96560cb3 Markus Armbruster
A QEMU block device (drive) has a host and a guest part.
28 96560cb3 Markus Armbruster
29 96560cb3 Markus Armbruster
In the general case, the guest device is connected to a controller
30 96560cb3 Markus Armbruster
device.  For instance, the IDE controller provides two IDE buses, each
31 96560cb3 Markus Armbruster
of which can have up to two ide-drive devices, and each ide-drive
32 96560cb3 Markus Armbruster
device is a guest part, and is connected to a host part.
33 96560cb3 Markus Armbruster
34 96560cb3 Markus Armbruster
Except we sometimes lump controller, bus(es) and drive device(s) all
35 96560cb3 Markus Armbruster
together into a single device.  For instance, the ISA floppy
36 96560cb3 Markus Armbruster
controller is connected to up to two host drives.
37 96560cb3 Markus Armbruster
38 96560cb3 Markus Armbruster
The old ways to define block devices define host and guest part
39 96560cb3 Markus Armbruster
together.  Sometimes, they can even define a controller device in
40 96560cb3 Markus Armbruster
addition to the block device.
41 96560cb3 Markus Armbruster
42 96560cb3 Markus Armbruster
The new way keeps the parts separate: you create the host part with
43 96560cb3 Markus Armbruster
-drive, and guest device(s) with -device.
44 96560cb3 Markus Armbruster
45 96560cb3 Markus Armbruster
The various old ways to define drives all boil down to the common form
46 96560cb3 Markus Armbruster
47 96560cb3 Markus Armbruster
    -drive if=TYPE,index=IDX,bus=BUS,unit=UNIT,HOST-OPTS...
48 96560cb3 Markus Armbruster
49 96560cb3 Markus Armbruster
TYPE, BUS and UNIT identify the controller device, which of its buses
50 96560cb3 Markus Armbruster
to use, and the drive's address on that bus.  Details depend on TYPE.
51 96560cb3 Markus Armbruster
IDX is an alternative way to specify BUS and UNIT.
52 96560cb3 Markus Armbruster
53 96560cb3 Markus Armbruster
In the new way, this becomes something like
54 96560cb3 Markus Armbruster
55 96560cb3 Markus Armbruster
   -drive if=none,id=DRIVE-ID,HOST-OPTS...
56 96560cb3 Markus Armbruster
   -device DEVNAME,drive=DRIVE-ID,DEV-OPTS...
57 96560cb3 Markus Armbruster
58 96560cb3 Markus Armbruster
The -device argument differs in detail for each kind of drive:
59 96560cb3 Markus Armbruster
60 96560cb3 Markus Armbruster
* if=ide
61 96560cb3 Markus Armbruster
62 96560cb3 Markus Armbruster
  -device ide-drive,drive=DRIVE-ID,bus=IDE-BUS,unit=UNIT
63 96560cb3 Markus Armbruster
64 96560cb3 Markus Armbruster
  where IDE-BUS identifies an IDE bus, normally either ide.0 or ide.1,
65 96560cb3 Markus Armbruster
  and UNIT is either 0 or 1.
66 96560cb3 Markus Armbruster
67 96560cb3 Markus Armbruster
  Bug: new way does not work for ide.1 unit 0 (in old terms: index=2)
68 96560cb3 Markus Armbruster
  unless you disable the default CD-ROM with -nodefaults.
69 96560cb3 Markus Armbruster
70 96560cb3 Markus Armbruster
* if=scsi
71 96560cb3 Markus Armbruster
72 96560cb3 Markus Armbruster
  The old way implicitly creates SCSI controllers as needed.  The new
73 96560cb3 Markus Armbruster
  way makes that explicit:
74 96560cb3 Markus Armbruster
75 96560cb3 Markus Armbruster
  -device lsi53c895a,id=ID
76 96560cb3 Markus Armbruster
77 96560cb3 Markus Armbruster
  As for all PCI devices, you can add bus=PCI-BUS,addr=DEVFN to
78 96560cb3 Markus Armbruster
  control the PCI device address.
79 96560cb3 Markus Armbruster
80 96560cb3 Markus Armbruster
  This SCSI controller a single SCSI bus, named ID.0.  Put a disk on
81 96560cb3 Markus Armbruster
  it:
82 96560cb3 Markus Armbruster
83 96560cb3 Markus Armbruster
  -device scsi-disk,drive=DRIVE-ID,bus=ID.0,scsi-id=SCSI-ID
84 96560cb3 Markus Armbruster
85 96560cb3 Markus Armbruster
* if=floppy
86 96560cb3 Markus Armbruster
87 96560cb3 Markus Armbruster
  -global isa-fdc,driveA=DRIVE-ID,driveB=DRIVE-ID
88 96560cb3 Markus Armbruster
89 96560cb3 Markus Armbruster
  This is -global instead of -device, because the floppy controller is
90 96560cb3 Markus Armbruster
  created automatically, and we want to configure that one, not create
91 96560cb3 Markus Armbruster
  a second one (which isn't possible anyway).
92 96560cb3 Markus Armbruster
93 96560cb3 Markus Armbruster
  Omitting a drive parameter makes that drive empty.
94 96560cb3 Markus Armbruster
95 96560cb3 Markus Armbruster
  Bug: driveA works only if you disable the default floppy drive with
96 96560cb3 Markus Armbruster
  -nodefaults.
97 96560cb3 Markus Armbruster
98 96560cb3 Markus Armbruster
* if=virtio
99 96560cb3 Markus Armbruster
100 96560cb3 Markus Armbruster
  -device virtio-blk-pci,drive=DRIVE-ID,class=C,vectors=V
101 96560cb3 Markus Armbruster
102 96560cb3 Markus Armbruster
  This lets you control PCI device class and MSI-X vectors.
103 96560cb3 Markus Armbruster
104 96560cb3 Markus Armbruster
  As for all PCI devices, you can add bus=PCI-BUS,addr=DEVFN to
105 96560cb3 Markus Armbruster
  control the PCI device address.
106 96560cb3 Markus Armbruster
107 96560cb3 Markus Armbruster
* if=pflash, if=mtd, if=sd, if=xen are not yet available with -device
108 96560cb3 Markus Armbruster
109 96560cb3 Markus Armbruster
For USB devices, the old way is actually different:
110 96560cb3 Markus Armbruster
111 96560cb3 Markus Armbruster
    -usbdevice disk:format=FMT:FILENAME
112 96560cb3 Markus Armbruster
113 96560cb3 Markus Armbruster
Provides much less control than -drive's HOST-OPTS...  The new way
114 96560cb3 Markus Armbruster
fixes that:
115 96560cb3 Markus Armbruster
116 96560cb3 Markus Armbruster
    -device usb-storage,drive=DRIVE-ID
117 96560cb3 Markus Armbruster
118 96560cb3 Markus Armbruster
=== Character Devices ===
119 96560cb3 Markus Armbruster
120 96560cb3 Markus Armbruster
A QEMU character device has a host and a guest part.
121 96560cb3 Markus Armbruster
122 96560cb3 Markus Armbruster
The old ways to define character devices define host and guest part
123 96560cb3 Markus Armbruster
together.
124 96560cb3 Markus Armbruster
125 96560cb3 Markus Armbruster
The new way keeps the parts separate: you create the host part with
126 96560cb3 Markus Armbruster
-chardev, and the guest device with -device.
127 96560cb3 Markus Armbruster
128 96560cb3 Markus Armbruster
The various old ways to define a character device are all of the
129 96560cb3 Markus Armbruster
general form
130 96560cb3 Markus Armbruster
131 96560cb3 Markus Armbruster
    -FOO FOO-OPTS...,LEGACY-CHARDEV
132 96560cb3 Markus Armbruster
133 96560cb3 Markus Armbruster
where FOO-OPTS... is specific to -FOO, and the host part
134 96560cb3 Markus Armbruster
LEGACY-CHARDEV is the same everywhere.
135 96560cb3 Markus Armbruster
136 96560cb3 Markus Armbruster
In the new way, this becomes
137 96560cb3 Markus Armbruster
138 96560cb3 Markus Armbruster
    -chardev HOST-OPTS...,id=CHR-ID
139 96560cb3 Markus Armbruster
    -device DEVNAME,chardev=CHR-ID,DEV-OPTS...
140 96560cb3 Markus Armbruster
141 96560cb3 Markus Armbruster
The appropriate DEVNAME depends on the machine type.  For type "pc":
142 96560cb3 Markus Armbruster
143 96560cb3 Markus Armbruster
* -serial becomes -device isa-serial,iobase=IOADDR,irq=IRQ,index=IDX
144 96560cb3 Markus Armbruster
145 96560cb3 Markus Armbruster
  This lets you control I/O ports and IRQs.
146 96560cb3 Markus Armbruster
147 96560cb3 Markus Armbruster
* -parallel becomes -device isa-parallel,iobase=IOADDR,irq=IRQ,index=IDX
148 96560cb3 Markus Armbruster
149 96560cb3 Markus Armbruster
  This lets you control I/O ports and IRQs.
150 96560cb3 Markus Armbruster
151 96560cb3 Markus Armbruster
* -usbdevice serial:vendorid=VID,productid=PRID becomes
152 96560cb3 Markus Armbruster
  -device usb-serial,vendorid=VID,productid=PRID
153 96560cb3 Markus Armbruster
154 96560cb3 Markus Armbruster
* -usbdevice braille doesn't support LEGACY-CHARDEV syntax.  It always
155 96560cb3 Markus Armbruster
  uses "braille".  With -device, this useful default is gone, so you
156 96560cb3 Markus Armbruster
  have to use something like
157 96560cb3 Markus Armbruster
158 96560cb3 Markus Armbruster
  -device usb-braille,chardev=braille,vendorid=VID,productid=PRID
159 96560cb3 Markus Armbruster
  -chardev braille,id=braille
160 96560cb3 Markus Armbruster
161 96560cb3 Markus Armbruster
* -virtioconsole is still being worked on
162 96560cb3 Markus Armbruster
163 96560cb3 Markus Armbruster
LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows:
164 96560cb3 Markus Armbruster
165 96560cb3 Markus Armbruster
* null becomes -chardev null
166 96560cb3 Markus Armbruster
167 96560cb3 Markus Armbruster
* pty, msmouse, braille, stdio likewise
168 96560cb3 Markus Armbruster
169 96560cb3 Markus Armbruster
* vc:WIDTHxHEIGHT becomes -chardev vc,width=WIDTH,height=HEIGHT
170 96560cb3 Markus Armbruster
171 96560cb3 Markus Armbruster
* vc:<COLS>Cx<ROWS>C becomes -chardev vc,cols=<COLS>,rows=<ROWS>
172 96560cb3 Markus Armbruster
173 96560cb3 Markus Armbruster
* con: becomes -chardev console
174 96560cb3 Markus Armbruster
175 96560cb3 Markus Armbruster
* COM<NUM> becomes -chardev serial,path=<NUM>
176 96560cb3 Markus Armbruster
177 96560cb3 Markus Armbruster
* file:FNAME becomes -chardev file,path=FNAME
178 96560cb3 Markus Armbruster
179 96560cb3 Markus Armbruster
* pipe:FNAME becomes -chardev pipe,path=FNAME
180 96560cb3 Markus Armbruster
181 96560cb3 Markus Armbruster
* tcp:HOST:PORT,OPTS... becomes -chardev socket,host=HOST,port=PORT,OPTS...
182 96560cb3 Markus Armbruster
183 96560cb3 Markus Armbruster
* telnet:HOST:PORT,OPTS... becomes
184 96560cb3 Markus Armbruster
  -chardev socket,host=HOST,port=PORT,OPTS...,telnet=on
185 96560cb3 Markus Armbruster
186 96560cb3 Markus Armbruster
* udp:HOST:PORT@LOCALADDR:LOCALPORT becomes
187 96560cb3 Markus Armbruster
  -chardev udp,host=HOST,port=PORT,localaddr=LOCALADDR,localport=LOCALPORT
188 96560cb3 Markus Armbruster
189 96560cb3 Markus Armbruster
* unix:FNAME becomes -chardev socket,path=FNAME
190 96560cb3 Markus Armbruster
191 96560cb3 Markus Armbruster
* /dev/parportN becomes -chardev parport,file=/dev/parportN
192 96560cb3 Markus Armbruster
193 96560cb3 Markus Armbruster
* /dev/ppiN likewise
194 96560cb3 Markus Armbruster
195 96560cb3 Markus Armbruster
* Any other /dev/FNAME becomes -chardev tty,path=/dev/FNAME
196 96560cb3 Markus Armbruster
197 96560cb3 Markus Armbruster
* mon:LEGACY-CHARDEV is special: it multiplexes the monitor onto the
198 96560cb3 Markus Armbruster
  character device defined by LEGACY-CHARDEV.  -chardev provides more
199 96560cb3 Markus Armbruster
  general multiplexing instead: you can connect up to four users to a
200 96560cb3 Markus Armbruster
  single host part.  You need to pass mux=on to -chardev to enable
201 96560cb3 Markus Armbruster
  switching the input focus.
202 96560cb3 Markus Armbruster
203 96560cb3 Markus Armbruster
QEMU uses LEGACY-CHARDEV syntax not just to set up guest devices, but
204 96560cb3 Markus Armbruster
also in various other places such as -monitor or -net
205 96560cb3 Markus Armbruster
user,guestfwd=...  You can use chardev:CHR-ID in place of
206 96560cb3 Markus Armbruster
LEGACY-CHARDEV to refer to a host part defined with -chardev.
207 96560cb3 Markus Armbruster
208 96560cb3 Markus Armbruster
=== Network Devices ===
209 96560cb3 Markus Armbruster
210 96560cb3 Markus Armbruster
A QEMU network device (NIC) has a host and a guest part.
211 96560cb3 Markus Armbruster
212 96560cb3 Markus Armbruster
The old ways to define NICs define host and guest part together.  It
213 96560cb3 Markus Armbruster
looks like this:
214 96560cb3 Markus Armbruster
215 96560cb3 Markus Armbruster
    -net nic,vlan=VLAN,macaddr=MACADDR,model=MODEL,name=ID,addr=STR,vectors=V
216 96560cb3 Markus Armbruster
217 96560cb3 Markus Armbruster
Except for USB it looks like this:
218 96560cb3 Markus Armbruster
219 96560cb3 Markus Armbruster
    -usbdevice net:vlan=VLAN,macaddr=MACADDR,name=ID,addr=STR,vectors=V
220 96560cb3 Markus Armbruster
221 96560cb3 Markus Armbruster
The new way keeps the parts separate: you create the host part with
222 96560cb3 Markus Armbruster
-netdev, and the guest device with -device, like this:
223 96560cb3 Markus Armbruster
224 96560cb3 Markus Armbruster
    -netdev type=TYPE,id=NET-ID
225 96560cb3 Markus Armbruster
    -device DEVNAME,netdev=NET-ID,mac=MACADDR,DEV-OPTS...
226 96560cb3 Markus Armbruster
227 96560cb3 Markus Armbruster
Unlike the old way, this creates just a network device, not a VLAN.
228 96560cb3 Markus Armbruster
If you really want a VLAN, create it the usual way, then create the
229 96560cb3 Markus Armbruster
guest device like this:
230 96560cb3 Markus Armbruster
231 96560cb3 Markus Armbruster
    -device DEVNAME,vlan=VLAN,mac=MACADDR,DEV-OPTS...
232 96560cb3 Markus Armbruster
233 96560cb3 Markus Armbruster
DEVNAME equals MODEL, except for virtio you have to name the virtio
234 96560cb3 Markus Armbruster
device appropriate for the bus (virtio-net-pci for PCI), and for USB
235 96560cb3 Markus Armbruster
NIC you have to use usb-net.
236 96560cb3 Markus Armbruster
237 96560cb3 Markus Armbruster
The old name=ID parameter becomes the usual id=ID with -device.
238 96560cb3 Markus Armbruster
239 96560cb3 Markus Armbruster
For PCI devices, you can add bus=PCI-BUS,addr=DEVFN to control the PCI
240 96560cb3 Markus Armbruster
device address, as usual.  The old -net nic provides parameter addr
241 96560cb3 Markus Armbruster
for that, it is silently ignored when the NIC is not a PCI device.
242 96560cb3 Markus Armbruster
243 96560cb3 Markus Armbruster
-net nic accepts vectors=V for all models, but it's silently ignored
244 96560cb3 Markus Armbruster
except for virtio-net-pci (model=virtio).  With -device, only devices
245 96560cb3 Markus Armbruster
that support it accept it.
246 96560cb3 Markus Armbruster
247 96560cb3 Markus Armbruster
Not all devices are available with -device at this time.  All PCI
248 96560cb3 Markus Armbruster
devices and ne2k_isa are.
249 96560cb3 Markus Armbruster
250 96560cb3 Markus Armbruster
Some PCI devices aren't available with -net nic, e.g. i82558a.
251 96560cb3 Markus Armbruster
252 96560cb3 Markus Armbruster
Bug: usb-net does not work, yet.  Patch posted.
253 96560cb3 Markus Armbruster
254 96560cb3 Markus Armbruster
=== Graphics Devices ===
255 96560cb3 Markus Armbruster
256 96560cb3 Markus Armbruster
Host and guest part of graphics devices have always been separate.
257 96560cb3 Markus Armbruster
258 96560cb3 Markus Armbruster
The old way to define the guest graphics device is -vga VGA.
259 96560cb3 Markus Armbruster
260 96560cb3 Markus Armbruster
The new way is -device.  Map from -vga argument to -device:
261 96560cb3 Markus Armbruster
262 96560cb3 Markus Armbruster
    std         -device VGA
263 96560cb3 Markus Armbruster
    cirrus      -device cirrus-vga
264 96560cb3 Markus Armbruster
    vmware      -device vmware-svga
265 96560cb3 Markus Armbruster
    xenfb       not yet available with -device
266 96560cb3 Markus Armbruster
267 96560cb3 Markus Armbruster
As for all PCI devices, you can add bus=PCI-BUS,addr=DEVFN to control
268 96560cb3 Markus Armbruster
the PCI device address.
269 96560cb3 Markus Armbruster
270 96560cb3 Markus Armbruster
-device VGA supports properties bios-offset and bios-size, but they
271 96560cb3 Markus Armbruster
aren't used with machine type "pc".
272 96560cb3 Markus Armbruster
273 96560cb3 Markus Armbruster
Bug: -device cirrus-vga and -device vmware-svga require -nodefaults.
274 96560cb3 Markus Armbruster
275 96560cb3 Markus Armbruster
Bug: the new way requires PCI; ISA VGA is not yet available with
276 96560cb3 Markus Armbruster
-device.
277 96560cb3 Markus Armbruster
278 96560cb3 Markus Armbruster
Bug: the new way doesn't work for machine type "pc", because it
279 96560cb3 Markus Armbruster
violates obscure device initialization ordering constraints.
280 96560cb3 Markus Armbruster
281 96560cb3 Markus Armbruster
=== Audio Devices ===
282 96560cb3 Markus Armbruster
283 96560cb3 Markus Armbruster
Host and guest part of audio devices have always been separate.
284 96560cb3 Markus Armbruster
285 96560cb3 Markus Armbruster
The old way to define guest audio devices is -soundhw C1,...
286 96560cb3 Markus Armbruster
287 96560cb3 Markus Armbruster
The new way is to define each guest audio device separately with
288 96560cb3 Markus Armbruster
-device.
289 96560cb3 Markus Armbruster
290 96560cb3 Markus Armbruster
Map from -soundhw sound card name to -device:
291 96560cb3 Markus Armbruster
292 96560cb3 Markus Armbruster
    ac97        -device AC97
293 96560cb3 Markus Armbruster
    cs4231a     -device cs4231a,iobase=IOADDR,irq=IRQ,dma=DMA
294 96560cb3 Markus Armbruster
    es1370      -device ES1370
295 96560cb3 Markus Armbruster
    gus         -device gus,iobase=IOADDR,irq=IRQ,dma=DMA,freq=F
296 96560cb3 Markus Armbruster
    sb16        -device sb16,iobase=IOADDR,irq=IRQ,dma=DMA,dma16=DMA16,version=V
297 96560cb3 Markus Armbruster
    adlib       not yet available with -device
298 96560cb3 Markus Armbruster
    pcspk       not yet available with -device
299 96560cb3 Markus Armbruster
300 96560cb3 Markus Armbruster
For PCI devices, you can add bus=PCI-BUS,addr=DEVFN to control the PCI
301 96560cb3 Markus Armbruster
device address, as usual.
302 96560cb3 Markus Armbruster
303 96560cb3 Markus Armbruster
=== USB Devices ===
304 96560cb3 Markus Armbruster
305 96560cb3 Markus Armbruster
The old way to define a virtual USB device is -usbdevice DRIVER:OPTS...
306 96560cb3 Markus Armbruster
307 96560cb3 Markus Armbruster
The new way is -device DEVNAME,DEV-OPTS...  Details depend on DRIVER:
308 96560cb3 Markus Armbruster
309 96560cb3 Markus Armbruster
* mouse           -device usb-mouse
310 96560cb3 Markus Armbruster
* tablet          -device usb-tablet
311 96560cb3 Markus Armbruster
* keyboard        -device usb-kdb
312 96560cb3 Markus Armbruster
* wacom-tablet    -device usb-wacom-tablet
313 96560cb3 Markus Armbruster
* host:...        See "Host Device Assignment"
314 96560cb3 Markus Armbruster
* disk:...        See "Block Devices"
315 96560cb3 Markus Armbruster
* serial:...      See "Character Devices"
316 96560cb3 Markus Armbruster
* braille         See "Character Devices"
317 96560cb3 Markus Armbruster
* net:...         See "Network Devices"
318 96560cb3 Markus Armbruster
* bt:...          not yet available with -device
319 96560cb3 Markus Armbruster
320 96560cb3 Markus Armbruster
=== Watchdog Devices ===
321 96560cb3 Markus Armbruster
322 96560cb3 Markus Armbruster
Host and guest part of watchdog devices have always been separate.
323 96560cb3 Markus Armbruster
324 96560cb3 Markus Armbruster
The old way to define a guest watchdog device is -watchdog DEVNAME.
325 96560cb3 Markus Armbruster
The new way is -device DEVNAME.  For PCI devices, you can add
326 96560cb3 Markus Armbruster
bus=PCI-BUS,addr=DEVFN to control the PCI device address, as usual.
327 96560cb3 Markus Armbruster
328 96560cb3 Markus Armbruster
=== Host Device Assignment ===
329 96560cb3 Markus Armbruster
330 96560cb3 Markus Armbruster
QEMU supports assigning host PCI devices (qemu-kvm only at this time)
331 96560cb3 Markus Armbruster
and host USB devices.
332 96560cb3 Markus Armbruster
333 96560cb3 Markus Armbruster
The old way to assign a host PCI device is
334 96560cb3 Markus Armbruster
335 96560cb3 Markus Armbruster
    -pcidevice host=ADDR,dma=none,id=ID
336 96560cb3 Markus Armbruster
337 96560cb3 Markus Armbruster
The new way is
338 96560cb3 Markus Armbruster
339 96560cb3 Markus Armbruster
    -device pci-assign,host=ADDR,iommu=IOMMU,id=ID
340 96560cb3 Markus Armbruster
341 96560cb3 Markus Armbruster
The old dma=none becomes iommu=0 with -device.
342 96560cb3 Markus Armbruster
343 96560cb3 Markus Armbruster
The old way to assign a host USB device is
344 96560cb3 Markus Armbruster
345 96560cb3 Markus Armbruster
    -usbdevice host:auto:BUS.ADDR:VID:PRID
346 96560cb3 Markus Armbruster
347 96560cb3 Markus Armbruster
where any of BUS, ADDR, VID, PRID can be the wildcard *.
348 96560cb3 Markus Armbruster
349 96560cb3 Markus Armbruster
The new way is
350 96560cb3 Markus Armbruster
351 96560cb3 Markus Armbruster
    -device usb-host,hostbus=BUS,hostaddr=ADDR,vendorid=VID,productid=PRID
352 96560cb3 Markus Armbruster
353 96560cb3 Markus Armbruster
where left out or zero BUS, ADDR, VID, PRID serve as wildcard.