From: Jeremy Fitzhardinge Subject: Re: [PATCH 2 of 7] x86/pvops: add a paravirt_ident functions to allow special patching Date: Thu, 29 Jan 2009 02:46:23 -0800 Message-ID: <498188FF.90107@goop.org> References: <79ff4280c71ffeba69d2.1233182102@abulafia.goop.org> <200901291835.49251.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200901291835.49251.rusty@rustcorp.com.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Rusty Russell Cc: Zachary Amsden , Xen-devel , Ian Campbell , the arch/x86 maintainers , linux-kernel@vger.kernel.org, Ravikiran Thirumalai , Ingo Molnar List-Id: xen-devel@lists.xenproject.org Rusty Russell wrote: > I think I prefer: > > /* make_pte etc and pgd_val etc are identity functions. */ > #define paravirt_native_page_op \ > (sizeof(pte_t) == sizeof(u64) ? paravirt_ident_64 : paravirt_ident_32) > > Then use that everywhere rather than these defines? > Hm, also I don't think that will work because paravirt_ident_32|64 return different types. The compiler might promote paravirt_ident_32 to returning a 64-bit number, which would be a bit disastrous. J