All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	iommu@lists.linux-foundation.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU
Date: Thu, 15 May 2014 12:16:01 +0200	[thread overview]
Message-ID: <1571584.ZDVCh9phHE@avalon> (raw)
In-Reply-To: <20140513220023.GE23770@8bytes.org>

Hi Joerg,

On Wednesday 14 May 2014 00:00:23 Joerg Roedel wrote:
> On Tue, May 13, 2014 at 11:04:10PM +0200, Laurent Pinchart wrote:
> > > Isn't this the same as ipmmu_tlb_invalidate()?
> > 
> > ipmmu_tlb_invalidate() performs a read-update-write operation on the IMCTR
> > register to set the FLUSH bit without modifying the other bits, while this
> > function writes the FLUSH bit and sets all other bits (including the
> > enable bit) to zero. The difference is thus important.
> 
> Ah ok, I've seen that, but wasn't aware that it makes a difference.
> 
> > > Why not? This is something the IOMMU-API basically supports (multiple
> > > devices behind different IOMMUs in the same domain). Can't you just use
> > > the same page-table for different IOMMUs?
> > 
> > I might be able to (I'll need to check first though), but I don't really
> > see what the use cases for sharing a common page table between separate
> > IOMMUs would be. Could you please elaborate a bit ? Given that we're
> > getting close to the v3.16 merge window, would it be acceptable to fix
> > (if needed) that as a follow-up patch, as the driver is already usable
> > as-is ?
> 
> The typical use-case is device-assignment in KVM, when you want to assign
> multiple devices to the same guest it is desireable to only have one domain
> with one page-table.
> At least this is where this requirement comes from in the IOMMU-API, and I
> like the IOMMU drivers to be consistent in their implementation of the API.

Good point, I hadn't thought about that. However, shouldn't that case be 
handled by 2-stage translation instead ? The IPMMU hardware supports that, but 
the driver doesn't implement it yet.

> I think given that otherwise the code looks good overall it is ok if you
> do this as a follow-on patch to this one. I can put it in my tree for
> the time being so that you can make a patch against the feature branch.

Thank you. I won't have time to implement that feature for v3.16 though, given 
how close we are to the merge window.

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	iommu@lists.linux-foundation.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU
Date: Thu, 15 May 2014 10:16:01 +0000	[thread overview]
Message-ID: <1571584.ZDVCh9phHE@avalon> (raw)
In-Reply-To: <20140513220023.GE23770@8bytes.org>

Hi Joerg,

On Wednesday 14 May 2014 00:00:23 Joerg Roedel wrote:
> On Tue, May 13, 2014 at 11:04:10PM +0200, Laurent Pinchart wrote:
> > > Isn't this the same as ipmmu_tlb_invalidate()?
> > 
> > ipmmu_tlb_invalidate() performs a read-update-write operation on the IMCTR
> > register to set the FLUSH bit without modifying the other bits, while this
> > function writes the FLUSH bit and sets all other bits (including the
> > enable bit) to zero. The difference is thus important.
> 
> Ah ok, I've seen that, but wasn't aware that it makes a difference.
> 
> > > Why not? This is something the IOMMU-API basically supports (multiple
> > > devices behind different IOMMUs in the same domain). Can't you just use
> > > the same page-table for different IOMMUs?
> > 
> > I might be able to (I'll need to check first though), but I don't really
> > see what the use cases for sharing a common page table between separate
> > IOMMUs would be. Could you please elaborate a bit ? Given that we're
> > getting close to the v3.16 merge window, would it be acceptable to fix
> > (if needed) that as a follow-up patch, as the driver is already usable
> > as-is ?
> 
> The typical use-case is device-assignment in KVM, when you want to assign
> multiple devices to the same guest it is desireable to only have one domain
> with one page-table.
> At least this is where this requirement comes from in the IOMMU-API, and I
> like the IOMMU drivers to be consistent in their implementation of the API.

Good point, I hadn't thought about that. However, shouldn't that case be 
handled by 2-stage translation instead ? The IPMMU hardware supports that, but 
the driver doesn't implement it yet.

> I think given that otherwise the code looks good overall it is ok if you
> do this as a follow-on patch to this one. I can put it in my tree for
> the time being so that you can make a patch against the feature branch.

Thank you. I won't have time to implement that feature for v3.16 though, given 
how close we are to the merge window.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2014-05-15 10:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 10:47 [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU Laurent Pinchart
2014-04-02 10:47 ` Laurent Pinchart
2014-04-09 10:43 ` Laurent Pinchart
2014-04-09 10:43   ` Laurent Pinchart
2014-04-09 10:57   ` Joerg Roedel
2014-04-09 10:57     ` Joerg Roedel
2014-04-09 10:58     ` Laurent Pinchart
2014-04-09 11:00       ` Laurent Pinchart
     [not found]     ` <20140409105703.GV13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-04-17 10:14       ` Laurent Pinchart
2014-04-17 10:14         ` Laurent Pinchart
2014-05-02 19:46         ` Laurent Pinchart
2014-05-02 19:46           ` Laurent Pinchart
2014-05-13 17:55 ` Joerg Roedel
2014-05-13 17:55   ` Joerg Roedel
2014-05-13 21:04   ` Laurent Pinchart
2014-05-13 21:04     ` Laurent Pinchart
2014-05-13 22:00     ` Joerg Roedel
2014-05-13 22:00       ` Joerg Roedel
2014-05-15 10:16       ` Laurent Pinchart [this message]
2014-05-15 10:16         ` Laurent Pinchart
2014-06-03  4:57 ` Khiem Nguyen
2014-06-03  4:57   ` Khiem Nguyen
     [not found]   ` <538D55C2.3090209-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-06-03 17:39     ` Laurent Pinchart
2014-06-03 17:39       ` Laurent Pinchart
2014-07-09 23:20       ` Khiem Nguyen
2014-07-09 23:20         ` Khiem Nguyen

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=1571584.ZDVCh9phHE@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-sh@vger.kernel.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.