mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
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
@ -1622,6 +1622,11 @@ impl vm::Vm for MshvVm {
|
|||||||
|
|
||||||
/// Unregister an event from a certain address it has been previously registered to.
|
/// Unregister an event from a certain address it has been previously registered to.
|
||||||
fn unregister_ioevent(&self, fd: &EventFd, addr: &IoEventAddress) -> vm::Result<()> {
|
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);
|
let addr = &mshv_ioctls::IoEventAddress::from(*addr);
|
||||||
debug!("unregister_ioevent fd {} addr {:x?}", fd.as_raw_fd(), addr);
|
debug!("unregister_ioevent fd {} addr {:x?}", fd.as_raw_fd(), addr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user