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

Michal Orzel posted 2 patches 3 months ago
[PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Posted by Michal Orzel 3 months ago
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.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 17df147b2555..a0c816047427 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -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
 
-- 
2.43.0
Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Posted by Jan Beulich 3 months ago
On 31.07.2025 10:05, Michal Orzel wrote:
> 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.
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

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

Jan
Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Posted by Stefano Stabellini 3 months ago
On Thu, 31 Jul 2025, Jan Beulich wrote:
> On 31.07.2025 10:05, Michal Orzel wrote:
> > 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.
> > 
> > Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Re: [PATCH 1/2] xen/arm: Fix HAS_PASSTHROUGH selection
Posted by Orzel, Michal 3 months ago

On 31/07/2025 10:13, Jan Beulich wrote:
> On 31.07.2025 10:05, Michal Orzel wrote:
>> 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.
>>
>> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> May want a Fixes: tag, based on the description?
Fixes: 163c6b589879 ("xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option")

~Michal