tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PCI: disable I/O or mem before probing BAR size
On Mon, 4 May 2020 16:09:41 -0400 (EDT)
Mouse <mouse%Rodents-Montreal.ORG@localhost> 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
Home |
Main Index |
Thread Index |
Old Index