From 6e270446d0e107b5227d8c51d2f85546f8811e99 Mon Sep 17 00:00:00 2001 From: Ben Herrenschmidt Date: Fri, 1 Apr 2011 15:15:31 +1100 Subject: 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 Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/spapr.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/spapr.c') 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) -- cgit 1.4.1