diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index c933980..ef787da 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -414,18 +414,18 @@ static struct intel_iommu *domain_get_iommu(struct dmar_domain *domain) /* "Coherency" capability may be different across iommus */ static void domain_update_iommu_coherency(struct dmar_domain *domain) { - int i; - - domain->iommu_coherency = 1; + int i, coherency = 1; i = find_first_bit(&domain->iommu_bmp, g_num_of_iommus); for (; i < g_num_of_iommus; ) { if (!ecap_coherent(g_iommus[i]->ecap)) { - domain->iommu_coherency = 0; + coherency = 0; break; } i = find_next_bit(&domain->iommu_bmp, g_num_of_iommus, i+1); } + printk(KERN_INFO "IOMMU would update domain coherency to %d\n", + coherency); } static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn) @@ -455,6 +455,8 @@ static void domain_flush_cache(struct dmar_domain *domain, { if (!domain->iommu_coherency) clflush_cache_range(addr, size); + else + printk(KERN_INFO "No flush for domain %p\n", domain); } /* Gets context entry for a given bus and devfn */ @@ -1414,11 +1416,13 @@ static int domain_init(struct dmar_domain *domain, int guest_width) domain->agaw = agaw; INIT_LIST_HEAD(&domain->devices); - if (ecap_coherent(iommu->ecap)) + if (ecap_coherent(iommu->ecap)) { + printk(KERN_INFO "IOMMU %p claimed to be coherent; we don't believe it\n", domain); domain->iommu_coherency = 1; - else + } else { + printk(KERN_INFO "IOMMU %p claimed to be incoherent\n", domain); domain->iommu_coherency = 0; - + } domain->iommu_count = 1; /* always allocate the top pgd */