mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
ahci: Don't allow creating slave drives
An IDE bus provided by AHCI can only take a single IDE drive. If you add a drive as slave, qemu used to accept the command line but the device wouldn't be actually usable. Catch the situation instead and error out. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
15d23fb966
commit
0ee20e6658
9 changed files with 18 additions and 9 deletions
|
@ -281,7 +281,7 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev)
|
|||
|
||||
irq = qemu_allocate_irqs(cmd646_set_irq, d, 2);
|
||||
for (i = 0; i < 2; i++) {
|
||||
ide_bus_new(&d->bus[i], &d->dev.qdev, i);
|
||||
ide_bus_new(&d->bus[i], &d->dev.qdev, i, 2);
|
||||
ide_init2(&d->bus[i], irq[i]);
|
||||
|
||||
bmdma_init(&d->bus[i], &d->bmdma[i], d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue