[Skiboot] [PATCH] core/init: Add ibm, processor-storage-keys property to CPU DT node.

Thiago Jung Bauermann bauerman at linux.vnet.ibm.com
Tue Sep 5 04:51:24 AEST 2017

Michael Ellerman <mpe at ellerman.id.au> writes:

> Thiago Jung Bauermann <bauerman at linux.vnet.ibm.com> writes:
>> LoPAPR says:
>>     “ibm,processor-storage-keys”
>>     property name indicating the number of virtual storage keys supported
>>     by the processor described by this node.
>>     prop-encoded-array: Consists of two cells encoded as with encode-int.
>>     The first cell represents the number of virtual storage keys supported
>>     for data accesses while the second cell represents the number of
>>     virtual storage keys supported for instruction accesses. The cell value
>>     of zero indicates that no storage keys are supported for the access
>>     type.
>> pHyp provides the property above but there's a bug in P8 firmware where the
>> second cell is zero even though POWER8 supports instruction access keys.
>> This bug will be fixed for P9.
>> While this is a PAPR property, it's useful to have it in powernv as well
>> so that Linux has a uniform way of checking for the feature regardless of
>> the platform it's running on.
> True.
> Though having it in every CPU node is kind of annoying. There's no way
> we're ever going to support a different number of keys on different CPUs
> in the system.
> We could put it under the /ibm,opal node, that would require checking
> there in the Linux code, but it should be ~= 2 extra lines so not a big
> deal.
> I dunno, maybe we should follow PAPR exactly, but it just seems silly to
> copy the property for every CPU in the system.

I don't mind putting it in /ibm,opal if that's what people prefer. I can
also put it in /cpus. This way PowerVM could also adopt it if they find
the pointless repetition annoying too.

> Does skiboot want to reserve some keys for itself ?

I don't know enough about skiboot to know how it could be useful, was
hoping someone else would be able to answer it. But it doesn't have to
be decided now since skiboot can just decrement the number of keys
advertised in the property and both the host and guest OSes will know
not to use the reserved keys.

Thiago Jung Bauermann
IBM Linux Technology Center

More information about the Skiboot mailing list