diff --git a/ostd/src/mm/io.rs b/ostd/src/mm/io.rs index a4bdc385b..eb7d4652d 100644 --- a/ostd/src/mm/io.rs +++ b/ostd/src/mm/io.rs @@ -574,7 +574,7 @@ impl<'a> VmWriter<'a, KernelSpace> { // hence the `add` operation and `write` operation are valid and will only manipulate // the memory managed by this writer. unsafe { - (self.cursor as *mut T).add(i).write(value); + (self.cursor as *mut T).add(i).write_volatile(value); } }