From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: Bug: Freeing dma regions Date: Wed, 2 Mar 2016 14:45:28 +0100 Message-ID: <20160302134528.GA20213@8bytes.org> References: <20160302082940.GS22747@8bytes.org> <20160302123519.GT22747@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: David Kiarie Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Jan Kiszka , Valentine Sinitsyn List-Id: iommu@lists.linux-foundation.org On Wed, Mar 02, 2016 at 03:58:18PM +0300, David Kiarie wrote: > On Wed, Mar 2, 2016 at 3:35 PM, Joerg Roedel wrote: > > On Wed, Mar 02, 2016 at 11:40:04AM +0300, David Kiarie wrote: > >> What effect is setting the value next_bit to last invalidated index > >> supposed to have ? > > > > The idea is to safe the IOTLB flush by not re-using the address-range > > until the allocator wraps around to 0 again. We only allocate address > > ranges between next_bit and end-of-range. This way we don't need a flush > > after every unmap operation. > > Okay, I'll look at this issue again. > > Last unrelated question. If I have 'iommu=pt' IOMMU doesn't seem to > allocate any addresses and doesn't populate the 'root page table' > until I try to pass-through a device. Why is that set like this ? The pt stands for passthrough. In this mode the IOMMU is enabled, but configured in way as if it is disabled. This means that all devices get access to the physical address space and no remapping through the DMA-API is done at all. Often this is used for performance reasons. This only changes when a device is is assigned to a guest. In that case it will only see the guest-physical address space via a page-table. Joerg