Skip to content

Commit 2454a7a

Browse files
naynajainmpe
authored andcommitted
powerpc/pseries: define driver for Platform KeyStore
PowerVM provides an isolated Platform Keystore(PKS) storage allocation for each LPAR with individually managed access controls to store sensitive information securely. It provides a new set of hypervisor calls for Linux kernel to access PKS storage. Define POWER LPAR Platform KeyStore(PLPKS) driver using H_CALL interface to access PKS storage. Signed-off-by: Nayna Jain <nayna@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220723113048.521744-2-nayna@linux.ibm.com
1 parent d80f6de commit 2454a7a

File tree

5 files changed

+556
-0
lines changed

5 files changed

+556
-0
lines changed

arch/powerpc/include/asm/hvcall.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
#define H_NOT_ENOUGH_RESOURCES -44
8080
#define H_R_STATE -45
8181
#define H_RESCINDED -46
82+
#define H_P1 -54
8283
#define H_P2 -55
8384
#define H_P3 -56
8485
#define H_P4 -57
@@ -98,6 +99,8 @@
9899
#define H_OP_MODE -73
99100
#define H_COP_HW -74
100101
#define H_STATE -75
102+
#define H_IN_USE -77
103+
#define H_ABORTED -78
101104
#define H_UNSUPPORTED_FLAG_START -256
102105
#define H_UNSUPPORTED_FLAG_END -511
103106
#define H_MULTI_THREADS_ACTIVE -9005
@@ -322,6 +325,14 @@
322325
#define H_SCM_UNBIND_ALL 0x3FC
323326
#define H_SCM_HEALTH 0x400
324327
#define H_SCM_PERFORMANCE_STATS 0x418
328+
#define H_PKS_GET_CONFIG 0x41C
329+
#define H_PKS_SET_PASSWORD 0x420
330+
#define H_PKS_GEN_PASSWORD 0x424
331+
#define H_PKS_WRITE_OBJECT 0x42C
332+
#define H_PKS_GEN_KEY 0x430
333+
#define H_PKS_READ_OBJECT 0x434
334+
#define H_PKS_REMOVE_OBJECT 0x438
335+
#define H_PKS_CONFIRM_OBJECT_FLUSHED 0x43C
325336
#define H_RPT_INVALIDATE 0x448
326337
#define H_SCM_FLUSH 0x44C
327338
#define H_GET_ENERGY_SCALE_INFO 0x450

arch/powerpc/platforms/pseries/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ config IBMEBUS
142142
help
143143
Bus device driver for GX bus based adapters.
144144

145+
config PSERIES_PLPKS
146+
depends on PPC_PSERIES
147+
bool "Support for the Platform Key Storage"
148+
help
149+
PowerVM provides an isolated Platform Keystore(PKS) storage
150+
allocation for each LPAR with individually managed access
151+
controls to store sensitive information securely. It can be
152+
used to store asymmetric public keys or secrets as required
153+
by different usecases. Select this config to enable
154+
operating system interface to hypervisor to access this space.
155+
156+
If unsure, select N.
157+
145158
config PAPR_SCM
146159
depends on PPC_PSERIES && MEMORY_HOTPLUG && LIBNVDIMM
147160
tristate "Support for the PAPR Storage Class Memory interface"

arch/powerpc/platforms/pseries/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ obj-$(CONFIG_PAPR_SCM) += papr_scm.o
2828
obj-$(CONFIG_PPC_SPLPAR) += vphn.o
2929
obj-$(CONFIG_PPC_SVM) += svm.o
3030
obj-$(CONFIG_FA_DUMP) += rtas-fadump.o
31+
obj-$(CONFIG_PSERIES_PLPKS) += plpks.o
3132

3233
obj-$(CONFIG_SUSPEND) += suspend.o
3334
obj-$(CONFIG_PPC_VAS) += vas.o vas-sysfs.o

0 commit comments

Comments
 (0)