qemu 3 '-usbdevice' is deprecated

qemu 3.1 提示

1
'-usbdevice' is deprecated, please use '-device usb-...' instead

使用主机usb设备可以这样写:

1
2
-machine usb=on
-device usb-host,hostbus=2,hostaddr=4

一定不要忘了添加 -machine usb=on,不然

1
No 'usb-bus' bus found for device 'usb-host'