Skip to content

Commit e0f25a9

Browse files
committed
riscv: adjust documents for virtual memory instructions
1 parent 0c00e44 commit e0f25a9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

crates/core_arch/src/riscv/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub unsafe fn sfence_inval_ir() {
146146
asm!(".insn i 0x73, 0, x0, x0, 0x181")
147147
}
148148

149-
/// Loads memory from hypervisor by signed byte integer
149+
/// Loads virtual machine memory by signed byte integer
150150
///
151151
/// This instruction performs an explicit memory access as though `V=1`;
152152
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -163,7 +163,7 @@ pub unsafe fn hlv_b(src: *const i8) -> i8 {
163163
value
164164
}
165165

166-
/// Loads memory from hypervisor by unsigned byte integer
166+
/// Loads virtual machine memory by unsigned byte integer
167167
///
168168
/// This instruction performs an explicit memory access as though `V=1`;
169169
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -180,7 +180,7 @@ pub unsafe fn hlv_bu(src: *const u8) -> u8 {
180180
value
181181
}
182182

183-
/// Loads memory from hypervisor by signed half integer
183+
/// Loads virtual machine memory by signed half integer
184184
///
185185
/// This instruction performs an explicit memory access as though `V=1`;
186186
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -197,7 +197,7 @@ pub unsafe fn hlv_h(src: *const i16) -> i16 {
197197
value
198198
}
199199

200-
/// Loads memory from hypervisor by unsigned half integer
200+
/// Loads virtual machine memory by unsigned half integer
201201
///
202202
/// This instruction performs an explicit memory access as though `V=1`;
203203
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -214,7 +214,7 @@ pub unsafe fn hlv_hu(src: *const u16) -> u16 {
214214
value
215215
}
216216

217-
/// Accesses instruction from hypervisor by unsigned half integer
217+
/// Accesses virtual machine instruction by unsigned half integer
218218
///
219219
/// This instruction performs an explicit memory access as though `V=1`;
220220
/// the memory being read must be executable in both stages of address translation,
@@ -231,7 +231,7 @@ pub unsafe fn hlvx_hu(src: *const u16) -> u16 {
231231
insn
232232
}
233233

234-
/// Loads memory from hypervisor by signed word integer
234+
/// Loads virtual machine memory by signed word integer
235235
///
236236
/// This instruction performs an explicit memory access as though `V=1`;
237237
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -248,7 +248,7 @@ pub unsafe fn hlv_w(src: *const i32) -> i32 {
248248
value
249249
}
250250

251-
/// Accesses instruction from hypervisor by unsigned word integer
251+
/// Accesses virtual machine instruction by unsigned word integer
252252
///
253253
/// This instruction performs an explicit memory access as though `V=1`;
254254
/// the memory being read must be executable in both stages of address translation,
@@ -265,7 +265,7 @@ pub unsafe fn hlvx_wu(src: *const u32) -> u32 {
265265
insn
266266
}
267267

268-
/// Stores memory from hypervisor by byte integer
268+
/// Stores virtual machine memory by byte integer
269269
///
270270
/// This instruction performs an explicit memory access as though `V=1`;
271271
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -280,7 +280,7 @@ pub unsafe fn hsv_b(dst: *mut i8, src: i8) {
280280
asm!(".insn r 0x73, 0x4, 0x31, x0, {}, {}", in(reg) dst, in(reg) src);
281281
}
282282

283-
/// Stores memory from hypervisor by half integer
283+
/// Stores virtual machine memory by half integer
284284
///
285285
/// This instruction performs an explicit memory access as though `V=1`;
286286
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -295,7 +295,7 @@ pub unsafe fn hsv_h(dst: *mut i16, src: i16) {
295295
asm!(".insn r 0x73, 0x4, 0x33, x0, {}, {}", in(reg) dst, in(reg) src);
296296
}
297297

298-
/// Stores memory from hypervisor by word integer
298+
/// Stores virtual machine memory by word integer
299299
///
300300
/// This instruction performs an explicit memory access as though `V=1`;
301301
/// i.e., with the address translation and protection, and the endianness, that apply to memory

crates/core_arch/src/riscv64/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! RISC-V RV64 specific intrinsics
22
use crate::arch::asm;
33

4-
/// Loads memory from hypervisor by unsigned word integer
4+
/// Loads virtual machine memory by unsigned word integer
55
///
66
/// This instruction performs an explicit memory access as though `V=1`;
77
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -20,7 +20,7 @@ pub unsafe fn hlv_wu(src: *const u32) -> u32 {
2020
value
2121
}
2222

23-
/// Loads memory from hypervisor by unsigned double integer
23+
/// Loads virtual machine memory by unsigned double integer
2424
///
2525
/// This instruction performs an explicit memory access as though `V=1`;
2626
/// i.e., with the address translation and protection, and the endianness, that apply to memory
@@ -39,7 +39,7 @@ pub unsafe fn hlv_d(src: *const i64) -> i64 {
3939
value
4040
}
4141

42-
/// Stores memory from hypervisor by double integer
42+
/// Stores virtual machine memory by double integer
4343
///
4444
/// This instruction performs an explicit memory access as though `V=1`;
4545
/// i.e., with the address translation and protection, and the endianness, that apply to memory

0 commit comments

Comments
 (0)