Skip to content

Commit 21be9f7

Browse files
committed
arm64: smccc: Reserve block of KVM "vendor" services for pKVM hypercalls
pKVM relies on hypercalls to expose services such as memory sharing to protected guests. Tentatively allocate a block of 58 hypercalls (i.e. fill the remaining space in the first 64 function IDs) for pKVM usage, as future extensions such as pvIOMMU support, range-based memory sharing and validation of assigned devices will require additional services. Suggested-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 0f12694 commit 21be9f7

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

include/linux/arm-smccc.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,70 @@
115115
/* KVM "vendor specific" services */
116116
#define ARM_SMCCC_KVM_FUNC_FEATURES 0
117117
#define ARM_SMCCC_KVM_FUNC_PTP 1
118+
/* Start of pKVM hypercall range */
118119
#define ARM_SMCCC_KVM_FUNC_HYP_MEMINFO 2
119120
#define ARM_SMCCC_KVM_FUNC_MEM_SHARE 3
120121
#define ARM_SMCCC_KVM_FUNC_MEM_UNSHARE 4
122+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_5 5
123+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_6 6
121124
#define ARM_SMCCC_KVM_FUNC_MMIO_GUARD 7
125+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_8 8
126+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_9 9
127+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_10 10
128+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_11 11
129+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_12 12
130+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_13 13
131+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_14 14
132+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_15 15
133+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_16 16
134+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_17 17
135+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_18 18
136+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_19 19
137+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_20 20
138+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_21 21
139+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_22 22
140+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_23 23
141+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_24 24
142+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_25 25
143+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_26 26
144+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_27 27
145+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_28 28
146+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_29 29
147+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_30 30
148+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_31 31
149+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_32 32
150+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_33 33
151+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_34 34
152+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_35 35
153+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_36 36
154+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_37 37
155+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_38 38
156+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_39 39
157+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_40 40
158+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_41 41
159+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_42 42
160+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_43 43
161+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_44 44
162+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_45 45
163+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_46 46
164+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_47 47
165+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_48 48
166+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_49 49
167+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_50 50
168+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_51 51
169+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_52 52
170+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_53 53
171+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_54 54
172+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_55 55
173+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_56 56
174+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_57 57
175+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_58 58
176+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_59 59
177+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_60 60
178+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_61 61
179+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_62 62
180+
#define ARM_SMCCC_KVM_FUNC_PKVM_RESV_63 63
181+
/* End of pKVM hypercall range */
122182
#define ARM_SMCCC_KVM_FUNC_FEATURES_2 127
123183
#define ARM_SMCCC_KVM_NUM_FUNCS 128
124184

0 commit comments

Comments
 (0)