From: Ian Campbell Subject: Re: [V7 PATCH 5/7] pvh: change xsm_add_to_physmap Date: Mon, 10 Feb 2014 15:37:33 +0000 Message-ID: <1392046653.26657.21.camel@kazak.uk.xensource.com> References: <1387247911-28846-1-git-send-email-mukesh.rathor@oracle.com> <1387247911-28846-6-git-send-email-mukesh.rathor@oracle.com> <20140127175550.4cc67171@mantra.us.oracle.com> <52E7951802000078001177F6@nat28.tlf.novell.com> <20140128180802.152b3f8d@mantra.us.oracle.com> <1390992026.31814.63.camel@kazak.uk.xensource.com> <20140129113846.GA54797@deinos.phlegethon.org> <1390995662.31814.76.camel@kazak.uk.xensource.com> <20140129114837.GB54797@deinos.phlegethon.org> <1390996295.31814.84.camel@kazak.uk.xensource.com> <20140129173315.592e593e@mantra.us.oracle.com> <52F7B213.3000302@linaro.org> <1392039724.5117.94.camel@kazak.uk.xensource.com> <52F8ED31.609@linaro.org> <1392046038.26657.19.camel@kazak.uk.xensource.com> <52F8F13E.1070308@linaro.org> 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 1WCsvx-0002MD-Ny for xen-devel@lists.xenproject.org; Mon, 10 Feb 2014 15:38:09 +0000 In-Reply-To: <52F8F13E.1070308@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel , Tim Deegan , Jan Beulich , "stefano.stabellini@eu.citrix.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2014-02-10 at 15:33 +0000, Julien Grall wrote: > On 02/10/2014 03:27 PM, Ian Campbell wrote: > > Wouldn't it be incorrect to generically return OK for mapping a > > DOMID_XEN owned page -- at least something needs to validate that the > > particular mfn being mapped is supposed to be shared with the guest in > > question. > > It's already the case. By default a xen heap page doesn't belong to > DOMID_XEN. Xen has to explicitly call share_xen_page_with_privileged > guess (see an example in xen/common/trace.c:244) to set DOMID_XEN to the > given page. Ah, I didn't know this. > > TBH, it doesn't seem that this mechanism for sharing xenpages with > > guests is a good fit for PVH or HVM guests/dom0. Perhaps a specific > > mapspace would be more appropriate? > > Following my explanation just above, I don't think we need to have a > specific mapspace. XSM and DOMID_XEN will already protect correctly the > mapping of xen heap page. Right.