Thread (6 messages) flat view 6 messages, 4 authors, 2019-06-19

Re: [PATCH kernel] powerpc/pci/of: Parse unassigned resources

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2019-06-18 12:34:08

On Tue, 2019-06-18 at 22:15 +1000, Michael Ellerman wrote:
Alexey Kardashevskiy [off-list ref] writes:
quoted
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.
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help