On Mon, 4 May 2020 16:09:41 -0400 (EDT) Mouse <[email protected]> wrote:
> > while trying to boot a Xen PVH kernel as dom0, I found that Xen > > doesn't allow changing memory-mapped PCI BARs if memory decode is > > enabled in the command register. > > Is this permitted behaviour for a PCI device according to the PCI > specs? I'm just thinking that, if not, it's a bug in Xen and, while > NetBSD might want to work around it, the code to do so should make it a > lot clearer to code readers that it _is_ a bug workaround. (If it _is_ > permitted, it's pretty clearly a bug in NetBSD and needs fixing, of > course - and in that case there probably is a bunch more code that > needs fixing too; I've seen enough things that don't mess with decoding > enables before checking for decode width....) I think disabling access to whatever the BAR maps while fudging with it is a pretty good idea on its own. Who knows what else lives in that area. have fun Michael
