mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 11:35:46 +00:00
hypervisor: Do not register ioevent for SEV-SNP
... enabled VMs. IOEvents are not supported in case of SEV-SNP VMs. All the IO events are delievered via GHCB protocol. Signed-off-by: Jinank Jain <jinankjain@microsoft.com> Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
3a683b54d5
commit
d0be450b1b
@ -251,7 +251,6 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
}
|
||||
|
||||
// Set additional partition property for SEV-SNP partition.
|
||||
let mut _sev_snp_enabled = mshv_vm_type == VmType::Snp;
|
||||
if mshv_vm_type == VmType::Snp {
|
||||
let snp_policy = snp::get_default_snp_guest_policy();
|
||||
let vmgexit_offloads = snp::get_default_vmgexit_offload_features();
|
||||
@ -308,7 +307,7 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
msrs,
|
||||
dirty_log_slots: Arc::new(RwLock::new(HashMap::new())),
|
||||
#[cfg(feature = "sev_snp")]
|
||||
sev_snp_enabled: _sev_snp_enabled,
|
||||
sev_snp_enabled: mshv_vm_type == VmType::Snp,
|
||||
}))
|
||||
}
|
||||
|
||||
@ -1591,6 +1590,11 @@ impl vm::Vm for MshvVm {
|
||||
addr: &IoEventAddress,
|
||||
datamatch: Option<DataMatch>,
|
||||
) -> vm::Result<()> {
|
||||
#[cfg(feature = "sev_snp")]
|
||||
if self.sev_snp_enabled {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let addr = &mshv_ioctls::IoEventAddress::from(*addr);
|
||||
debug!(
|
||||
"register_ioevent fd {} addr {:x?} datamatch {:?}",
|
||||
|
Loading…
Reference in New Issue
Block a user