Skip to contentSkip to conversation

xen: build fixes for CONFIG_HYPFS

PATCH Superseded Juergen Gross 3 participants 8 messages Jun 2, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 91581e1815..2799f6510c 100644
@@ -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
#2 lore raw

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

#3 lore raw

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_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.

This is not an objection to this patch right?

Wei.

Quoted 2 lines

Jan

#4 lore raw

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_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.

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

#5 lore raw

Re: [PATCH-for-4.14 1/2] xen: fix build with CONFIG_HYPFS_CONFIG enabled

In reply to Wei Liu
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_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.

This is not an objection to this patch right?

It is.

Jan

#6 lore raw

PATCH 2/2 xen/config: disable hypervisor filesystem for pv-shim

In reply to Juergen Gross

The 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
index 9710aa6238..830660e022 100644
@@ -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