From 1cfca40ab5dc111d2af0c39adc99bb71920b1f69 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Mon, 11 Aug 2025 19:51:43 +0800 Subject: [PATCH 1/2] update dependencies for axaddrspace and axvisor_api to version 0.1 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d86aed..9a888f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,5 @@ axerrno = "0.1.0" memory_addr = "0.4" percpu = "0.2.0" -axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace.git" } -axvisor_api = { git = "https://github.com/arceos-hypervisor/axvisor_api.git" } +axaddrspace = "0.1" +axvisor_api = "0.1" From f63e11985a6f1a142a34adf9a410b21645698fe0 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Thu, 14 Aug 2025 17:23:00 +0800 Subject: [PATCH 2/2] add `vm_id` getter --- src/vcpu.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vcpu.rs b/src/vcpu.rs index bfbea24..a0cc9c5 100644 --- a/src/vcpu.rs +++ b/src/vcpu.rs @@ -108,6 +108,11 @@ impl AxVCpu { self.inner_const.vcpu_id } + /// Get the id of the VM this vcpu belongs to. + pub const fn vm_id(&self) -> VMId { + self.inner_const.vm_id + } + /// Get the id of the physical CPU who has the priority to run this vcpu. /// Currently unused. pub const fn favor_phys_cpu(&self) -> usize {