mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33: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
|
@ -1163,7 +1163,7 @@ void ahci_init(AHCIState *s, DeviceState *qdev, DMAContext *dma, int ports)
|
|||
for (i = 0; i < s->ports; i++) {
|
||||
AHCIDevice *ad = &s->dev[i];
|
||||
|
||||
ide_bus_new(&ad->port, qdev, i);
|
||||
ide_bus_new(&ad->port, qdev, i, 1);
|
||||
ide_init2(&ad->port, irqs[i]);
|
||||
|
||||
ad->hba = s;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue