OSDN Git Service

powerpc/pseries: Expose PLPKS config values, support additional fields
authorNayna Jain <nayna@linux.ibm.com>
Fri, 10 Feb 2023 08:03:51 +0000 (19:03 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 12 Feb 2023 11:12:38 +0000 (22:12 +1100)
commit119da30d037dced29118fb90afe683ff50313386
tree2ae8512259b3e539900adf1041ec53351d942e9f
parent3def7a3e7c2ce2ab5e5c54561da7125206851be4
powerpc/pseries: Expose PLPKS config values, support additional fields

The plpks driver uses the H_PKS_GET_CONFIG hcall to retrieve configuration
and status information about the PKS from the hypervisor.

Update _plpks_get_config() to handle some additional fields. Add getter
functions to allow the PKS configuration information to be accessed from
other files. Validate that the values we're getting comply with the spec.

While we're here, move the config struct in _plpks_get_config() off the
stack - it's getting large and we also need to make sure it doesn't cross
a page boundary.

Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
[ajd: split patch, extend to support additional v3 API fields, minor fixes]
Co-developed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-17-ajd@linux.ibm.com
arch/powerpc/include/asm/plpks.h
arch/powerpc/platforms/pseries/plpks.c