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

Re: [PATCH v7 5/6] tools: Allow building xen-hptool without CONFIG_MIGRATE



On Wed, May 06, 2026 at 08:52:29AM +0000, Mykyta Poturai wrote:
> On 4/29/26 17:33, Anthony PERARD wrote:
> > So you are trying to modify a library and introduced untested
> > functionality just to be able to build a different tool? I don't think
> > that a good idea especially in this case where it's more than just glue
> > code between a binary and xen.
> > 
> > We could change the library to provide the missing symbols, but it is
> > probably best to keep it that way for now.
> > 
> > So, how about changing `xen-hptool` to have reduced functionality on
> > other platform, and keep the 'mem-*' command on x86 only? You could move
> > the function that implement the 'mem-*' command into a separate file,
> > that compile only on x86 (or more specifically when CONFIG_MIGRATE is
> > set) and just have a "#if defined(__i386__) || defined(__x86_64__)" in
> > the `main_options` array.
> > 
> > They are compile-time arch-specific check everywhere in tools. Arch
> > specific are often implemented in separated source file, this mean we
> > can limit the #ifdefs to a minimum and keep the code readable.
> 
> Should I also do the same thing for SMT operations?

I guess it wouldn't hurt they are x86 only. So yes, looks like a good
idea to do it for the smt op as well.

Cheers,


--
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

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