From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ed White Subject: Re: [PATCH v2 04/12] x86/altp2m: basic data structures and support routines. Date: Wed, 24 Jun 2015 10:20:28 -0700 Message-ID: <558AE6DC.9060905@intel.com> References: <1434999372-3688-1-git-send-email-edmund.h.white@intel.com> <1434999372-3688-5-git-send-email-edmund.h.white@intel.com> <558A813F.4050402@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <558A813F.4050402@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: Andrew Cooper , xen-devel@lists.xen.org Cc: Ravi Sahita , Wei Liu , Ian Jackson , Tim Deegan , Jan Beulich , tlengyel@novetta.com, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org On 06/24/2015 03:06 AM, Andrew Cooper wrote: >> diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c >> index d0d3f1e..202aa42 100644 >> --- a/xen/arch/x86/mm/hap/hap.c >> +++ b/xen/arch/x86/mm/hap/hap.c >> @@ -459,7 +459,7 @@ void hap_domain_init(struct domain *d) >> int hap_enable(struct domain *d, u32 mode) >> { >> unsigned int old_pages; >> - uint8_t i; >> + uint16_t i; >> int rv = 0; >> >> domain_pause(d); >> @@ -498,6 +498,24 @@ int hap_enable(struct domain *d, u32 mode) >> goto out; >> } >> >> + /* Init alternate p2m data */ >> + if ( (d->arch.altp2m_eptp = alloc_xenheap_page()) == NULL ) > > Please use alloc_domheap_page() and map_domain_page_global() so the > allocation is accounted against the domain. You raised this back in January too, and I did try it. Unfortunately, allocating that way caused repeated Xen panics, and when I reported that to you and Tim on the list 2 or 3 months ago Tim said that he thought the existing code was acceptable in this instance, since this is only 1 page per-domain. Ed