mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-24 12:22:22 +00:00
hypervisor: kvm: add missing capability requirements
The list is gathered from going through various code paths in the code base. No functional change intended. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
c07671edb4
commit
241d1d5cdb
@ -114,7 +114,15 @@ pub fn check_required_kvm_extensions(kvm: &Kvm) -> KvmResult<()> {
|
||||
};
|
||||
}
|
||||
|
||||
// SetGuestDebug is required but some kernels have it implemented without the capability flag.
|
||||
check_extension!(Cap::ImmediateExit);
|
||||
check_extension!(Cap::Ioeventfd);
|
||||
check_extension!(Cap::Irqchip);
|
||||
check_extension!(Cap::Irqfd);
|
||||
check_extension!(Cap::IrqRouting);
|
||||
check_extension!(Cap::MpState);
|
||||
check_extension!(Cap::OneReg);
|
||||
check_extension!(Cap::UserMemory);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -40,14 +40,29 @@ pub fn check_required_kvm_extensions(kvm: &Kvm) -> KvmResult<()> {
|
||||
};
|
||||
}
|
||||
|
||||
// DeviceCtrl, EnableCap, and SetGuestDebug are also required, but some kernels have
|
||||
// the features implemented without the capability flags.
|
||||
check_extension!(Cap::AdjustClock);
|
||||
check_extension!(Cap::ExtCpuid);
|
||||
check_extension!(Cap::GetTscKhz);
|
||||
check_extension!(Cap::ImmediateExit);
|
||||
check_extension!(Cap::Ioeventfd);
|
||||
check_extension!(Cap::Irqchip);
|
||||
check_extension!(Cap::Irqfd);
|
||||
check_extension!(Cap::IrqRouting);
|
||||
check_extension!(Cap::MpState);
|
||||
check_extension!(Cap::SetIdentityMapAddr);
|
||||
check_extension!(Cap::SetTssAddr);
|
||||
check_extension!(Cap::SplitIrqchip);
|
||||
check_extension!(Cap::TscDeadlineTimer);
|
||||
check_extension!(Cap::UserMemory);
|
||||
check_extension!(Cap::UserNmi);
|
||||
check_extension!(Cap::VcpuEvents);
|
||||
check_extension!(Cap::Xcrs);
|
||||
check_extension!(Cap::Xsave);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct VcpuKvmState {
|
||||
pub cpuid: Vec<CpuIdEntry>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user