From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6114B1EB5F8 for ; Wed, 24 Dec 2025 01:52:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766541163; cv=none; b=t87IxrsgQSDem609TxYijZmcuTE8+T1qJ0kCafa4yLw+4S6x9XPyrAXfP6iYvCvWhWR6mRfsdqxkWgW0rKXAZyLMgZNAEOWNCfMJlOsCzRVVneD5xbOzDWgCXBXSINMsc5qvK/O3wkJgcuh2uZhENWsY6EamWoOAxMuHq3a9dUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766541163; c=relaxed/simple; bh=5lPG4IOf+sBq6TrpNhLFNFU/P+BDTFLEEuHrmUhykmc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ivRYhy21NoSCRs/2fGuuhY4WmPQ8nMRNViLCWCvi4NbWvlHknrUmRk7RZIcg4KvSoCJYnXR4qqyk4/RXqEtiIX6AcbT8jYNnlecIA/SQJ8+EWv/X/6NSm3m+RW3bncYEPHf0aKesFLPuNghjgq29HgoJuOUx/jkbw8zm1st/078= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=P8xselLE; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="P8xselLE" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2a0f3f74587so77696055ad.2 for ; Tue, 23 Dec 2025 17:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1766541160; x=1767145960; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=howC3qe0NOwtd1tHxmKfOKuZ1Et78AmRirPyytf0b1M=; b=P8xselLEw/llqoZ3xl28oZznWtoQiByJHrN82s9xdEi7pjkkcNhGo5yrsL0E7vlpZw XL+Xnn/8ZbwZSje5nYS70o4JngwXxJ0mtUi0CAnV5BuAmbcABb7iYujYxQ3uB8H0KwOY WJVlsHxszxvYsvaUpPUYDTDXPDw2WbURHBXljRhH/XMKLiutzELJFAAMbP2Y9GrDPbbF BN8X5XCjOTi1EcufHa/B1QhukSGPfoLSSnKpEAft5HKWQ6wpXYn0vUsZec/6tvz6if7m xQi93m/ntM59pVeN5cDr9+osqNrqza2wmCb4eVe/JBiO9AYcXKa/YYfU26SfwvldRJHT yoVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766541160; x=1767145960; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=howC3qe0NOwtd1tHxmKfOKuZ1Et78AmRirPyytf0b1M=; b=ShlRD7QqDicrECr5aznoQTYnBNaBw7G54S2tXSr4k3vKUam0Xf7b42XYGqwOg5W+ts oKPjrjZY/DsAng54nLpVf+9HQN0pFKgZiY+a+EuN/OiG3Lj6rYcnhGICsTnVdWgL4E1r 1wSyyi4zas9tXHEcOLjOgVWzHj/zGqQMW4qNDdvbRAA5Pl/HsZjSGdItzw9qd0aNppds EfHfePu+/9k2pwG/UioPNO+Dxr4nDPorTHQ4/bXAc6hWeRo9qXYtx/Uph1kxjkN8vZVk 7NJLjA7hpf5wba7fqdMJAPwUWPkcR40/gvFlqcDiEQD6f1yO/riW5vwAytno7QvN21xO R7wA== X-Forwarded-Encrypted: i=1; AJvYcCXyTl0fXFVaHsDL9G7f1/vGyT3lZWuw2F5N0JboT7g+8VJRqJvhw4xTVidul9+aX5BD+eo+MSi0Gbu2tQ8=@vger.kernel.org X-Gm-Message-State: AOJu0YwrvLP462MC3pIUvqNOGDQFPuJHgBUjmYlLx6f5ODwPLzxN67bg mOlJNxgWrGPXAokGkN4Dv0DBoK7db9xWBquFiACRe09QYMHeeg7zCETeN/s8XZ9oYYs= X-Gm-Gg: AY/fxX6n/fInsvZlLakNS5w3myANfz/7LKD3W6j7AqMBn2eRrYq/2OVvJg0zvocfuaE Wn3Fu15zq4cOErO2ub0W87qCY4I7dKIiFfKW33RUFYGGTIGgitLOE0aO1BlX1VEaoHH9s61s8e+ caxK+HDw2UwIvkzuaHV7j2aImBEZ4tQPwtIPaYl9AZzas07F+rn6UKvOxp+Z4+h93DP06tQH5QG 4gSDM0AnHeKsTEivHWSnoyfj0rsNK+kZDxTzOehDpN+wKHuq5UBCQqUhJN2RDOyMaR2BC8T7uU0 orlPsUaB7BsA8ZNvBmKB/LIaYDqmtbNzit+Hu7MTauhJy0RLj6p8ANo2G6/rdRlfeM5xrfEkNh1 vyCPjtKJrK2FU+0dugok+lfl8Nlj4F4wWS1KlPDSMhYJtTEMr2ZvCMdI5dUYUvHqMkZAaaonV54 2Lu/P6lBMoBwBKwIQb/uorXGE= X-Google-Smtp-Source: AGHT+IEIpdwQ0t7SVPcZiTBNzBGw4vQ+EhUtMmvoCQetYW3tzxZPzl0WNSZXH98FL0e4VACW9LOKpw== X-Received: by 2002:a17:902:c94f:b0:29f:2b9:6cca with SMTP id d9443c01a7336-2a2f293d118mr153893565ad.44.1766541160599; Tue, 23 Dec 2025 17:52:40 -0800 (PST) Received: from ziepe.ca (S010670037e345dea.cg.shawcable.net. [68.146.128.183]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a2f3d5d407sm137888175ad.72.2025.12.23.17.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 17:52:39 -0800 (PST) Received: from jgg by jggl with local (Exim 4.95) (envelope-from ) id 1vYE3L-0001t8-3V; Tue, 23 Dec 2025 21:52:39 -0400 Date: Tue, 23 Dec 2025 21:52:39 -0400 From: Jason Gunthorpe To: Arnd Bergmann Cc: Kevin Tian , Joerg Roedel , Will Deacon , Samiullah Khawaja , Arnd Bergmann , Robin Murphy , Nicolin Chen , Lu Baolu , Pranjal Shrivastava , Yi Liu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommufd: fix selftest link dependency on amdv1 driver Message-ID: References: <20251223215127.603969-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251223215127.603969-1-arnd@kernel.org> On Tue, Dec 23, 2025 at 10:51:22PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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