xen: build fixes for CONFIG_HYPFS
cover xen: build fixes for CONFIG_HYPFS
Fixing an issue Andrew met, and disabling CONFIG_HYPFS in pv-shim.
Juergen Gross (2):
xen: fix build with CONFIG_HYPFS_CONFIG enabled xen/config: disable hypervisor filesystem for pv-shim
xen/arch/x86/configs/pvshim_defconfig | 1 + xen/common/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.26.2
PATCH 1/2 xen: fix build with CONFIG_HYPFS_CONFIG enabled
Commit 58263ed7713e ("xen: add /buildinfo/config entry to hypervisor filesystem") added a dependency to .config, but the hypervisor's build config could be have another name via setting KCONFIG_CONFIG.
Fix that by using $(KCONFIG_CONFIG) instead. Additionally reference the config file via $(XEN_ROOT) instead of a relative path.
--- xen/common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/Makefile +1 -1
@@ -75,7 +75,7 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ -config.gz: ../.config +config.gz: $(XEN_ROOT)/xen/$(KCONFIG_CONFIG) gzip -c $< >$@ config_data.o: config.gz
Signature · 1 line
2.26.2
Re: [PATCH-for-4.14 1/2] xen: fix build with CONFIG_HYPFS_CONFIG enabled
xen/common/Makefile obj-$(CONFIG_UBSAN) += ubsan/ · line 78
Quoted 8 lines · Juergen Gross
xen/common/Makefile +1
-1@@ -75,7 +75,7 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ -config.gz: ../.config +config.gz: $(XEN_ROOT)/xen/$(KCONFIG_CONFIG)
Looking at all pre-existing uses of KCONFIG_CONFIG this is the first one assuming it holds a relative path. The doc also doesn't indicate it can't be an absolute one.
Jan
Re: [PATCH-for-4.14 1/2] xen: fix build with CONFIG_HYPFS_CONFIG enabled
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Juergen Gross
xen/common/Makefile +0
-0@@ -75,7 +75,7 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
Quoted 6 lines
xen/common/Makefile obj-$(CONFIG_UBSAN) += ubsan/ · line 78
Quoted 2 lines
xen/common/Makefile +1
-1-config.gz: ../.config +config.gz: $(XEN_ROOT)/xen/$(KCONFIG_CONFIG)Looking at all pre-existing uses of
KCONFIG_CONFIGthis is the first one assuming it holds a relative path. The doc also doesn't indicate it can't be an absolute one.
This is not an objection to this patch right?
Wei.
Quoted 2 lines
Jan
Re: [PATCH-for-4.14 1/2] xen: fix build with CONFIG_HYPFS_CONFIG enabled
Quoted 8 lines · Wei Liu
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Juergen Gross
xen/common/Makefile +0
-0@@ -75,7 +75,7 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
Quoted 8 lines
Quoted 6 lines
xen/common/Makefile obj-$(CONFIG_UBSAN) += ubsan/ · line 78
Quoted 2 lines
xen/common/Makefile +1
-1-config.gz: ../.config +config.gz: $(XEN_ROOT)/xen/$(KCONFIG_CONFIG)Looking at all pre-existing uses of
KCONFIG_CONFIGthis is the first one assuming it holds a relative path. The doc also doesn't indicate it can't be an absolute one.This is not an objection to this patch right?
I can see his point.
In case KCONFIG_CONFIG is set to an absolute path the result won't build.
The proper solution would be to test KCONFIG_CONFIG for being an absolute path and do the prefixing of $(XEN_ROOT)/xen/ only if this isn't the case.
I'll send V2 of this patch.
Juergen
Re: [PATCH-for-4.14 1/2] xen: fix build with CONFIG_HYPFS_CONFIG enabled
In reply to Wei LiuQuoted 8 lines · Wei Liu
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Juergen Gross
xen/common/Makefile +0
-0@@ -75,7 +75,7 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
Quoted 8 lines
Quoted 6 lines
xen/common/Makefile obj-$(CONFIG_UBSAN) += ubsan/ · line 78
Quoted 2 lines
xen/common/Makefile +1
-1-config.gz: ../.config +config.gz: $(XEN_ROOT)/xen/$(KCONFIG_CONFIG)Looking at all pre-existing uses of
KCONFIG_CONFIGthis is the first one assuming it holds a relative path. The doc also doesn't indicate it can't be an absolute one.This is not an objection to this patch right?
It is.
Jan
PATCH 2/2 xen/config: disable hypervisor filesystem for pv-shim
In reply to Juergen GrossThe pv-shim doesn't need the hypervisor filesystem, so disable it.
--- xen/arch/x86/configs/pvshim_defconfig | 1 + 1 file changed, 1 insertion(+)
xen/arch/x86/configs/pvshim_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_PV_SHIM=y CONFIG_PV_SHIM_EXCLUSIVE=y CONFIG_NR_CPUS=32 # Disable features not used by the PV shim +# CONFIG_HYPFS is not set # CONFIG_SHADOW_PAGING is not set # CONFIG_BIGMEM is not set # CONFIG_HVM_FEP is not set
Signature · 1 line
2.26.2
Re: [PATCH-for-4.14 2/2] xen/config: disable hypervisor filesystem for pv-shim
Quoted 3 lines · Juergen Gross
The pv-shim doesn't need the hypervisor filesystem, so disable it.
Signed-off-by Juergen Gross <[email protected]>