X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci_passthrough.c;h=18e4ef49608085f1b6e129909cfe46fc90129c63;hp=89b4e8487c48a6e158833df3e83aab28d95e5b8f;hb=0121a4503305424096e2b5c5bd3b6c3af2d813e5;hpb=3cab540e9e47ce3562dae4c03b20d84b24d8f1f7 diff --git a/palacios/src/devices/pci_passthrough.c b/palacios/src/devices/pci_passthrough.c index 89b4e84..18e4ef4 100644 --- a/palacios/src/devices/pci_passthrough.c +++ b/palacios/src/devices/pci_passthrough.c @@ -187,9 +187,12 @@ 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 @@ -258,8 +261,6 @@ static int pci_bar_init(int bar_num, uint32_t * dst,void * private_data) { } } - - // Initially the virtual bars match the physical ones @@ -275,8 +276,6 @@ static int pci_bar_init(int bar_num, uint32_t * dst,void * private_data) { state->virt_bars[bar_num].type, state->virt_bars[bar_num].addr, state->virt_bars[bar_num].size); - - // Update the pci subsystem versions *dst = bar_val;