>>> On 31.03.19 at 10:11, <mar...@c-home.cz> wrote: > There is problem in PCI device allocation algorithm (pci_setup()). > Algorithm allocates PCI BAR sorted by size and this allows > mixed allocation of prefetchable and non-prefetchable PCI MEM BAR. > This leads to wrong config of PCI root port (see "Type 1 Configuration > Space Registers (Root Ports)"). > > Tested with version xen 4.11.1 + "export > OVMF_UPSTREAM_REVISION=ef529e6ab7c31290a33045bb1f1837447cc0eb56" > (embeded commit OVMF does not work (crashed even in Win10.iso and > uncompilable with newer gcc)). > > Attached also testing patch.
I agree the problem wants addressing, but I'm afraid the patch is incomplete: Afaict it won't work if there is a non-prefetchable BAR larger than the smallest prefetchable one, due to the necessary extra padding that would need inserting between the two. Also the patch lack your S-o-b and has a couple of style issues (hard tab used, indentation, lack of blanks inside if(), unnecessary double use of PCI_BASE_ADDRESS_MEM_PREFETCH). As to its description - do you perhaps mean "interleaved" instead of "fragmented" and "not allowed" instead of "not supported"? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel