kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio/pci: zap_vma_ptes() needs MMU
@ 2021-05-15 19:08 Randy Dunlap
  2021-05-24 19:46 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-05-15 19:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Alex Williamson, Cornelia Huck,
	kvm, Jason Gunthorpe, Eric Auger

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 <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: kvm@vger.kernel.org
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Eric Auger <eric.auger@redhat.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfio/pci: zap_vma_ptes() needs MMU
  2021-05-15 19:08 [PATCH] vfio/pci: zap_vma_ptes() needs MMU Randy Dunlap
@ 2021-05-24 19:46 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2021-05-24 19:46 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Cornelia Huck, kvm,
	Jason Gunthorpe, Eric Auger

On Sat, 15 May 2021 12:08:56 -0700
Randy Dunlap <rdunlap@infradead.org> 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 <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: Jason Gunthorpe <jgg@nvidia.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-24 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 19:08 [PATCH] vfio/pci: zap_vma_ptes() needs MMU Randy Dunlap
2021-05-24 19:46 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).