From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/3] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs Date: Mon, 7 Apr 2014 12:51:04 -0400 Message-ID: <20140407165104.GB3239@phenom.dumpdata.com> References: <1396886524-16921-1-git-send-email-roger.pau@citrix.com> <1396886524-16921-3-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WXCli-0001i7-EA for xen-devel@lists.xenproject.org; Mon, 07 Apr 2014 16:51:34 +0000 Content-Disposition: inline In-Reply-To: <1396886524-16921-3-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: xen-devel@lists.xenproject.org, Suravee Suthikulpanit , Xiantao Zhang , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Mon, Apr 07, 2014 at 06:02:03PM +0200, Roger Pau Monne wrote: > According to the comment in p2m.h, AMD IOMMUs don't work correctly > with page types different than p2m_ram_rw when the p2m is shared > between HAP and IOMMU, so disable this sharing when using AMD IOMMUs s/between/amongst/ And you are missing an '.' at the off the sentence. > = > Signed-off-by: Roger Pau Monn=E9 > Cc: Suravee Suthikulpanit > Cc: Xiantao Zhang > Cc: Jan Beulich > --- > I have not tested this patch on AMD hardware, so I would like some > confirmation that this actually works. > --- > xen/drivers/passthrough/amd/iommu_init.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > = > diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passt= hrough/amd/iommu_init.c > index 4686813..7f75b3e 100644 > --- a/xen/drivers/passthrough/amd/iommu_init.c > +++ b/xen/drivers/passthrough/amd/iommu_init.c > @@ -1255,6 +1255,13 @@ int __init amd_iommu_init(void) > if ( iterate_ivrs_mappings(amd_iommu_setup_device_table) !=3D 0 ) > goto error_out; > = > + /* > + * Disable sharing HAP page tables with AMD IOMMU, > + * since it only supports p2m_ram_rw, and this would > + * prevent doing IO to/from mapped grant frames. > + */ > + iommu_hap_pt_share =3D 0; > + > /* per iommu initialization */ > for_each_amd_iommu ( iommu ) > if ( amd_iommu_init_one(iommu) !=3D 0 ) > -- = > 1.7.7.5 (Apple Git-26) > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel