From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17AF6C04FF3 for ; Mon, 24 May 2021 19:47:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBC0560FF1 for ; Mon, 24 May 2021 19:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233171AbhEXTsa (ORCPT ); Mon, 24 May 2021 15:48:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30614 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbhEXTs3 (ORCPT ); Mon, 24 May 2021 15:48:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621885620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eSgniuYleIfy2mqxkBpQSaiY72k4S+9CRx4cslFPjKs=; b=F+tywiMc26WFh/6Jb/Eu3u3LVY8G0R0Uy4x+mDWoryzP/X9CzJOkxbBai4uSdWk9QUPOE9 ELrPVQbpC7+V6QfbMvhqHom6zEoFFwk8e6TV03ombmxgN/v8kWYjBsmxsWM/1zMGO1TKCw ig5zLv56S+NOO9NLjnB5YCmRpyU+LHk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-kyzoSgi-NX6e45auhMDkyg-1; Mon, 24 May 2021 15:46:56 -0400 X-MC-Unique: kyzoSgi-NX6e45auhMDkyg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C6E5803622; Mon, 24 May 2021 19:46:55 +0000 (UTC) Received: from x1.home.shazbot.org (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB3595C701; Mon, 24 May 2021 19:46:50 +0000 (UTC) Date: Mon, 24 May 2021 13:46:50 -0600 From: Alex Williamson To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, kernel test robot , Cornelia Huck , kvm@vger.kernel.org, Jason Gunthorpe , Eric Auger Subject: Re: [PATCH] vfio/pci: zap_vma_ptes() needs MMU Message-ID: <20210524134650.01ed417b@x1.home.shazbot.org> In-Reply-To: <20210515190856.2130-1-rdunlap@infradead.org> References: <20210515190856.2130-1-rdunlap@infradead.org> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 15 May 2021 12:08:56 -0700 Randy Dunlap wrote: > zap_vma_ptes() is only available when CONFIG_MMU is set/enabled. > Without CONFIG_MMU, vfio_pci.o has build errors, so make > VFIO_PCI depend on MMU. > > riscv64-linux-ld: drivers/vfio/pci/vfio_pci.o: in function `vfio_pci_mmap_open': > vfio_pci.c:(.text+0x1ec): undefined reference to `zap_vma_ptes' > riscv64-linux-ld: drivers/vfio/pci/vfio_pci.o: in function `.L0 ': > vfio_pci.c:(.text+0x165c): undefined reference to `zap_vma_ptes' > > Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver") > Signed-off-by: Randy Dunlap > Reported-by: kernel test robot > Cc: Alex Williamson > Cc: Cornelia Huck > Cc: kvm@vger.kernel.org > Cc: Jason Gunthorpe > Cc: Eric Auger > --- > drivers/vfio/pci/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > --- linux-next-20210514.orig/drivers/vfio/pci/Kconfig > +++ linux-next-20210514/drivers/vfio/pci/Kconfig > @@ -2,6 +2,7 @@ > config VFIO_PCI > tristate "VFIO support for PCI devices" > depends on VFIO && PCI && EVENTFD > + depends on MMU > select VFIO_VIRQFD > select IRQ_BYPASS_MANAGER > help Yes, these !MMU configs are getting annoying and I don't know of any demand for vfio in them. I suspect we were ok with !MMU until 11c4cd07ba11 though, that's where we added zap_vma_ptes usage. I updated the Fixes: tag but I suspect either case would reach the same set of stable trees. Applied to vfio for-linus branch for v5.13. Thanks! Alex