aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-04-01 15:15:29 +1100
committerAlexander Graf <agraf@suse.de>2011-04-01 18:34:56 +0200
commit8d90ad900507e373a7aa26daacd51e0474760425 (patch)
tree3aa76aba776859b568d9f439a8ff3697cb23a048 /hw/spapr.c
parentee86dfeebb5c12372935374b32e796e5d2544c90 (diff)
downloadqemu-8d90ad900507e373a7aa26daacd51e0474760425.zip
qemu-8d90ad900507e373a7aa26daacd51e0474760425.tar.gz
qemu-8d90ad900507e373a7aa26daacd51e0474760425.tar.bz2
Implement sPAPR Virtual LAN (ibmveth)
This patch implements the PAPR specified Inter Virtual Machine Logical LAN; that is the virtual hardware used by the Linux ibmveth driver. Signed-off-by: Paul Mackerras <paulus@samba.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.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/spapr.c b/hw/spapr.c
index f8749cc..c7306d9 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;