From: Tim Deegan Subject: Re: xenpaging crashes xen in is_iomem_page() Date: Mon, 26 Jul 2010 15:58:07 +0100 Message-ID: <20100726145807.GU13291@whitby.uk.xensource.com> References: <20100726115837.GA5643@aepfle.de> <20100726140856.GA8399@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Patrick Colp Cc: Olaf Hering , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, At 15:39 +0100 on 26 Jul (1280158794), Patrick Colp wrote: > On 26 July 2010 10:08, Olaf Hering wrote: > > Is there a portable way to check for the EPT flag in xenpaging? > > Yeah, this can be added. Probably not a bad idea, really. I actually > have some code to test if a machine has EPT enabled or not (by > borrowing some of the Xen start-up code which checks for things like > EPT) Good idea. From inside Xen you should be checking hap_enabled(d) (since even on an EPT machine the tools can request shadow pagetables for individual domains). Outside Xen I'm not sure there's a reliable way of detecting HAP; maybe the xenpaging hypercalls should return an error? Cheers, Tim. -- Tim Deegan Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)