X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2F8259a.c;h=443fb0aacdfddcc060a07a984c7875ab3d7e52c6;hp=5edec8c82865a209d4fa380e205c0ac211cd01b6;hb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;hpb=19b2e4b4ce85ae4e683a3ede33360bdf7547b069 diff --git a/palacios/src/devices/8259a.c b/palacios/src/devices/8259a.c index 5edec8c..443fb0a 100644 --- a/palacios/src/devices/8259a.c +++ b/palacios/src/devices/8259a.c @@ -209,6 +209,8 @@ static int pic_raise_intr(struct guest_info * info, void * private_data, int irq return -1; } + v3_interrupt_cpu(info, 0); + return 0; } @@ -713,15 +715,17 @@ static struct v3_device_ops dev_ops = { -static int pic_init(struct guest_info * vm, void * cfg_data) { +static int pic_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { struct pic_internal * state = NULL; state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); + char * name = v3_cfg_val(cfg, "name"); + V3_ASSERT(state != NULL); - struct vm_device * dev = v3_allocate_device("8259A", &dev_ops, state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "8259A"); + PrintError("Could not attach device %s\n", name); return -1; }