|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 03/17] libxl/arm: Add a configuration option for ARM DomU ACPI
Stefano Stabellini writes ("Re: [Xen-devel] [PATCH v2 03/17] libxl/arm: Add a
configuration option for ARM DomU ACPI"):
...
> > >>> I know but here we want to unify the acpi option for x86 and ARM while
> > >>> on x86 it's true by default. What I want to ask is that how to
> > >>> distinguish x86 and ARM in libxl__domain_build_info_setdefault(), so we
> > >>> can assign acpi with different default value for x86 and ARM.
> > >>
> > >> By using #ifdef in the code?
We normally try to deal with this kind of thing by separating the
arch-specific code into separate files, which are compiled as needed.
Maybe libxl__arch_domain_prepare_config is the right place ?
> > > Maybe this could not work since CONFIG_ARM can not be accessed in libxl
> > > in current codes. I'm not sure why it can't work. Wei, do you have any
> > > suggestion?
> > >
> > And is it ok to use
> > #if defined(__arm__) || defined(__aarch64__)
> > ?
>
> I am not a Libxl maintainer anymore, but I think that should be OK or at
> least it would be a step in the right direction.
I definitely don't want open-coded alternations like this. If an
#ifdef is needed, a single feature macro should be (if necessary
invented) and tested.
But as I say I think this can probably be done with libxl_arch.h,
libxl_arm.c, libxl_x86.c, etc.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |