On Tue, Nov 05, 2019 at 10:38:05PM +0000, Derrick, Jonathan wrote: > On Wed, 2019-11-06 at 07:22 +0900, Keith Busch wrote: > > On Tue, Nov 05, 2019 at 09:32:07PM +0000, Derrick, Jonathan wrote: > > > Without this patch, a /dev/mem, resource0, or third-party driver could > > > overwrite these values if they don't also restore them on close/unbind. > > > I imagine a kexec user would also overwrite these values. > > > > Don't you have the same problem with the in-kernel driver? It > > looks like pci core will clear the PCI_IO_BASE config registers in > > pci_setup_bridge_io() because VMD doesn't provide an IORESOURCE_IO > > resource. If you reload the driver, it'll read the wrong values on the > > second probing. > > Is there a corner case I am missing with patch 3/3 that restores on > unload? Nothing wrong with that. I just hadn't read that far :/