WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2/6] iommu: Introduce iommu_flush and iommu_flush

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/6] iommu: Introduce iommu_flush and iommu_flush_all.
From: Wei Wang2 <wei.wang2@xxxxxxx>
Date: Tue, 8 Nov 2011 11:39:15 +0100
Cc: "allen.m.kay@xxxxxxxxx" <allen.m.kay@xxxxxxxxx>, "Tim \(Xen.org\)" <tim@xxxxxxx>, Jean Guyader <jean.guyader@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Jean Guyader <Jean.Guyader@xxxxxxxxxx>
Delivery-date: Tue, 08 Nov 2011 02:37:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111108102515.GA7818@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1320678999-24995-1-git-send-email-jean.guyader@xxxxxxxxxxxxx> <4EB8F549020000780005F87C@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20111108102515.GA7818@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
On Tuesday 08 November 2011 11:25:15 Jean Guyader wrote:
> On 08/11 08:24, Jan Beulich wrote:
> > >>> On 07.11.11 at 18:06, Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
> > >>> wrote:
> > >
> > > On 07/11 04:42, Jan Beulich wrote:
> > >> >>> On 07.11.11 at 16:16, Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
> > >> >>> wrote:
> > >> >
> > >> > Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
> > >> > ---
> > >> >  xen/drivers/passthrough/iommu.c     |   20 ++++++++++++++++++++
> > >> >  xen/drivers/passthrough/vtd/iommu.c |   12 ++++++++++++
> > >> >  xen/include/xen/iommu.h             |    5 +++++
> > >> >  3 files changed, 37 insertions(+), 0 deletions(-)
> > >>
> > >> In iommu_iotlb_flush() you check whether the to-be-called function
> > >> pointer is NULL, whereas in iommu_iotlb_flush_all() you don't. I
> > >> actually think the second behavior is the correct one, but that
> > >> implies that you need to also implement respective AMD IOMMU
> > >> functions.
> > >
> > > Yes, It's an error on my part. I've updated the patch to check
> > > for the present of iotlb_flush_all before I call it now.
> >
> > But as said, I don't think this is the right solution: How can it be
> > correct on non-Intel hardware to have these functions simply do
> > nothing?
>
> These functions are only here to counter balance the dont_flush_iotlb_flag.
> If they don't acknowlage this flag doing nothing is the right thing to do.
>
> That said I can probably implement a naive version for the AMD iommu
> that will use amd_iommu_flush_pages once or in a loop.

There are some pending patches that enable ats / iotlb flush for amd iommu. 
Then, you might want to use functions: amd_iommu_flush_iotlb and 
amd_iommu_flush_all_iotlbs for this.
Thanks,
Wei

> Obviously I will remove the check for the non existing callback if I do
> that as it become mandatory.
>
> Jean
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel