From: Keir Fraser Subject: Re: CONFIG_XEN_COMPAT_030002 broken? Date: Mon, 13 Nov 2006 17:12:42 +0000 Message-ID: References: <4558A683.30500@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4558A683.30500@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann , Keir Fraser Cc: Xen devel list List-Id: xen-devel@lists.xenproject.org On 13/11/06 17:08, "Gerd Hoffmann" wrote: >> Yes, and to allow fewer TLB entries to be flushed when switching between >> guest kernel and guest user. That optimisation is foiled if PAGE_USER is set >> everywhere. > > Ok, so the extra cost to decide that at runtime (if > CONFIG_XEN_COMPAT_030002 is set) probably is outweighed by the tlb flush > optimization ... Definitely! The only potential problem is I don't know whether any code depends on those definitions being compile-time constant. If not, it should be a straightforward patch. By the way, the test of whether to poke in PAGE_USER can be done by looking at one of the initial mappings provided by the domain builder. If one of those ptes contains PAGE_USER, you know you need to use PAGE_USER for all kernel mappings. -- Keir