Skip to content

Commit 39f4b5a

Browse files
committed
update comment in the vmm mod
1 parent a2d6245 commit 39f4b5a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/vmm.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ pub type InterruptVector = u8;
1010
/// The API trait for virtual machine management functionalities.
1111
#[crate::api_def]
1212
pub trait VmmIf {
13-
/// Get the ID of the current virtual machine.
13+
/// Get the ID of the virtual machine executing on the current physical CPU.
14+
/// It MAY differ from the ID of the virtual machine calling this function.
1415
fn current_vm_id() -> VMId;
15-
/// Get the ID of the current virtual CPU.
16+
/// Get the ID of the virtual CPU executing on the current physical CPU.
17+
/// It MAY differ from the ID of the virtual CPU calling this function.
1618
fn current_vcpu_id() -> VCpuId;
1719
/// Get the number of virtual CPUs in a virtual machine.
1820
fn vcpu_num(vm_id: VMId) -> Option<usize>;
@@ -26,12 +28,14 @@ pub trait VmmIf {
2628
fn notify_vcpu_timer_expired(vm_id: VMId, vcpu_id: VCpuId);
2729
}
2830

29-
/// Get the number of virtual CPUs in the current virtual machine.
31+
/// Get the number of virtual CPUs in the virtual machine executing on the
32+
/// current physical CPU.
3033
pub fn current_vm_vcpu_num() -> usize {
3134
vcpu_num(current_vm_id()).unwrap()
3235
}
3336

34-
/// Get the mask of active virtual CPUs in the current virtual machine.
37+
/// Get the mask of active virtual CPUs in the virtual machine executing on the
38+
/// current physical CPU.
3539
pub fn current_vm_active_vcpus() -> usize {
3640
active_vcpus(current_vm_id()).unwrap()
3741
}

0 commit comments

Comments
 (0)