@@ -66,3 +66,53 @@ Query the memory protection parameters for a pKVM protected virtual machine.
66
66
| Return Values: | (int64) | R0 | ``INVALID_PARAMETER (-3) `` on error, else |
67
67
| | | | memory protection granule in bytes |
68
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
+ +---------------------+----------+----+---------------------------------------------+
0 commit comments