From: Wei Liu Subject: Re: [PATCH v2] PVH Dom0 RMRR IOMMU mapping regression fix Date: Tue, 29 Sep 2015 13:33:49 +0100 Message-ID: <20150929123349.GB13821@zion.uk.xensource.com> References: <1443214757-19935-1-git-send-email-elena.ufimtseva@oracle.com> <560A998702000078000A69D1@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <560A998702000078000A69D1@prv-mh.provo.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: elena.ufimtseva@oracle.com, kevin.tian@intel.com, wei.liu2@citrix.com, george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, yang.z.zhang@intel.com, tiejun.chen@intel.com List-Id: xen-devel@lists.xenproject.org On Tue, Sep 29, 2015 at 06:00:38AM -0600, Jan Beulich wrote: > >>> On 25.09.15 at 22:59, wrote: > > From: Elena Ufimtseva > > > > This patch addresses a regression introduced by commit > > 5ae03990c120a7b3067a52d9784c9aa72c0705a6 in new set_identity_p2m_entry. > > RMRRs are not being mapped in IOMMU for PVH Dom0. This causes pages faults > > and > > some long 'hang-like' delays during Dom0 PVH boot and device assignments. > > > > During construct_dom0, in PVH path p2m is being constructed and identity > > mapped > > in IOMMU. The p2m type is p2m_mmio_direct and p2m access p2m_rwx. > > New code used to map RMRRs invoked from rmrr_identity_mapping > > checks if p2m entry exists with same type and access and if yes, skips iommu > > mapping. Since there are p2m entries for pvh dom0 iomem, RMRRs are not being > > mapped in IOMMU. > > > > As was mentioned in the earlier discussion, the PVH Dom0 construction code > > should be modified to properly map RMRR regions in IOMMU. Since change will > > be > > too invasive, this solution is a temporary fix at this time before better > > solution is in. Also as Jan mentioned, there is no need in having 'x' > > permissions > > for p2m entry of a mmio region, thus changed here. > > > > You comments and suggestions are welcome! > > Thank you. > > > > Signed-off-by: Elena Ufimtseva > > Wei, > > how about this one for 4.6 then? On one hand I recall you validly > stating that PVH is still unsupported, but otoh the change is well > isolated against affecting anything but PVH, i.e. it is very low risk. > I'm fine with this going in. Release-acked-by: Wei Liu > Jan