From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86: adjustments to memory_add() Date: Fri, 28 Aug 2015 15:31:33 +0100 Message-ID: <55E070C5.9050308@citrix.com> References: <55E08421020000780009DD5D@prv-mh.provo.novell.com> <55E06C14.3060208@citrix.com> <55E08C6C020000780009DDDF@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZVKwA-0008JA-De for xen-devel@lists.xenproject.org; Fri, 28 Aug 2015 14:47:26 +0000 In-Reply-To: <55E08C6C020000780009DDDF@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: xen-devel , Keir Fraser , Wei Liu List-Id: xen-devel@lists.xenproject.org On 28/08/15 15:29, Jan Beulich wrote: >>>> On 28.08.15 at 16:11, wrote: >> On 28/08/15 14:54, Jan Beulich wrote: >>> The function should clean up after a failed map_pages_to_xen(). >>> >>> Sharing the M2P table with Dom0 needs to happen before adding >>> the new pages to the heap. >> Why? Does this not create a race where dom0 can observe the new mfns >> before they are ready to use? > No, observing the MFNs is fine as long as no domain can use them. > The race is the other way around: Not having the M2P in place > when the pages could already be handed out from the allocator is > a problem. Ah yes - of course. Would you mind extending the patch description to include this. Reviewed-by: Andrew Cooper