mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: provide a generic CpuState structure
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
use crate::arch::aarch64::gic::{Error, Result};
|
||||
use crate::kvm::kvm_bindings::{kvm_device_attr, KVM_DEV_ARM_VGIC_GRP_REDIST_REGS};
|
||||
use crate::kvm::VcpuKvmState;
|
||||
use crate::{CpuState, Device};
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -190,6 +191,7 @@ pub fn construct_gicr_typers(vcpu_states: &[CpuState]) -> Vec<u64> {
|
||||
*/
|
||||
let mut gicr_typers: Vec<u64> = Vec::new();
|
||||
for (index, state) in vcpu_states.iter().enumerate() {
|
||||
let state: VcpuKvmState = state.clone().into();
|
||||
let last = {
|
||||
if index == vcpu_states.len() - 1 {
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user