aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr.c
diff options
context:
space:
mode:
authorBen Herrenschmidt <benh@kernel.crashing.org>2011-04-01 15:15:31 +1100
committerAlexander Graf <agraf@suse.de>2011-04-01 18:34:57 +0200
commit6e270446d0e107b5227d8c51d2f85546f8811e99 (patch)
tree8ce4a148907b0266d1805d7ca5ff4b2a7a553c69 /hw/spapr.c
parentb45d63b62f0c05eb54bba0fafaf29b9b3f4dd99a (diff)
Implement PAPR virtual SCSI interface (ibmvscsi)
This patch implements the infrastructure and hypercalls necessary for the PAPR specified Virtual SCSI interface. This is the normal method for providing (virtual) disks to PAPR partitions. Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr.c')
-rw-r--r--hw/spapr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/spapr.c b/hw/spapr.c
index b432a9dcee..3bffaabe86 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -28,6 +28,7 @@
#include "hw.h"
#include "elf.h"
#include "net.h"
+#include "blockdev.h"
#include "hw/boards.h"
#include "hw/ppc.h"
@@ -353,6 +354,12 @@ static void ppc_spapr_init(ram_addr_t ram_size,
}
}
+ for (i = 0; i <= drive_get_max_bus(IF_SCSI); i++) {
+ spapr_vscsi_create(spapr->vio_bus, 0x2000 + i,
+ xics_find_qirq(spapr->icp, irq), irq);
+ irq++;
+ }
+
if (kernel_filename) {
uint64_t lowaddr = 0;
@@ -411,6 +418,7 @@ static QEMUMachine spapr_machine = {
.max_cpus = MAX_CPUS,
.no_vga = 1,
.no_parallel = 1,
+ .use_scsi = 1,
};
static void spapr_machine_init(void)