main: unify error message for hypervisor availability

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2022-07-20 22:09:38 +00:00 committed by Liu Wei
parent 4a00371fe8
commit d56263706d

View File

@ -32,14 +32,7 @@ enum Error {
#[cfg(feature = "gdb")]
#[error("Failed to create Debug EventFd: {0}")]
CreateDebugEventFd(#[source] std::io::Error),
#[cfg_attr(
feature = "kvm",
error("Failed to open hypervisor interface (is /dev/kvm available?): {0}")
)]
#[cfg_attr(
feature = "mshv",
error("Failed to open hypervisor interface (is /dev/mshv available?): {0}")
)]
#[error("Failed to open hypervisor interface (is hypervisor interface available?): {0}")]
CreateHypervisor(#[source] hypervisor::HypervisorError),
#[error("Failed to start the VMM thread: {0}")]
StartVmmThread(#[source] vmm::Error),