On 11.06.2025 22:22, Stewart Hildebrand wrote: > On 6/5/25 06:41, Jan Beulich wrote: >> On 31.05.2025 14:54, Stewart Hildebrand wrote: >>> Currently, Xen vPCI refuses BAR writes if the BAR is mapped in p2m. If >>> firmware initializes a 32-bit BAR to a bad address, Linux may try to >>> write a new address to the BAR without disabling memory decoding. Since >>> Xen refuses such writes, the BAR (and thus PCI device) will be >>> non-functional. >> >> Doing this for 32-bit BARs only, with not even an outline what to do about >> the same issue with 64-bit ones, seems like it won't buy us very much. > > It buys us quite a lot: it means the difference between booting vs. > booting with degraded functionality or not booting at all with PVH dom0 > on some platforms with certain PCI devices plugged in. > > The plan for 64-bit BARs for now is to continue to refuse the write(s) > when the 64-bit BAR is mapped to avoid mapping half-updated BARs in p2m. > > I'll add something to this effect to the commit message.
Yes please, in particular ... > Also see https://gitlab.com/xen-project/xen/-/issues/197 ... to make clear that Linux indeed aims at disabling memory decode when fiddling with 64-bit BARs. That reduces the set of remaining cases quite a bit. Jan