X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpiix3.c;h=ab82bdbcc135ff32638d3c9e5a2d6a9843e5f586;hb=65286d916b384837567b0da69b4d5a77f190fdc0;hp=59c70fc722f6f11e655616fa5fe737ff702e7c45;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios.git diff --git a/palacios/src/devices/piix3.c b/palacios/src/devices/piix3.c index 59c70fc..ab82bdb 100644 --- a/palacios/src/devices/piix3.c +++ b/palacios/src/devices/piix3.c @@ -370,7 +370,7 @@ static int raise_pci_irq(struct pci_device * pci_dev, void * dev_data) { int intr_pin = pci_dev->config_header.intr_pin - 1; int irq_index = (intr_pin + pci_dev->dev_num - 1) & 0x3; - // PrintError("Raising PCI IRQ %d\n", piix3_cfg->pirq_rc[irq_index]); + //PrintError("Raising PCI IRQ %d, %p\n", piix3_cfg->pirq_rc[irq_index], piix3->vm); v3_raise_irq(piix3->vm, piix3_cfg->pirq_rc[irq_index]); @@ -395,13 +395,17 @@ static int lower_pci_irq(struct pci_device * pci_dev, void * dev_data) { -static int piix_free(struct vm_device * dev) { +static int piix_free(struct v3_southbridge * piix3) { + + // unregister pci + + V3_Free(piix3); return 0; } static struct v3_device_ops dev_ops = { - .free = piix_free, + .free = (int (*)(void *))piix_free, }; @@ -453,6 +457,7 @@ static int piix3_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { piix3->pci_bus = pci; piix3->type = V3_SB_PIIX3; + piix3->vm = vm; dev = v3_add_device(vm, dev_id, &dev_ops, piix3);