[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 RFC 05/14] tools/libxc: noarch common code



On Tue, 2014-06-17 at 19:26 +0100, Andrew Cooper wrote:
> 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. 

Ah, I grepped for mfn_to_pfn twice so never for pfn_to_mfn...

tools/libxc/xc_offline_page.c uses it too BTW.

I'd be inclined to namespace this existing function (i.e. prefix xc_*)
which will stop it clashing with any use you want to make of the more
generic name in the new migration code.

> > 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

Arguably xc_domain_resume could/should be made part of the new migration
infratructure anyway.

> >> 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.

Either fix the existing ones to suit your tastes or just bite your
tongue and use the existing macros, don't add hacks.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.