On Tue, 2019-06-18 at 22:15 +1000, Michael Ellerman wrote: > Alexey Kardashevskiy <aik@xxxxxxxxx> writes: > > The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing > > which is basically reading "assigned-addresses" of every PCI device. > > However if the property is missing or zero sized, then there is > > no fallback of any kind and the PCI resources remain undiscovered, i.e. > > pdev->resource[] array is empty. > > > > This adds a fallback which parses the "reg" property in pretty much same > > way except it marks resources as "unset" which later makes Linux assign > > those resources with proper addresses. > > What happens under PowerVM is the big question. > > ie. if we see such a device under PowerVM and then do our own assignment > what happens? May or may not work ... EEH will be probably b0rked, but then it shouldn't happen. Basically PowerVM itself doesn't do anything special with PCI. It maps a whole PHB (or virtual PHB) into the guest and doesn't care much beyond that for MMIOs. What you see in Linux getting in the way is RTAS. It's the one assigning BAR values etc... within that region setup by the HV, but RTAS is running in the guest, from the HV perspective it's all the same really. So if such a device did exist, RTAS would lose track but it would still work from a HW/HV perspective. RTAS-driven services such as EEH would probably fail though. But in practice this shouldn't happen bcs RTAS will set assigned- addresses on everything. Cheers, Ben.