diff --git a/Cargo.toml b/Cargo.toml index d5989f5..4b5f545 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,13 +28,13 @@ page_table_entry = "0.5" memory_addr = "0.4" crate_interface = "0.1" -axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace.git" } -axvcpu = { git = "https://github.com/arceos-hypervisor/axvcpu.git" } -x86_vlapic = { git = "https://github.com/arceos-hypervisor/x86_vlapic.git" } -axdevice_base = { git = "https://github.com/arceos-hypervisor/axdevice_crates.git" } -axvisor_api = { git = "https://github.com/arceos-hypervisor/axvisor_api.git" } +axaddrspace = "0.1" +axvcpu = "0.1" +x86_vlapic = "0.1" +axdevice_base = "0.1" +axvisor_api = "0.1" -spin = { version = "0.9", default-features = false } +spin = { version = "0.10", default-features = false } [features] default = ["vmx"] diff --git a/src/vmx/vcpu.rs b/src/vmx/vcpu.rs index 35cebe4..26d86bf 100644 --- a/src/vmx/vcpu.rs +++ b/src/vmx/vcpu.rs @@ -878,6 +878,7 @@ macro_rules! vmx_entry_with { ($instr:literal) => { unsafe { naked_asm!( + ".code64", save_regs_to_stack!(), // save host status "mov [rdi + {host_stack_size}], rsp", // save current RSP to Vcpu::host_stack_top "mov rsp, rdi", // set RSP to guest regs area @@ -922,6 +923,7 @@ impl VmxVcpu { unsafe extern "C" fn vmx_exit(&mut self) -> usize { unsafe { naked_asm!( + ".code64", save_regs_to_stack!(), // save guest status, after this, rsp points to the `VmxVcpu` "mov rsp, [rsp + {host_stack_top}]", // set RSP to Vcpu::host_stack_top restore_regs_from_stack!(), // restore host status