Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240423150538.2103045-28-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>

authored by

Will Deacon and committed by
Marc Zyngier
4dc8c9de af725804

+47
+46
Documentation/virt/kvm/arm/hypercalls.rst
··· 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
+1
Documentation/virt/kvm/arm/index.rst
··· 9 9 10 10 fw-pseudo-registers 11 11 hyp-abi 12 + hypercalls 12 13 pvtime 13 14 ptp_kvm 14 15 vcpu-features