From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v5 RFC 05/14] tools/libxc: noarch common code Date: Tue, 17 Jun 2014 19:26:50 +0100 Message-ID: <53A0886A.7000306@citrix.com> References: <1402510482-21099-1-git-send-email-andrew.cooper3@citrix.com> <1402510482-21099-6-git-send-email-andrew.cooper3@citrix.com> <1403021435.25771.15.camel@kazak.uk.xensource.com> <53A06CCB.9010304@citrix.com> <1403024015.25771.37.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403024015.25771.37.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Frediano Ziglio , David Vrabel , Xen-devel List-Id: xen-devel@lists.xenproject.org On 17/06/14 17:53, Ian Campbell wrote: > On Tue, 2014-06-17 at 17:28 +0100, Andrew Cooper wrote: >>>> +// Hack out junk from the namespace >>> Do you have a plan to not need these hacks? >> Not really. There are enough other areas of libxc which still use these >> macros, and I can't go and simply update all other areas as > I (or rather git grep) can't see the existing definitions/uses > mfn_to_pfn and pfn_to_mfn outside of xc_domain_{save,restore}.c. Where > are the defined and used outside of those? mfn_to_pfn it turns out isn't. pfn_to_mfn is used once in xc_domain.c. Open coding it might be a solution. > > (I see some in mini-os, but you specifically said libxc) MiniOS will undoubtedly using its kernel versions of these functions, so is not relevant here. > > Likewise for the *_FIELD stuff which is used in ~2 places outside the > save restore code according to grep. xc_core_x86.c defines itself GET_FIELD() so clearly doesn't use xg_save_restore.h xc_resume.c clearly uses xg_save_restore.h but could probably be converted to be similar to xc_core_x86.c > >> struct >> context is meaningless outside of libxc/saverestore. > So how are these used there? > > Ian. > They are not. They are reimplemented in common_x86_pv.h so as to not take magic locally scoped variables with specific names. ~Andrew