Skip to content

Commit 4dc8c9d

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Document the KVM/arm64-specific calls in hypercalls.rst
KVM/arm64 makes use of the SMCCC "Vendor Specific Hypervisor Service Call Range" to expose KVM-specific hypercalls to guests in a discoverable and extensible fashion. Document the existence of this interface and the discovery hypercall. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Fuad Tabba <[email protected]> Acked-by: Oliver Upton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent af72580 commit 4dc8c9d

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
===============================================
4+
KVM/arm64-specific hypercalls exposed to guests
5+
===============================================
6+
7+
This file documents the KVM/arm64-specific hypercalls which may be
8+
exposed by KVM/arm64 to guest operating systems. These hypercalls are
9+
issued using the HVC instruction according to version 1.1 of the Arm SMC
10+
Calling Convention (DEN0028/C):
11+
12+
https://developer.arm.com/docs/den0028/c
13+
14+
All KVM/arm64-specific hypercalls are allocated within the "Vendor
15+
Specific Hypervisor Service Call" range with a UID of
16+
``28b46fb6-2ec5-11e9-a9ca-4b564d003a74``. This UID should be queried by the
17+
guest using the standard "Call UID" function for the service range in
18+
order to determine that the KVM/arm64-specific hypercalls are available.
19+
20+
``ARM_SMCCC_VENDOR_HYP_KVM_FEATURES_FUNC_ID``
21+
---------------------------------------------
22+
23+
Provides a discovery mechanism for other KVM/arm64 hypercalls.
24+
25+
+---------------------+-------------------------------------------------------------+
26+
| Presence: | Mandatory for the KVM/arm64 UID |
27+
+---------------------+-------------------------------------------------------------+
28+
| Calling convention: | HVC32 |
29+
+---------------------+----------+--------------------------------------------------+
30+
| Function ID: | (uint32) | 0x86000000 |
31+
+---------------------+----------+--------------------------------------------------+
32+
| Arguments: | None |
33+
+---------------------+----------+----+---------------------------------------------+
34+
| Return Values: | (uint32) | R0 | Bitmap of available function numbers 0-31 |
35+
| +----------+----+---------------------------------------------+
36+
| | (uint32) | R1 | Bitmap of available function numbers 32-63 |
37+
| +----------+----+---------------------------------------------+
38+
| | (uint32) | R2 | Bitmap of available function numbers 64-95 |
39+
| +----------+----+---------------------------------------------+
40+
| | (uint32) | R3 | Bitmap of available function numbers 96-127 |
41+
+---------------------+----------+----+---------------------------------------------+
42+
43+
``ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID``
44+
----------------------------------------
45+
46+
See ptp_kvm.rst

Documentation/virt/kvm/arm/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARM
99

1010
fw-pseudo-registers
1111
hyp-abi
12+
hypercalls
1213
pvtime
1314
ptp_kvm
1415
vcpu-features

0 commit comments

Comments
 (0)