All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: David Kiarie <davidkiarie4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Jan Kiszka <jan.kiszka-S0/GAf8tV78@public.gmane.org>,
	Valentine Sinitsyn
	<valentine.sinitsyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: Bug: Freeing dma regions
Date: Wed, 2 Mar 2016 14:45:28 +0100	[thread overview]
Message-ID: <20160302134528.GA20213@8bytes.org> (raw)
In-Reply-To: <CABdVeAAq_u6kAC9pm96UAdozWN5VSiiNm3HMBJ5wGqpd5zvbrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.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 <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> 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

  parent reply	other threads:[~2016-03-02 13:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  0:45 Bug: Freeing dma regions David Kiarie
     [not found] ` <CABdVeACY5dWoj-q4uMUnc-NgqqShemunLU1bbvLpAN6jPdBC+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02  8:29   ` Joerg Roedel
     [not found]     ` <20160302082940.GS22747-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-03-02  8:37       ` David Kiarie
     [not found]         ` <CABdVeAB4C2aDGSgmCnGOjSzSZZ3Er5gu-ngsSVPc_XbBxsVaTA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02  8:40           ` David Kiarie
     [not found]             ` <CABdVeABM7OzGWeoXo1uui7f0HyP9wVLCPsEe+LnXrWXcmt7dVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02 12:35               ` Joerg Roedel
     [not found]                 ` <20160302123519.GT22747-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-03-02 12:58                   ` David Kiarie
     [not found]                     ` <CABdVeAAq_u6kAC9pm96UAdozWN5VSiiNm3HMBJ5wGqpd5zvbrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02 13:45                       ` Joerg Roedel [this message]
     [not found]                         ` <20160302134528.GA20213-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-03-02 14:06                           ` David Kiarie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160302134528.GA20213@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=davidkiarie4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jan.kiszka-S0/GAf8tV78@public.gmane.org \
    --cc=valentine.sinitsyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.