xref: /linux/Documentation/virt/kvm/arm/hypercalls.rst (revision 429508c84d95811dd1300181dfe84743caff9a38)
1.. SPDX-License-Identifier: GPL-2.0
2
3===============================================
4KVM/arm64-specific hypercalls exposed to guests
5===============================================
6
7This file documents the KVM/arm64-specific hypercalls which may be
8exposed by KVM/arm64 to guest operating systems. These hypercalls are
9issued using the HVC instruction according to version 1.1 of the Arm SMC
10Calling Convention (DEN0028/C):
11
12https://developer.arm.com/docs/den0028/c
13
14All KVM/arm64-specific hypercalls are allocated within the "Vendor
15Specific Hypervisor Service Call" range with a UID of
16``28b46fb6-2ec5-11e9-a9ca-4b564d003a74``. This UID should be queried by the
17guest using the standard "Call UID" function for the service range in
18order to determine that the KVM/arm64-specific hypercalls are available.
19
20``ARM_SMCCC_VENDOR_HYP_KVM_FEATURES_FUNC_ID``
21---------------------------------------------
22
23Provides 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
46See ptp_kvm.rst
47