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:
Wei Liu
2024-05-07 01:04:11 +00:00
committed by Rob Bradford
parent c07671edb4
commit 241d1d5cdb
2 changed files with 23 additions and 0 deletions

View File

@@ -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(())
}