File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,4 @@ axvisor_api_proc = { path = "axvisor_api_proc", version = "0.2.0"}
2727crate_interface = " 0.2"
2828memory_addr = " 0.4"
2929axaddrspace = " 0.2.0"
30+ cpumask = " 0.1.0"
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ pub type VCpuId = usize;
77/// Interrupt vector.
88pub type InterruptVector = u8 ;
99
10+ /// The maximum number of virtual CPUs supported in a virtual machine.
11+ pub const MAX_VCPU_NUM : usize = 64 ;
12+
13+ pub type VCpuSet = cpumask:: CpuMask < MAX_VCPU_NUM > ;
14+
1015/// The API trait for virtual machine management functionalities.
1116#[ crate :: api_def]
1217pub trait VmmIf {
@@ -22,6 +27,8 @@ pub trait VmmIf {
2227 fn active_vcpus ( vm_id : VMId ) -> Option < usize > ;
2328 /// Inject an interrupt to a virtual CPU.
2429 fn inject_interrupt ( vm_id : VMId , vcpu_id : VCpuId , vector : InterruptVector ) ;
30+ /// Inject an interrupt to a set of virtual CPUs.
31+ fn inject_interrupt_to_cpus ( vm_id : VMId , vcpu_set : VCpuSet , vector : InterruptVector ) ;
2532 /// Notify that a virtual CPU timer has expired.
2633 ///
2734 /// TODO: determine whether we can skip this function.
You can’t perform that action at this time.
0 commit comments