X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci.c;h=f9c7d1aee87041d5d1f3f84f4175c72f277b9abc;hb=4454a172129d12e97793c9c353339b85d3335af4;hp=7bac081f886644c9851f9d8e0d0bc673ffd4d33a;hpb=dbcb64e95d45c5524af8b95c66b7206400db2cf7;p=palacios.git diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index 7bac081..f9c7d1a 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -856,6 +856,7 @@ static int bar_update(struct pci_device * pci_dev, uint32_t offset, // only do this if pci device is enabled.... if (!(pci_dev->config_header.status & 0x1)) { PrintError(VM_NONE, VCORE_NONE, "PCI Device IO space not enabled\n"); + break; } for (i = 0; i < bar->num_ports; i++) { @@ -1389,6 +1390,9 @@ static inline int init_bars(struct v3_vm_info * vm, struct pci_device * pci_dev) // Call the bar init function to get the local cached value bar->bar_init(i, &(bar->val), bar->private_data); + // Copy back changes it made + *(uint32_t *)(pci_dev->config_space + bar_offset) = bar->val; + } else { PrintError(vm, VCORE_NONE, "Invalid BAR type for bar #%d\n", i); return -1;