diff options
Diffstat (limited to 'hw/spapr.c')
-rw-r--r-- | hw/spapr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/spapr.c b/hw/spapr.c index f8749cc57d..c7306d91a4 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -27,6 +27,7 @@ #include "sysemu.h" #include "hw.h" #include "elf.h" +#include "net.h" #include "hw/boards.h" #include "hw/ppc.h" @@ -334,6 +335,24 @@ static void ppc_spapr_init(ram_addr_t ram_size, } } + for (i = 0; i < nb_nics; i++, irq++) { + NICInfo *nd = &nd_table[i]; + + if (!nd->model) { + nd->model = qemu_strdup("ibmveth"); + } + + if (strcmp(nd->model, "ibmveth") == 0) { + spapr_vlan_create(spapr->vio_bus, 0x1000 + i, nd, + xics_find_qirq(spapr->icp, irq), irq); + } else { + fprintf(stderr, "pSeries (sPAPR) platform does not support " + "NIC model '%s' (only ibmveth is supported)\n", + nd->model); + exit(1); + } + } + if (kernel_filename) { uint64_t lowaddr = 0; |