From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [PATCH 2/3] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs Date: Tue, 8 Apr 2014 17:39:08 +0200 Message-ID: <5344181C.3060103@citrix.com> References: <1396886524-16921-1-git-send-email-roger.pau@citrix.com> <1396886524-16921-3-git-send-email-roger.pau@citrix.com> <5343D4FC0200007800006788@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WXY95-0002q6-2f for xen-devel@lists.xenproject.org; Tue, 08 Apr 2014 15:41:07 +0000 In-Reply-To: <5343D4FC0200007800006788@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel@lists.xenproject.org, Tim Deegan , Xiantao Zhang , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 08/04/14 10:52, Jan Beulich wrote: >>>> On 07.04.14 at 18:02, wrote: >> --- 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) != 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 = 0; >> + > > I guess at the very least when the option was specified on the > command line you should issue a warning, or perhaps even stay > away from enforcing this. I think we should enforce it even if the user has specified sharept=true, or else we need to gate the XENFEAT_hvm_gntmap_supports_iommu feature. Printing a Warning in this case (user trying to enforce sharept on AMD IOMMU) seems OK to me. Roger.