Kconfig misc fixes
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
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
@@ -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
Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Quoted 7 lines · Michal Orzel
HAS_PASSTHROUGHshould only be selected on MMU systems. It's been like that until commit163c6b589879added possibility to selectHAS_PASSTHROUGHifPCI_PASSTHROUGHis enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems.PCI_PASSTHROUGHshould depend onHAS_PASSTHROUGHinstead.Signed-off-by Michal Orzel <[email protected]>
May want a Fixes: tag, based on the description?
Jan
Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
HAS_PASSTHROUGHshould only be selected on MMU systems. It's been like that until commit163c6b589879added possibility to selectHAS_PASSTHROUGHifPCI_PASSTHROUGHis enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems.PCI_PASSTHROUGHshould depend onHAS_PASSTHROUGHinstead.
Quoted 5 lines
Quoted 1 line
Signed-off-by Michal Orzel <[email protected]>Reviewed-by Jan Beulich <[email protected]>May want a Fixes: tag, based on the description?
~Michal
Stefano Stabellini
Acked-byRe: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
In reply to Jan BeulichQuoted 10 lines · Jan Beulich
Quoted 7 lines · Michal Orzel
HAS_PASSTHROUGHshould only be selected on MMU systems. It's been like that until commit163c6b589879added possibility to selectHAS_PASSTHROUGHifPCI_PASSTHROUGHis enabled on Arm64. This is incorrect as it may result in enabling passthrough/ build on MPU systems.PCI_PASSTHROUGHshould depend onHAS_PASSTHROUGHinstead.Signed-off-by Michal Orzel <[email protected]>Reviewed-by Jan Beulich <[email protected]>
PATCH 2/2 common: Make livepatch dependent on HAS_VMAP
In reply to Michal OrzelIt 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
@@ -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
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_VMAPis not selected. This is the case on MPU systems.Signed-off-by Michal Orzel <[email protected]>
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
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_VMAPis not selected. This is the case on MPU systems.Signed-off-by Michal Orzel <[email protected]>I agree this is necessary for now, so
Reviewed-by Jan Beulich <[email protected]>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
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_VMAPis not selected. This is the case on MPU systems.Signed-off-by Michal Orzel <[email protected]>I agree this is necessary for now, so
Reviewed-by Jan Beulich <[email protected]>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 inKconfigand allows to enable live-patching on MPU, whereHAS_VMAPis not selected."
Fine with me, thanks.
Jan
Stefano Stabellini
Acked-byRe: [PATCH 2/2] common: Make livepatch dependent on HAS_VMAP
In reply to Jan BeulichQuoted 8 lines · Jan Beulich
Quoted 4 lines · Michal Orzel
It should not be possible to select and build livepatch if
HAS_VMAPis not selected. This is the case on MPU systems.Signed-off-by Michal Orzel <[email protected]>I agree this is necessary for now, so
Reviewed-by Jan Beulich <[email protected]>