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

Re: [Xen-devel] [PATCH v6 08/12] xen: add /buildinfo/config entry to hypervisor filesystem



On 26.02.2020 13:47, Juergen Gross wrote:
> Add the /buildinfo/config entry to the hypervisor filesystem. This
> entry contains the .config file used to build the hypervisor.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> V3:
> - store data in gzip format
> - use binfile mechanism to create data file
> - move code to kernel.c
> 
> V6:
> - add config item for the /buildinfo/config (Jan Beulich)
> - make config related variables const in kernel.h (Jan Beulich)
> ---
>  .gitignore                   |  2 ++
>  docs/misc/hypfs-paths.pandoc |  4 ++++
>  xen/common/Kconfig           | 10 ++++++++++
>  xen/common/Makefile          | 12 ++++++++++++
>  xen/common/kernel.c          | 15 +++++++++++++++
>  xen/include/xen/kernel.h     |  3 +++
>  6 files changed, 46 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index fd5610718d..bc8e053ccb 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -297,6 +297,8 @@ xen/arch/*/efi/boot.c
>  xen/arch/*/efi/compat.c
>  xen/arch/*/efi/efi.h
>  xen/arch/*/efi/runtime.c
> +xen/common/config_data.S
> +xen/common/config.gz
>  xen/include/headers*.chk
>  xen/include/asm
>  xen/include/asm-*/asm-offsets.h
> diff --git a/docs/misc/hypfs-paths.pandoc b/docs/misc/hypfs-paths.pandoc
> index e392feff27..1faebcccbc 100644
> --- a/docs/misc/hypfs-paths.pandoc
> +++ b/docs/misc/hypfs-paths.pandoc
> @@ -133,6 +133,10 @@ Information about the compile domain.
>  
>  The compiler used to build Xen.
>  
> +#### /buildinfo/config = STRING
> +
> +The contents of the `xen/.config` file at the time of the hypervisor build.

Perhaps add "..., if enabled at build time"?

> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -1,6 +1,7 @@
>  obj-$(CONFIG_ARGO) += argo.o
>  obj-y += bitmap.o
>  obj-y += bsearch.o
> +obj-$(CONFIG_HYPFS_CONFIG) += config_data.o
>  obj-$(CONFIG_CORE_PARKING) += core_parking.o
>  obj-y += cpu.o
>  obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
> @@ -73,3 +74,14 @@ subdir-$(CONFIG_UBSAN) += ubsan
>  
>  subdir-$(CONFIG_NEEDS_LIBELF) += libelf
>  subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
> +
> +config.gz: ../.config

I think this wants to use $(KCONFIG_CONFIG) now.

> +     gzip -c $< >$@

We'll want to make sure to switch this to $(if_changed ...) once
available (by Anthony's series).

> +config_data.o: config.gz

Is this really needed? You need to add config.gz as a
dependency ...

> +config_data.S: $(XEN_ROOT)/xen/tools/binfile

... here anyway afaict, and then preferably use ...

> +     $(XEN_ROOT)/xen/tools/binfile $@ config.gz xen_config_data

... $< here.

> +clean::
> +     rm config_data.S config.gz 2>/dev/null || true

Instead of the "|| true" elsewhere we use "rm -f".

Jan

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