mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-21 21:25:19 +00:00
vmm: Force enable IOMMU incase of SEV-SNP guest
In case of SEV-SNP guest devices use sw-iotlb to gain access guest memory for DMA. For that F_IOMMU/F_ACCESS_PLATFORM must be exposed in the feature set of virtio devices. Signed-off-by: Jinank Jain <jinankjain@microsoft.com> Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
c9f94be7ab
commit
9f8aeacd3d
@ -511,7 +511,9 @@ impl Vm {
|
||||
let sev_snp_enabled = config.lock().unwrap().is_sev_snp_enabled();
|
||||
#[cfg(feature = "tdx")]
|
||||
let force_iommu = tdx_enabled;
|
||||
#[cfg(not(feature = "tdx"))]
|
||||
#[cfg(feature = "sev_snp")]
|
||||
let force_iommu = sev_snp_enabled;
|
||||
#[cfg(not(any(feature = "tdx", feature = "sev_snp")))]
|
||||
let force_iommu = false;
|
||||
|
||||
#[cfg(feature = "guest_debug")]
|
||||
|
Loading…
Reference in New Issue
Block a user