Skip to contentSkip to conversation

s390/zcrypt: AP bus support for alternate driver(s)

PATCH Cornelia Huck 1 participant 1 message Jul 30, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 19 lines · On Fri, 27 Jul 2018 09:53:44 +0200 Cornelia Huck <[email protected]> wrote:
Quoted 16 lines · On Thu, 26 Jul 2018 21:54:12 +0200 Christian Borntraeger…

For the first shot the two masks located in sysfs at /sys/bus/ap/apmask and /sys/bus/ap/aqmask are read-only and by default all APQNs belong to the ap bus and the default drivers:

cat /sys/bus/ap/apmask 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff cat /sys/bus/ap/aqmask 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

The only way to change these masks is currently via kernel command line, for example like:

... ap.apmask=0xffff ap.aqmask=0x40

would give these two pools:

Quoted 7 lines
Quoted 3 lines

default drivers pool: adapter 0 - 15, domain 1
alternate drivers pool: adapter 0 - 15, all but domain 1

			   adapter 16-255, all domains  

This looks a bit non-intuitive to me. Is there an easy way to determine the masks if all I know is the list of apqns I want to have in the default respectively alternate drivers pool?

What about an interface based on ranges and exclusion (like e.g. cio_ignore) instead?

ap.apmask=0x0-0xf ap.aqmask=0x1 for the example above

and you could do something like ap.apmask=all,!0xf to specify all adapters but adapter 15.

For the output, we can rely on tooling to get something that is easily readable, but requiring users to fiddle with bitmasks is error-prone, even if it is a good representation internally.