From: Keir Fraser Subject: Re: [PATCH] Paging and memory sharing for HVM guests Date: Mon, 04 Jan 2010 15:32:28 +0000 Message-ID: References: <4B4205B90200007800028173@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B4205B90200007800028173@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Grzegorz Milos , Patrick Colp , Andrew Peace Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 04/01/2010 14:14, "Jan Beulich" wrote: > Isn't this undermining the purpose of privcmd_enforce_singleshot_mapping()? > You don't check that the eventual single page re-mapping attempt is > really due to an earlier -ENOENT failure, and hence the whole single > shot mapping checks are now pointless (though other than possibly to > enforce some minimal security I don't really know what its purpose > is/was - Keir?). It was just to avoid the BUG_ON(!pte_none(*pte)) in direct_remap_area_pte_fn(). We trust privcmd users enough we could just get rid of privcmd_enforce_singleshot_mapping(). We could instead forcibly clear ptes before calling direct_remap_area(); or just do nothing. -- Keir