mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: hypervisor: simplify VM creation API
For MSHV customers don't want to make everything default during partition creation. For example nested support, some synthetic features could be controlled from CLI through platform argument. Create_vm API getting messy after adding more flags. This patch introduces common data struct to be passed from vmm crate to hypervisor crate during partition creation. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
@@ -188,6 +188,16 @@ impl ClockData {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub struct HypervisorVmConfig {
|
||||
#[cfg(feature = "tdx")]
|
||||
pub tdx_enabled: bool,
|
||||
#[cfg(feature = "sev_snp")]
|
||||
pub sev_snp_enabled: bool,
|
||||
#[cfg(feature = "sev_snp")]
|
||||
pub mem_size: u64,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum IrqRoutingEntry {
|
||||
#[cfg(feature = "kvm")]
|
||||
|
||||
Reference in New Issue
Block a user