From: Pete Zaitcev Subject: Re: [RFC PATCH 08/35] Add Xen-specific memory management definitions Date: Wed, 17 May 2006 09:06:45 -0700 Message-ID: <20060517090645.0b72bd2d.zaitcev@redhat.com> References: <20060509084945.373541000@sous-sol.org> <20060509085151.047254000@sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060509085151.047254000@sous-sol.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Wright Cc: xen-devel@lists.xensource.com, ian.pratt@xensource.com, linux-kernel@vger.kernel.org, virtualization@lists.osdl.org, zaitcev@redhat.com, Christian.Limpach@cl.cam.ac.uk List-Id: xen-devel@lists.xenproject.org On Tue, 09 May 2006 00:00:08 -0700, Chris Wright wrote: > +static inline unsigned long pfn_to_mfn(unsigned long pfn) > +{ > +#ifndef CONFIG_XEN_SHADOW_MODE > + if (xen_feature(XENFEAT_auto_translated_physmap)) > + return pfn; > + return phys_to_machine_mapping[(unsigned int)(pfn)] & > + ~FOREIGN_FRAME_BIT; > +#else > + return pfn; > +#endif > +} Why do we need several modes in Linux guests? If a significant tradeoff exists (for example, between performance and maximum addressable memory), then we need to think about the real issue instead of throwing config options into the pot. -- Pete