qemu/hw/mips
John Snow d8f94e1bb2 ide: Update ide_drive_get to be HBA agnostic
Instead of duplicating the logic for the if_ide
(bus,unit) mappings, rely on the blockdev layer
for managing those mappings for us, and use the
drive_get_by_index call instead.

This allows ide_drive_get to work for AHCI HBAs
as well, and can be used in the Q35 initialization.

Lastly, change the nature of the argument to
ide_drive_get so that represents the number of
total drives we can support, and not the total
number of buses. This will prevent array overflows
if the units-per-default-bus property ever needs
to be adjusted for compatibility reasons.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1412187569-23452-5-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-10-03 10:30:33 +01:00
..
Makefile.objs hw: move PCI bridges to hw/pci-* or hw/ARCH 2013-04-08 18:13:14 +02:00
addr.c hw/mips: Add API to convert KVM guest KSEG0 <-> GPA 2014-06-18 16:58:10 +02:00
cputimer.c hw/mips/cputimer: Don't start periodic timer in KVM mode 2014-06-18 16:57:52 +02:00
gt64xxx_pci.c memory: convert memory_region_destroy to object_unparent 2014-08-18 12:06:20 +02:00
mips_fulong2e.c ide: Update ide_drive_get to be HBA agnostic 2014-10-03 10:30:33 +01:00
mips_int.c hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctls 2014-06-18 16:59:12 +02:00
mips_jazz.c memory: add parameter errp to memory_region_init_ram 2014-09-09 13:41:43 +02:00
mips_malta.c ide: Update ide_drive_get to be HBA agnostic 2014-10-03 10:30:33 +01:00
mips_mipssim.c memory: add parameter errp to memory_region_init_ram 2014-09-09 13:41:43 +02:00
mips_r4k.c ide: Update ide_drive_get to be HBA agnostic 2014-10-03 10:30:33 +01:00