Support addr=... in option argument of -drive if=virtio
Make drive_init() accept addr=, put the value into struct DriveInfo.
Use it in all the places that create virtio-blk-pci devices:
pc_init1(), bamboo_init(), mpc8544ds_init().
Don't support addr= in third argument of monitor command pci_add and
second argument of drive_add, because that clashes with their first
arguments. Admittedly unelegant.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
diff --git a/qemu-options.hx b/qemu-options.hx
index 895b248..fdeda10 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -92,6 +92,7 @@
"-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
" [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
" [,cache=writethrough|writeback|none][,format=f][,serial=s]\n"
+ " [,addr=A]\n"
" use 'file' as a drive image\n")
STEXI
@item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
@@ -126,6 +127,8 @@
an untrusted format header.
@item serial=@var{serial}
This option specifies the serial number to assign to the device.
+@item addr=@var{addr}
+Specify the controller's PCI address (if=virtio only).
@end table
By default, writethrough caching is used for all block device. This means that