X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci_passthrough.c;h=7b0c2d30af9053a8aed90340548f008b33884eef;hp=ce4b334f6d1d46e9e780b513eb5435c1803604b9;hb=b0f9eaf6aecdd3d91cfe6220d69b595588820bd0;hpb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14 diff --git a/palacios/src/devices/pci_passthrough.c b/palacios/src/devices/pci_passthrough.c index ce4b334..7b0c2d3 100644 --- a/palacios/src/devices/pci_passthrough.c +++ b/palacios/src/devices/pci_passthrough.c @@ -187,9 +187,13 @@ static int pci_bar_init(int bar_num, uint32_t * dst,void * private_data) { //v3_irq_restore(irq_state); - pbar->size = ~PCI_IO_BASE(max_val) + 1; + V3_Print("max_val = %x\n", max_val); + + pbar->size = (uint16_t)~PCI_IO_BASE(max_val) + 1; + + V3_Print("IO Bar with %d (%x) ports %x->%x\n", pbar->size, pbar->size, pbar->addr, pbar->addr + pbar->size); // setup a set of null io hooks // This allows the guest to do passthrough IO to these ports // While still reserving them in the IO map @@ -332,7 +336,11 @@ static int pci_bar_write(int bar_num, uint32_t * src, void * private_data) { struct pt_bar * pbar = &(state->phys_bars[bar_num]); struct pt_bar * vbar = &(state->virt_bars[bar_num]); - PrintDebug("Bar update src=0x%x\n", *src); + PrintDebug("Bar update: bar_num=%d, src=0x%x\n", bar_num,*src); + PrintDebug("vbar is size=%u, type=%d, addr=0x%x, val=0x%x\n",vbar->size, vbar->type, vbar->addr, vbar->val); + PrintDebug("pbar is size=%u, type=%d, addr=0x%x, val=0x%x\n",pbar->size, pbar->type, pbar->addr, pbar->val); + + if (vbar->type == PT_BAR_NONE) { return 0; @@ -533,7 +541,7 @@ static int irq_handler(struct guest_info * info, struct v3_interrupt * intr, voi struct vm_device * dev = (struct vm_device *)private_data; struct pt_dev_state * state = (struct pt_dev_state *)dev->private_data; - // PrintDebug("Handling E1000 IRQ %d\n", intr->irq); +// PrintDebug("Handling E1000 IRQ %d\n", intr->irq); v3_pci_raise_irq(state->pci_bus, 0, state->pci_dev);