Markus Armbruster <arm...@redhat.com> writes: > Christian Borntraeger <borntrae...@de.ibm.com> writes: > >> There are QEMUMachines that have neither IF_IDE nor IF_SCSI as a >> default/standard interface to their block devices / drives. Therefore, >> this patch introduces a new field default_block_type per QEMUMachine >> struct. The prior use_scsi field becomes thereby obsolete and is >> replaced through .default_block_type = IF_SCSI. >> >> This patch also changes the default for s390x to IF_VIRTIO and >> removes an early hack that converts IF_IDE drives. > > Recommend to do this in a separate patch. > >> Other parties have already claimed interest (e.g. IF_SD for exynos) >> >> To create a sane default, for machines that dont specify a >> default_block_type, this patch makes IF_IDE = 0 and IF_NONE = 1. >> I checked all users of IF_NONE (blockdev.c and ww/device-hotplug.c) > > Typo: hw/ > >> as well as IF_IDE and it seems that it is ok to change the defines - >> in other words, I found no obvious (to me) assumption in the code >> regarding IF_NONE==0. > > Checking for IF_NONE and IF_IDE is not enough; we have to check that > BlockInterfaceType values are never used in a way that's broken by this > change, such as C89 initializers and implicit comparisons to zero. > > I just did that, and couldn't find anything.
Almost missed this one: it changes this error message of monitor command drive_add: (qemu) drive_add 0 if=ide Can't hot-add drive to type 1 to Can't hot-add drive to type 0 I don't think we care. Yes, the error message sucks. [...]