@@ -146,165 +146,145 @@ pub unsafe fn sfence_inval_ir() {
146
146
asm ! ( ".insn i 0x73, 0, x0, x0, 0x181" )
147
147
}
148
148
149
- /// Loads memory from hypervisor by signed byte integer
149
+ /// Loads virtual machine memory by signed byte integer
150
150
///
151
151
/// This instruction performs an explicit memory access as though `V=1`;
152
152
/// i.e., with the address translation and protection, and the endianness, that apply to memory
153
153
/// accesses in either VS-mode or VU-mode.
154
154
///
155
- /// # Unsafety
156
- ///
157
- /// This function accesses the virtual supervisor or user via a `HLV.B` instruction which is effectively
158
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
155
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLV.B`
156
+ /// instruction which is effectively an unreference to any memory address.
159
157
#[ inline]
160
158
pub unsafe fn hlv_b ( src : * const i8 ) -> i8 {
161
159
let value: i8 ;
162
160
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x600" , out( reg) value, in( reg) src) ;
163
161
value
164
162
}
165
163
166
- /// Loads memory from hypervisor by unsigned byte integer
164
+ /// Loads virtual machine memory by unsigned byte integer
167
165
///
168
166
/// This instruction performs an explicit memory access as though `V=1`;
169
167
/// i.e., with the address translation and protection, and the endianness, that apply to memory
170
168
/// accesses in either VS-mode or VU-mode.
171
169
///
172
- /// # Unsafety
173
- ///
174
- /// This function accesses the virtual supervisor or user via a `HLV.BU` instruction which is effectively
175
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
170
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLV.BU`
171
+ /// instruction which is effectively an unreference to any memory address.
176
172
#[ inline]
177
173
pub unsafe fn hlv_bu ( src : * const u8 ) -> u8 {
178
174
let value: u8 ;
179
175
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x601" , out( reg) value, in( reg) src) ;
180
176
value
181
177
}
182
178
183
- /// Loads memory from hypervisor by signed half integer
179
+ /// Loads virtual machine memory by signed half integer
184
180
///
185
181
/// This instruction performs an explicit memory access as though `V=1`;
186
182
/// i.e., with the address translation and protection, and the endianness, that apply to memory
187
183
/// accesses in either VS-mode or VU-mode.
188
184
///
189
- /// # Unsafety
190
- ///
191
- /// This function accesses the virtual supervisor or user via a `HLV.H` instruction which is effectively
192
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
185
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLV.H`
186
+ /// instruction which is effectively an unreference to any memory address.
193
187
#[ inline]
194
188
pub unsafe fn hlv_h ( src : * const i16 ) -> i16 {
195
189
let value: i16 ;
196
190
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x640" , out( reg) value, in( reg) src) ;
197
191
value
198
192
}
199
193
200
- /// Loads memory from hypervisor by unsigned half integer
194
+ /// Loads virtual machine memory by unsigned half integer
201
195
///
202
196
/// This instruction performs an explicit memory access as though `V=1`;
203
197
/// i.e., with the address translation and protection, and the endianness, that apply to memory
204
198
/// accesses in either VS-mode or VU-mode.
205
199
///
206
- /// # Unsafety
207
- ///
208
- /// This function accesses the virtual supervisor or user via a `HLV.HU` instruction which is effectively
209
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
200
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLV.HU`
201
+ /// instruction which is effectively an unreference to any memory address.
210
202
#[ inline]
211
203
pub unsafe fn hlv_hu ( src : * const u16 ) -> u16 {
212
204
let value: u16 ;
213
205
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x641" , out( reg) value, in( reg) src) ;
214
206
value
215
207
}
216
208
217
- /// Accesses instruction from hypervisor by unsigned half integer
209
+ /// Accesses virtual machine instruction by unsigned half integer
218
210
///
219
211
/// This instruction performs an explicit memory access as though `V=1`;
220
212
/// the memory being read must be executable in both stages of address translation,
221
213
/// but read permission is not required.
222
214
///
223
- /// # Unsafety
224
- ///
225
- /// This function accesses the virtual supervisor or user via a `HLVX.HU` instruction which is effectively
226
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
215
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLVX.HU`
216
+ /// instruction which is effectively an unreference to any memory address.
227
217
#[ inline]
228
218
pub unsafe fn hlvx_hu ( src : * const u16 ) -> u16 {
229
219
let insn: u16 ;
230
220
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x643" , out( reg) insn, in( reg) src) ;
231
221
insn
232
222
}
233
223
234
- /// Loads memory from hypervisor by signed word integer
224
+ /// Loads virtual machine memory by signed word integer
235
225
///
236
226
/// This instruction performs an explicit memory access as though `V=1`;
237
227
/// i.e., with the address translation and protection, and the endianness, that apply to memory
238
228
/// accesses in either VS-mode or VU-mode.
239
229
///
240
- /// # Unsafety
241
- ///
242
- /// This function accesses the virtual supervisor or user via a `HLV.W` instruction which is effectively
243
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
230
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLV.W`
231
+ /// instruction which is effectively an unreference to any memory address.
244
232
#[ inline]
245
233
pub unsafe fn hlv_w ( src : * const i32 ) -> i32 {
246
234
let value: i32 ;
247
235
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x680" , out( reg) value, in( reg) src) ;
248
236
value
249
237
}
250
238
251
- /// Accesses instruction from hypervisor by unsigned word integer
239
+ /// Accesses virtual machine instruction by unsigned word integer
252
240
///
253
241
/// This instruction performs an explicit memory access as though `V=1`;
254
242
/// the memory being read must be executable in both stages of address translation,
255
243
/// but read permission is not required.
256
244
///
257
- /// # Unsafety
258
- ///
259
- /// This function accesses the virtual supervisor or user via a `HLVX.WU` instruction which is effectively
260
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
245
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HLVX.WU`
246
+ /// instruction which is effectively an unreference to any memory address.
261
247
#[ inline]
262
248
pub unsafe fn hlvx_wu ( src : * const u32 ) -> u32 {
263
249
let insn: u32 ;
264
250
asm ! ( ".insn i 0x73, 0x4, {}, {}, 0x683" , out( reg) insn, in( reg) src) ;
265
251
insn
266
252
}
267
253
268
- /// Stores memory from hypervisor by byte integer
254
+ /// Stores virtual machine memory by byte integer
269
255
///
270
256
/// This instruction performs an explicit memory access as though `V=1`;
271
257
/// i.e., with the address translation and protection, and the endianness, that apply to memory
272
258
/// accesses in either VS-mode or VU-mode.
273
259
///
274
- /// # Unsafety
275
- ///
276
- /// This function accesses the virtual supervisor or user via a `HSV.B` instruction which is effectively
277
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
260
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HSV.B`
261
+ /// instruction which is effectively an unreference to any memory address.
278
262
#[ inline]
279
263
pub unsafe fn hsv_b ( dst : * mut i8 , src : i8 ) {
280
264
asm ! ( ".insn r 0x73, 0x4, 0x31, x0, {}, {}" , in( reg) dst, in( reg) src) ;
281
265
}
282
266
283
- /// Stores memory from hypervisor by half integer
267
+ /// Stores virtual machine memory by half integer
284
268
///
285
269
/// This instruction performs an explicit memory access as though `V=1`;
286
270
/// i.e., with the address translation and protection, and the endianness, that apply to memory
287
271
/// accesses in either VS-mode or VU-mode.
288
272
///
289
- /// # Unsafety
290
- ///
291
- /// This function accesses the virtual supervisor or user via a `HSV.H` instruction which is effectively
292
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
273
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HSV.H`
274
+ /// instruction which is effectively an unreference to any memory address.
293
275
#[ inline]
294
276
pub unsafe fn hsv_h ( dst : * mut i16 , src : i16 ) {
295
277
asm ! ( ".insn r 0x73, 0x4, 0x33, x0, {}, {}" , in( reg) dst, in( reg) src) ;
296
278
}
297
279
298
- /// Stores memory from hypervisor by word integer
280
+ /// Stores virtual machine memory by word integer
299
281
///
300
282
/// This instruction performs an explicit memory access as though `V=1`;
301
283
/// i.e., with the address translation and protection, and the endianness, that apply to memory
302
284
/// accesses in either VS-mode or VU-mode.
303
285
///
304
- /// # Unsafety
305
- ///
306
- /// This function accesses the virtual supervisor or user via a `HSV.W` instruction which is effectively
307
- /// an unreference to any memory address, thus is wrapped into an unsafe function.
286
+ /// This function is unsafe for it accesses the virtual supervisor or user via a `HSV.W`
287
+ /// instruction which is effectively an unreference to any memory address.
308
288
#[ inline]
309
289
pub unsafe fn hsv_w ( dst : * mut i32 , src : i32 ) {
310
290
asm ! ( ".insn r 0x73, 0x4, 0x35, x0, {}, {}" , in( reg) dst, in( reg) src) ;
0 commit comments