(&self, irq: u32)
| 1102 | |
| 1103 | #[cfg(target_arch = "aarch64")] |
| 1104 | pub fn init_pmu(&self, irq: u32) -> Result<bool> { |
| 1105 | for cpu in self.vcpus.iter() { |
| 1106 | let cpu = cpu.lock().unwrap(); |
| 1107 | // Check if PMU attr is available, if not, log the information. |
| 1108 | if cpu.vcpu.has_pmu_support() { |
| 1109 | cpu.vcpu.init_pmu(irq).map_err(Error::InitPmu)?; |
| 1110 | } else { |
| 1111 | debug!( |
| 1112 | "PMU attribute is not supported in vCPU{}, skip PMU init!", |
| 1113 | cpu.id |
| 1114 | ); |
| 1115 | return Ok(false); |
| 1116 | } |
| 1117 | } |
| 1118 | |
| 1119 | Ok(true) |
| 1120 | } |
| 1121 | |
| 1122 | pub fn vcpus(&self) -> Vec<Arc<Mutex<Vcpu>>> { |
| 1123 | self.vcpus.clone() |
no test coverage detected