On Tue, Jul 03, 2018 at 09:55:17PM +0100, Andrew Cooper wrote: > From: Roger Pau Monné <[email protected]> > > Move x86_cpuid_lookup_deep_deps() into the shared library, removing the > individual copies from the hypervisor and libxc respectively. > > Signed-off-by: Roger Pau Monné <[email protected]> > Signed-off-by: Andrew Cooper <[email protected]> > --- > CC: Jan Beulich <[email protected]> > CC: Wei Liu <[email protected]> > CC: Roger Pau Monné <[email protected]> > CC: Sergey Dyasli <[email protected]> > CC: Ian Jackson <[email protected]> > --- > tools/libxc/Makefile | 5 +++++ > tools/libxc/include/xenctrl.h | 1 - > tools/libxc/xc_cpuid_x86.c | 29 +------------------------ > xen/arch/x86/cpu/common.c | 2 +- > xen/arch/x86/cpuid.c | 32 +-------------------------- > xen/common/Makefile | 1 + > xen/common/libx86/Makefile | 1 + > xen/common/libx86/cpuid.c | 44 > ++++++++++++++++++++++++++++++++++++++ > xen/common/libx86/libx86-private.h | 42 ++++++++++++++++++++++++++++++++++++ > xen/include/asm-x86/cpuid.h | 2 -- > xen/include/xen/libx86/cpuid.h | 2 ++ > 11 files changed, 98 insertions(+), 63 deletions(-) > create mode 100644 xen/common/libx86/Makefile > create mode 100644 xen/common/libx86/cpuid.c > create mode 100644 xen/common/libx86/libx86-private.h > > diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile > index 0ee0813..f534d90 100644 > --- a/tools/libxc/Makefile > +++ b/tools/libxc/Makefile > @@ -80,6 +80,11 @@ GUEST_SRCS-y += $(ELF_SRCS-y) > $(patsubst %.c,%.o,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign > $(patsubst %.c,%.opic,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign > > +# Add libx86 to the build > +vpath %.c ../../xen/common/libx86 > + > +GUEST_SRCS-$(CONFIG_X86) += cpuid.c
I think it is better to not expose libx86 to Arm build, so the vpath should be guarded by CONFIG_X86 too. ifeq ($(CONFIG_X86),y) vpath ... GUEST_SRCS-y += ... endif The rest looks fine. Wei. _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
