From: Lei Xia Date: Tue, 23 Nov 2010 18:47:00 +0000 (-0600) Subject: Fix to the piix3 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=c337a47be935380fba4b7425e80be7c089e45e6c;p=palacios.releases.git Fix to the piix3 --- diff --git a/palacios/src/devices/lnx_virtio_nic.c b/palacios/src/devices/lnx_virtio_nic.c index b6fd304..fb5c18b 100644 --- a/palacios/src/devices/lnx_virtio_nic.c +++ b/palacios/src/devices/lnx_virtio_nic.c @@ -780,6 +780,8 @@ static int connect_fn(struct v3_vm_info * info, net_state->net_ops = ops; net_state->backend_data = private_data; + net_state->virtio_dev = virtio; + ops->recv = virtio_rx; ops->poll = virtio_nic_poll; diff --git a/palacios/src/devices/piix3.c b/palacios/src/devices/piix3.c index 59c70fc..669d147 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]); @@ -453,6 +453,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);