Skip to contentSkip to conversation

xen: build fixes for CONFIG_HYPFS

PATCH In review Juergen Gross 3 participants 6 messages Jun 2, 2020

lore
Share & tools
lore
#0 lore raw

v2 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                   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 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.

---
V2:
- accept an absolute path in KCONFIG_CONFIG (Jan Beulich)

---
 xen/common/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/Makefile +2 -1
index 91581e1815..fc2c8eb4a3 100644
@@ -75,7 +75,8 @@ obj-$(CONFIG_UBSAN) += ubsan/
 obj-$(CONFIG_NEEDS_LIBELF) += libelf/
 obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
 
-config.gz: ../.config
+CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG))
+config.gz: $(CONF_FILE)
 	gzip -c $< >$@
 
 config_data.o: config.gz
Signature · 1 line
2.26.2
Reviewed-by on v2 1/2
#2 lore raw

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

Quoted 9 lines · Juergen Gross

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.

albeit ...

xen/common/Makefile obj-$(CONFIG_UBSAN) += ubsan/ · line 78

Quoted 8 lines
xen/common/Makefile +1 -1
@@ -75,7 +75,8 @@ obj-$(CONFIG_UBSAN) += ubsan/
 obj-$(CONFIG_NEEDS_LIBELF) += libelf/
 obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
 
-config.gz: ../.config
+CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG))

... I'll be tempted to shorten this to

CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG)

Jan

#3 lore raw

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

Quoted 20 lines · Jan Beulich
Quoted 9 lines · Juergen Gross

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.

albeit ...

Quoted 6 lines
xen/common/Makefile +0 -0
@@ -75,7 +75,8 @@ 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
+CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG))

... I'll be tempted to shorten this to

CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG)

Yes, this is better.

Juergen

#4 lore raw

PATCH v2 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
#5 lore raw
In reply to Juergen Gross
Quoted 12 lines

-----Original Message-----
From: Juergen Gross <[email protected]>
Sent: 02 June 2020 13:59
To: [email protected]
Cc: [email protected]; Juergen Gross <[email protected]>; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Stefano Stabellini <[email protected]>; Wei Liu <[email protected]>; Roger Pau Monné <[email protected]>
Subject: [PATCH-for-4.14 v2 0/2] xen: build fixes for CONFIG_HYPFS

Fixing an issue Andrew met, and disabling CONFIG_HYPFS in pv-shim.

Quoted 8 lines

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                   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)