Skip to content

Commit e7a6327

Browse files
committed
feat: 添加 set_dtb_addr 方法以设置 vcpu 的 dtb 地址
1 parent 14daa15 commit e7a6327

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vcpu.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ impl Aarch64VCpu {
8989
Ok(())
9090
}
9191

92+
pub fn set_dtb_addr(&mut self, dtb_addr: GuestPhysAddr) -> AxResult {
93+
debug!("set vcpu dtb addr:{dtb_addr:?}");
94+
self.ctx.set_argument(dtb_addr.as_usize());
95+
Ok(())
96+
}
97+
9298
pub fn set_entry(&mut self, entry: GuestPhysAddr) -> AxResult {
9399
debug!("set vcpu entry:{entry:?}");
94100
self.set_elr(entry.as_usize());

0 commit comments

Comments
 (0)