Permissive devices in Xen
Patch allowing drivers in DomU to restore address bars if needed.
Signed-off-by [email protected]
Signature · 1 line
Lukáš Hejtmánek
drivers/xen/pciback/conf_space_header.c +16 -2
@@ -75,8 +75,15 @@*/ if (value == ~PCI_ROM_ADDRESS_ENABLE ) bar->which =1 ; -else +else { +u32 tmpval; +pci_read_config_dword (dev, offset, &tmpval); +if (tmpval != bar->val && value == bar->val) { +/* We are trying to restore bar value. This should be allowed. */ +pci_write_config_dword (dev, offset, bar->val); + } bar->which =0 ; + }/* Do we need to support enabling/disabling the rom address here? */
@@ -102,8 +109,15 @@*/ if (value == ~0 ) bar->which =1 ; -else +else { +u32 tmpval; +pci_read_config_dword (dev, offset, &tmpval); +if (tmpval != bar->val && value == bar->val) { +/* We are trying to restore bar value. This should be allowed. */ +pci_write_config_dword (dev, offset, bar->val); + } bar->which =0 ; + }return 0 ; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel