qemu/hw/ide
Markus Armbruster f8b6cc0070 qdev: Decouple qdev_prop_drive from DriveInfo
Make the property point to BlockDriverState, cutting out the DriveInfo
middleman.  This prepares the ground for block devices that don't have
a DriveInfo.

Currently all user-defined ones have a DriveInfo, because the only way
to define one is -drive & friends (they go through drive_init()).
DriveInfo is closely tied to -drive, and like -drive, it mixes
information about host and guest part of the block device.  I'm
working towards a new way to define block devices, with clean
host/guest separation, and I need to get DriveInfo out of the way for
that.

Fortunately, the device models are perfectly happy with
BlockDriverState, except for two places: ide_drive_initfn() and
scsi_disk_initfn() need to check the DriveInfo for a serial number set
with legacy -drive serial=...  Use drive_get_by_blockdev() there.

Device model code should now use DriveInfo only when explicitly
dealing with drives defined the old way, i.e. without -device.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-07-02 13:18:02 +02:00
..
cmd646.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
core.c qdev: Decouple qdev_prop_drive from DriveInfo 2010-07-02 13:18:02 +02:00
internal.h qdev: Decouple qdev_prop_drive from DriveInfo 2010-07-02 13:18:02 +02:00
isa.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
macio.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
microdrive.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
mmio.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
pci.c ide save/restore current transfer fields 2010-01-26 15:42:02 -06:00
pci.h ide: port pci ide to vmstate 2009-10-27 12:28:46 -05:00
piix.c ide: Split non-qdev code off ide_init2() 2010-06-04 11:43:39 +02:00
qdev.c qdev: Decouple qdev_prop_drive from DriveInfo 2010-07-02 13:18:02 +02:00
via.c MIPS: Initial support of VIA IDE controller used by fulong mini pc 2010-06-29 23:07:52 +02:00