From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhao Subject: Re: [PATCH v5 6/6] VT-d: support the device IOTLB Date: Mon, 29 Jun 2009 11:07:21 +0800 Message-ID: <4A482FE9.5090503@intel.com> References: <1242625897-1678-1-git-send-email-yu.zhao@intel.com> <1242625897-1678-7-git-send-email-yu.zhao@intel.com> <1246199317.663.578.camel@macbook.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "linux-pci@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "jbarnes@virtuousgeek.org" To: David Woodhouse Return-path: In-Reply-To: <1246199317.663.578.camel@macbook.infradead.org> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org David Woodhouse wrote: > On Mon, 2009-05-18 at 13:51 +0800, Yu Zhao wrote: >> @@ -965,6 +1037,8 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, u16 did, >> else >> iommu->flush.flush_iotlb(iommu, did, addr, mask, >> DMA_TLB_PSI_FLUSH); >> + if (did) >> + iommu_flush_dev_iotlb(iommu->domains[did], addr, mask); >> } >> >> static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu) > > Hm, why 'if (did)' ? > > Domain ID zero is only special in caching mode. Should it be: > if (!cap_caching_mode(iommu->cap) || did) > ? Yes, you are right. Domain ID 0 is only reserved for caching mode. Will send a fix for this. Thanks!