@@ -44,3 +44,101 @@ Provides a discovery mechanism for other KVM/arm64 hypercalls.
4444----------------------------------------
4545
4646See ptp_kvm.rst
47+
48+ ``ARM_SMCCC_KVM_FUNC_HYP_MEMINFO ``
49+ ----------------------------------
50+
51+ Query the memory protection parameters for a pKVM protected virtual machine.
52+
53+ +---------------------+-------------------------------------------------------------+
54+ | Presence: | Optional; pKVM protected guests only. |
55+ +---------------------+-------------------------------------------------------------+
56+ | Calling convention: | HVC64 |
57+ +---------------------+----------+--------------------------------------------------+
58+ | Function ID: | (uint32) | 0xC6000002 |
59+ +---------------------+----------+----+---------------------------------------------+
60+ | Arguments: | (uint64) | R1 | Reserved / Must be zero |
61+ | +----------+----+---------------------------------------------+
62+ | | (uint64) | R2 | Reserved / Must be zero |
63+ | +----------+----+---------------------------------------------+
64+ | | (uint64) | R3 | Reserved / Must be zero |
65+ +---------------------+----------+----+---------------------------------------------+
66+ | Return Values: | (int64) | R0 | ``INVALID_PARAMETER (-3) `` on error, else |
67+ | | | | memory protection granule in bytes |
68+ +---------------------+----------+----+---------------------------------------------+
69+
70+ ``ARM_SMCCC_KVM_FUNC_MEM_SHARE ``
71+ --------------------------------
72+
73+ Share a region of memory with the KVM host, granting it read, write and execute
74+ permissions. The size of the region is equal to the memory protection granule
75+ advertised by ``ARM_SMCCC_KVM_FUNC_HYP_MEMINFO ``.
76+
77+ +---------------------+-------------------------------------------------------------+
78+ | Presence: | Optional; pKVM protected guests only. |
79+ +---------------------+-------------------------------------------------------------+
80+ | Calling convention: | HVC64 |
81+ +---------------------+----------+--------------------------------------------------+
82+ | Function ID: | (uint32) | 0xC6000003 |
83+ +---------------------+----------+----+---------------------------------------------+
84+ | Arguments: | (uint64) | R1 | Base IPA of memory region to share |
85+ | +----------+----+---------------------------------------------+
86+ | | (uint64) | R2 | Reserved / Must be zero |
87+ | +----------+----+---------------------------------------------+
88+ | | (uint64) | R3 | Reserved / Must be zero |
89+ +---------------------+----------+----+---------------------------------------------+
90+ | Return Values: | (int64) | R0 | ``SUCCESS (0) `` |
91+ | | | +---------------------------------------------+
92+ | | | | ``INVALID_PARAMETER (-3) `` |
93+ +---------------------+----------+----+---------------------------------------------+
94+
95+ ``ARM_SMCCC_KVM_FUNC_MEM_UNSHARE ``
96+ ----------------------------------
97+
98+ Revoke access permission from the KVM host to a memory region previously shared
99+ with ``ARM_SMCCC_KVM_FUNC_MEM_SHARE ``. The size of the region is equal to the
100+ memory protection granule advertised by ``ARM_SMCCC_KVM_FUNC_HYP_MEMINFO ``.
101+
102+ +---------------------+-------------------------------------------------------------+
103+ | Presence: | Optional; pKVM protected guests only. |
104+ +---------------------+-------------------------------------------------------------+
105+ | Calling convention: | HVC64 |
106+ +---------------------+----------+--------------------------------------------------+
107+ | Function ID: | (uint32) | 0xC6000004 |
108+ +---------------------+----------+----+---------------------------------------------+
109+ | Arguments: | (uint64) | R1 | Base IPA of memory region to unshare |
110+ | +----------+----+---------------------------------------------+
111+ | | (uint64) | R2 | Reserved / Must be zero |
112+ | +----------+----+---------------------------------------------+
113+ | | (uint64) | R3 | Reserved / Must be zero |
114+ +---------------------+----------+----+---------------------------------------------+
115+ | Return Values: | (int64) | R0 | ``SUCCESS (0) `` |
116+ | | | +---------------------------------------------+
117+ | | | | ``INVALID_PARAMETER (-3) `` |
118+ +---------------------+----------+----+---------------------------------------------+
119+
120+ ``ARM_SMCCC_KVM_FUNC_MMIO_GUARD ``
121+ ----------------------------------
122+
123+ Request that a given memory region is handled as MMIO by the hypervisor,
124+ allowing accesses to this region to be emulated by the KVM host. The size of the
125+ region is equal to the memory protection granule advertised by
126+ ``ARM_SMCCC_KVM_FUNC_HYP_MEMINFO ``.
127+
128+ +---------------------+-------------------------------------------------------------+
129+ | Presence: | Optional; pKVM protected guests only. |
130+ +---------------------+-------------------------------------------------------------+
131+ | Calling convention: | HVC64 |
132+ +---------------------+----------+--------------------------------------------------+
133+ | Function ID: | (uint32) | 0xC6000007 |
134+ +---------------------+----------+----+---------------------------------------------+
135+ | Arguments: | (uint64) | R1 | Base IPA of MMIO memory region |
136+ | +----------+----+---------------------------------------------+
137+ | | (uint64) | R2 | Reserved / Must be zero |
138+ | +----------+----+---------------------------------------------+
139+ | | (uint64) | R3 | Reserved / Must be zero |
140+ +---------------------+----------+----+---------------------------------------------+
141+ | Return Values: | (int64) | R0 | ``SUCCESS (0) `` |
142+ | | | +---------------------------------------------+
143+ | | | | ``INVALID_PARAMETER (-3) `` |
144+ +---------------------+----------+----+---------------------------------------------+
0 commit comments