From: Peter Dinda Date: Fri, 22 Mar 2013 20:59:57 +0000 (-0500) Subject: PCI bugfix for passthrough bars X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9b6a9f7d7360156ddb60223a2abd0989ce31adf;p=palacios.git PCI bugfix for passthrough bars --- diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index 7bac081..c911639 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -1389,6 +1389,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;