hypervisor: mshv: Don't unregister ioevent in case of SEV-SNP guest
Since we don't register ioevents in case of SEV-SNP guests. Thus, we should not unregister it as well. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
927df4e643
commit
9b722bbcf6
1 changed files with 5 additions and 0 deletions
|
|
@ -1622,6 +1622,11 @@ impl vm::Vm for MshvVm {
|
|||
|
||||
/// Unregister an event from a certain address it has been previously registered to.
|
||||
fn unregister_ioevent(&self, fd: &EventFd, addr: &IoEventAddress) -> vm::Result<()> {
|
||||
#[cfg(feature = "sev_snp")]
|
||||
if self.sev_snp_enabled {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let addr = &mshv_ioctls::IoEventAddress::from(*addr);
|
||||
debug!("unregister_ioevent fd {} addr {:x?}", fd.as_raw_fd(), addr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue