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

Re: [Xen-devel] [PATCH 04/13] libx86: introduce a libx86 shared library



On Tue, Jul 03, 2018 at 09:55:17PM +0100, Andrew Cooper wrote:
> From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> 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é <roger.pau@xxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> ---
>  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
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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