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
|
@ -135,7 +135,7 @@ static void pci_piix_init_ports(PCIIDEState *d) {
|
|||
int i;
|
||||
|
||||
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_init_ioport(&d->bus[i], NULL, port_info[i].iobase,
|
||||
port_info[i].iobase2);
|
||||
ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue