Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp177504rdd; Mon, 8 Jan 2024 23:58:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt+uSt0vhMq53bZ/h2goNLeQ02gBF1vfuhJb5sAPUeLInqKZsJk7LG8/gaVtnvEaJ+lSS8 X-Received: by 2002:a17:907:d2a:b0:a2a:4096:ccae with SMTP id gn42-20020a1709070d2a00b00a2a4096ccaemr367262ejc.143.1704787131739; Mon, 08 Jan 2024 23:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704787131; cv=none; d=google.com; s=arc-20160816; b=Sq46TKbfbVBZIGiD14PromgBTrTQPhJZ4R3qgZcQiTG4gcwkX8rnUpMLVCs8ByrlwN NaRtSY2pBycDuANeW8djti58pRDnIh7fs0AsWplxBQ0ISjWu3hHtT05Da4QwKG8bQmMk phf/TQfizVkTtHC3YzYsmvnTj23Gt0C5CvdUfsCFULcYNQot7uJdMzG83DQAfIcRhV99 7H4WGjwHZcs6ybsx+MkvKB8KaW5Z94tdJgcoC4d/ohtGzgqDLXm7qaDpu3rsmy3CZdZr 1w9amYmTMyyRGkTDiLunuHXoF+3A6DQLnUQFurArL7MMpNkYmZ54KSLNIDvCYs1jRtkt xq0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yLvdYOzGwm9FWz/7ysfQSnYMp2ZVtQbg//InALPrbHM=; fh=bKiZeU7FCmsNYttW1Gc+eRNiT66k32xxQ5h5VkCc0wM=; b=aQBcnzy7WMMjtRh6HtWSDGfZjEX5W7EUUlbRzOsuVkUKcgzgLXMZ24KxtIeNbaqTeR FU8PmrW0Fm/byQPICYmxjJHF/ZmwbyOxKrZSzfb+g5uvCIvT93Qlr39VjYlYBtPDUQrS t7Gp5OIuQg6lMUdRg+YWf2BQ01wiq/LGiuK6m+vBi/BABN2MrNldyIGLhIbhyqVBaDIz oGwjpp3H3+y+bF1F3XfSTPJiV4B4gCMbMBgTb633IqKPFmQmZ+jzovVAWk2Yj/c4vLA2 UIj8AalGQJk4aCP9FV8jr/YWaoQ9INQhf/3UcXdIyNz4tWsxzxW3hBQsWrRmZWzMnztq P0ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Me4pfJh6; spf=pass (google.com: domain of linux-kernel+bounces-20506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i11-20020a170906250b00b00a2887d4190csi569137ejb.207.2024.01.08.23.58.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 23:58:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Me4pfJh6; spf=pass (google.com: domain of linux-kernel+bounces-20506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 799821F24FC9 for ; Tue, 9 Jan 2024 07:58:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEB432D62A; Tue, 9 Jan 2024 07:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Me4pfJh6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6BEB66B; Tue, 9 Jan 2024 07:57:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DBCAC433C7; Tue, 9 Jan 2024 07:57:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704787056; bh=VLDneZLA6cAnWxtoG7KbCxm8KweXPrrQ2Mn6Ofb6MR8=; h=From:To:Cc:Subject:Date:From; b=Me4pfJh6dlkcobjt6Eefwwv0CZqzwIrWh7igIV5Wxk1VrgKQ0L3y2cd3e2iJibOky w9bIh2oR9cNnIfumWNhOf5GgJyXoFI7NpSALoLeM24wc9ZAAqpPNUMceKug/BANQEO QY+E+Up/zXp11/IStSHvYzSDlaNCI9aX2TQXo/KsiF6UgM1tlBzqYjFMVNMjaq9w8a XOFazkm9TgNWSD06qM5FsLAvm2iCG76aS0fG01Gs82wWG7K0GiiDbmEAvmWgwJgsz4 yhbOC2FDCE6Ch8UrSIaOWGbB8Au5fQcsineQXjTsrjz3txvMELmdrK6b6n1lMurQ0L vgx248eNSPm+w== From: Arnd Bergmann To: Yishai Hadas , Alex Williamson , "Michael S. Tsirkin" , Kevin Tian , Jason Gunthorpe Cc: Arnd Bergmann , Shameer Kolothum , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] vfio: fix virtio-pci dependency Date: Tue, 9 Jan 2024 08:57:19 +0100 Message-Id: <20240109075731.2726731-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann The new vfio-virtio driver already has a dependency on VIRTIO_PCI_ADMIN_LEGACY, but that is a bool symbol and allows vfio-virtio to be built-in even if virtio-pci itself is a loadable module. This leads to a link failure: aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_probe': main.c:(.text+0xec): undefined reference to `virtio_pci_admin_has_legacy_io' aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_init_device': main.c:(.text+0x260): undefined reference to `virtio_pci_admin_legacy_io_notify_info' aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_bar0_rw': main.c:(.text+0x6ec): undefined reference to `virtio_pci_admin_legacy_common_io_read' aarch64-linux-ld: main.c:(.text+0x6f4): undefined reference to `virtio_pci_admin_legacy_device_io_read' aarch64-linux-ld: main.c:(.text+0x7f0): undefined reference to `virtio_pci_admin_legacy_common_io_write' aarch64-linux-ld: main.c:(.text+0x7f8): undefined reference to `virtio_pci_admin_legacy_device_io_write' Add another explicit dependency on the tristate symbol. Fixes: eb61eca0e8c3 ("vfio/virtio: Introduce a vfio driver over virtio devices") Signed-off-by: Arnd Bergmann --- drivers/vfio/pci/virtio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/pci/virtio/Kconfig b/drivers/vfio/pci/virtio/Kconfig index fc3a0be9d8d4..bd80eca4a196 100644 --- a/drivers/vfio/pci/virtio/Kconfig +++ b/drivers/vfio/pci/virtio/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIRTIO_VFIO_PCI tristate "VFIO support for VIRTIO NET PCI devices" - depends on VIRTIO_PCI_ADMIN_LEGACY + depends on VIRTIO_PCI && VIRTIO_PCI_ADMIN_LEGACY select VFIO_PCI_CORE help This provides support for exposing VIRTIO NET VF devices which support -- 2.39.2