Skip to contentSkip to conversation

Kconfig misc fixes

PATCH In review Michal Orzel 3 participants 10 messages Jul 31, 2025

lore
Share & tools
lore
#0 lore raw

cover Kconfig misc fixes

Some Kconfig misc fixes found while building different configs for MPU.

Michal Orzel (2):
xen/arm: Fix HAS_PASSTHROUGH selection
common: Make livepatch dependent on HAS_VMAP

 xen/arch/arm/Kconfig | 3 +--
 xen/common/Kconfig   | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 xen/arm: Fix HAS_PASSTHROUGH selection

HAS_PASSTHROUGH should only be selected on MMU systems. It's been like that until commit 163c6b589879 added possibility to select HAS_PASSTHROUGH if PCI_PASSTHROUGH is enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems. PCI_PASSTHROUGH should depend on HAS_PASSTHROUGH instead.

---
 xen/arch/arm/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
xen/arch/arm/Kconfig +1 -2
index 17df147b2555..a0c816047427 100644
@@ -9,7 +9,6 @@ config ARM_64
 	select 64BIT
 	select HAS_FAST_MULTIPLY
 	select HAS_VPCI_GUEST_SUPPORT if PCI_PASSTHROUGH
-	select HAS_PASSTHROUGH if PCI_PASSTHROUGH
 
 config ARM
 	def_bool y
@@ -263,7 +262,7 @@ source "arch/arm/firmware/Kconfig"
 
 config PCI_PASSTHROUGH
 	bool "PCI passthrough" if EXPERT
-	depends on ARM_64
+	depends on ARM_64 && HAS_PASSTHROUGH
 	help
 	  This option enables PCI device passthrough
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection

Quoted 7 lines · Michal Orzel

HAS_PASSTHROUGH should only be selected on MMU systems. It's been like that until commit 163c6b589879 added possibility to select HAS_PASSTHROUGH if PCI_PASSTHROUGH is enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems. PCI_PASSTHROUGH should depend on HAS_PASSTHROUGH instead.

May want a Fixes: tag, based on the description?

Jan

#3 lore raw

Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection

Quoted 7 lines · Jan Beulich
Quoted 6 lines · Michal Orzel

HAS_PASSTHROUGH should only be selected on MMU systems. It's been like that until commit 163c6b589879 added possibility to select HAS_PASSTHROUGH if PCI_PASSTHROUGH is enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems. PCI_PASSTHROUGH should depend on HAS_PASSTHROUGH instead.

Quoted 5 lines
Quoted 1 line

May want a Fixes: tag, based on the description?

Fixes 163c6b589879 ("xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option")

~Michal

#4 lore raw

Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection

In reply to Jan Beulich
Quoted 10 lines · Jan Beulich
Quoted 7 lines · Michal Orzel

HAS_PASSTHROUGH should only be selected on MMU systems. It's been like that until commit 163c6b589879 added possibility to select HAS_PASSTHROUGH if PCI_PASSTHROUGH is enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems. PCI_PASSTHROUGH should depend on HAS_PASSTHROUGH instead.

#5 lore raw

PATCH 2/2 common: Make livepatch dependent on HAS_VMAP

In reply to Michal Orzel

It should not be possible to select and build livepatch if HAS_VMAP is not selected. This is the case on MPU systems.

---
 xen/common/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/Kconfig +1 -1
index 2539a635f111..16936418a6e6 100644
@@ -477,7 +477,7 @@ config CRYPTO
 config LIVEPATCH
 	bool "Live patching support"
 	default X86
-	depends on "$(XEN_HAS_BUILD_ID)" = "y" && SYSCTL
+	depends on "$(XEN_HAS_BUILD_ID)" = "y" && SYSCTL && HAS_VMAP
 	select CC_SPLIT_SECTIONS
 	help
 	  Allows a running Xen hypervisor to be dynamically patched using
Signature · 1 line
2.43.0
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] common: Make livepatch dependent on HAS_VMAP

Quoted 4 lines · Michal Orzel

It should not be possible to select and build livepatch if HAS_VMAP is not selected. This is the case on MPU systems.

I agree this is necessary for now, so

But in principle live-patching ought to be possible without MMU as well, just that the code will need suitably enabling? If so, it would be nice if the description could somehow express this.

Jan

#7 lore raw

Re: [PATCH 2/2] common: Make livepatch dependent on HAS_VMAP

Quoted 11 lines · Jan Beulich
Quoted 4 lines · Michal Orzel

It should not be possible to select and build livepatch if HAS_VMAP is not selected. This is the case on MPU systems.

I agree this is necessary for now, so

But in principle live-patching ought to be possible without MMU as well, just that the code will need suitably enabling? If so, it would be nice if the description could somehow express this.

Yes, I agree that it can be enabled in the future with some additional changes. I can tweak commit msg when committing:
"While technically possible to support live-patching on MPU systems, today the code depends on vmap. However, this relationship is not reflected in Kconfig and allows to enable live-patching on MPU, where HAS_VMAP is not selected."

~Michal

#8 lore raw

Re: [PATCH 2/2] common: Make livepatch dependent on HAS_VMAP

Quoted 12 lines · Michal
Quoted 11 lines · Jan Beulich
Quoted 4 lines · Michal Orzel

It should not be possible to select and build livepatch if HAS_VMAP is not selected. This is the case on MPU systems.

I agree this is necessary for now, so

But in principle live-patching ought to be possible without MMU as well, just that the code will need suitably enabling? If so, it would be nice if the description could somehow express this.

Quoted 5 lines

Yes, I agree that it can be enabled in the future with some additional changes. I can tweak commit msg when committing:
"While technically possible to support live-patching on MPU systems, today the code depends on vmap. However, this relationship is not reflected in Kconfig and allows to enable live-patching on MPU, where HAS_VMAP is not selected."

Fine with me, thanks.

Jan