[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUtHZ1KHTJjW7SPP@ziepe.ca>
Date: Tue, 23 Dec 2025 21:52:39 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Kevin Tian <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Samiullah Khawaja <skhawaja@...gle.com>,
Arnd Bergmann <arnd@...db.de>, Robin Murphy <robin.murphy@....com>,
Nicolin Chen <nicolinc@...dia.com>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Pranjal Shrivastava <praan@...gle.com>, Yi Liu <yi.l.liu@...el.com>,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommufd: fix selftest link dependency on amdv1 driver
On Tue, Dec 23, 2025 at 10:51:22PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> When CONFIG_AMD_IOMMU is disabled, the selftest runs into a link failure:
>
> aarch64-linux-ld: drivers/iommu/iommufd/selftest.o: in function `mock_domain_alloc_pgtable.isra.0':
> selftest.c:(.text+0x1590): undefined reference to `pt_iommu_amdv1_init'
> aarch64-linux-ld: drivers/iommu/iommufd/selftest.o:(.rodata+0x280): undefined reference to `pt_iommu_amdv1_map_pages'
> aarch64-linux-ld: drivers/iommu/iommufd/selftest.o:(.rodata+0x288): undefined reference to `pt_iommu_amdv1_unmap_pages'
> aarch64-linux-ld: drivers/iommu/iommufd/selftest.o:(.rodata+0x2b0): undefined reference to `pt_iommu_amdv1_iova_to_phys'
> aarch64-linux-ld: drivers/iommu/iommufd/selftest.o:(.rodata+0x2d8): undefined reference to `pt_iommu_amdv1_read_and_clear_dirty'
>
> Change the top-level function to skip all the amdv1 tests in this
> configuration.
kconfig shouldn't let this build happen:
config IOMMUFD_TEST
bool "IOMMU Userspace API Test support"
depends on DEBUG_KERNEL
depends on FAULT_INJECTION
depends on RUNTIME_TESTING_MENU
depends on IOMMU_PT_AMDV1
select IOMMUFD_DRIVER
I think this is more fall out from Geert's change to make GENERIC_PT
unselectable, the 'depends on' is no longer enough??
I guess the right fix is to add a "select GENERIC_PT" above, does that
work for you?
Jason
Powered by blists - more mailing lists