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
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue