qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/10] ahci: spawn controller on demand


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 10/10] ahci: spawn controller on demand
Date: Wed, 17 Nov 2010 02:05:36 +0100

When we add a device using -drive to the guest, we also need to create a
new SATA bus to handle the device. This patch does it the same way SCSI
does it today.

Signed-off-by: Alexander Graf <address@hidden>
---
 hw/pc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 69b13bf..d0320c4 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1075,4 +1075,9 @@ void pc_pci_device_init(PCIBus *pci_bus)
     for (bus = 0; bus <= max_bus; bus++) {
         pci_create_simple(pci_bus, -1, "lsi53c895a");
     }
+
+    max_bus = drive_get_max_bus(IF_SATA);
+    for (bus = 0; bus <= max_bus; bus++) {
+        pci_create_simple(pci_bus, -1, "ahci");
+    }
 }
-- 
1.6.0.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]