From 7e34be2d09b42550711bf5ecc7a828a260c75b57 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Wed, 19 Jun 2019 09:35:41 +0800 Subject: [PATCH] Always disable the iommu_snoop when enabling the IOMMU for GPU The IOMMU for GPU doesn't support the snoop_control. So the iommu_snoop is disabled. This can fix the issue of consolefb in SOS. --- hypervisor/arch/x86/vtd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c index ffbff1d42..d89b7f996 100644 --- a/hypervisor/arch/x86/vtd.c +++ b/hypervisor/arch/x86/vtd.c @@ -179,7 +179,7 @@ bool iommu_snoop_supported(const struct iommu_domain *iommu) bool ret; if ((iommu == NULL) || (iommu->iommu_snoop)) { - ret = true; + ret = false; } else { ret = false; } @@ -1244,7 +1244,7 @@ struct iommu_domain *create_iommu_domain(uint16_t vm_id, uint64_t translation_ta domain->trans_table_ptr = translation_table; domain->addr_width = addr_width; domain->is_tt_ept = true; - domain->iommu_snoop = true; + domain->iommu_snoop = false; dev_dbg(ACRN_DBG_IOMMU, "create domain [%d]: vm_id = %hu, ept@0x%x", vmid_to_domainid(domain->vm_id), domain->vm_id, domain->trans_table_ptr);