From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH DOCDAY] xen: write a high level description of the sub-arch choices for heap layout Date: Wed, 30 Sep 2015 12:37:13 +0100 Message-ID: <560BC969.3010406@citrix.com> References: <1443608566-8382-1-git-send-email-ian.campbell@citrix.com> <560BC30E.4050507@citrix.com> <1443612710.16718.189.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1443612710.16718.189.camel@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: Ian Campbell , xen-devel@lists.xen.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 30/09/15 12:31, Ian Campbell wrote: > On Wed, 2015-09-30 at 12:10 +0100, Andrew Cooper wrote: > >>> + * >>> + * Xen heap pages are always anonymous (that is, not tied >>> + * or accounted to any particular domain). >>> + * >>> + * - Dom heap: Memory which must be explicitly mapped, usually >>> + * transiently with map_domain_page, in order to be >>> + * used. va() and pa() are not valid for such memory. >> While stashing pointers into domheap memory is definitely buggy. > Is this true even considering the result of e.g. map_domain_page_global? > Ah yes - constructing a pointer into something mapped as global is safe. Basically I was wondering about some wording to state that things like: p = map_domain_page(); d->foo->bar = p->baz; unmap_domain_page(p); is unsafe and shouldn't be done. There is surprisingly little difference between a xenheap page and a map_domain_page_global()'d page, as they are both present in the permanent mappings. ~Andrew