All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.11.y, 5.10.y, 5.4.y] vfio: Depend on MMU
@ 2021-05-06 20:47 Alex Williamson
  2021-05-06 21:10 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2021-05-06 20:47 UTC (permalink / raw)
  To: gregkh, stable; +Cc: linux-kernel, jgg

From: Jason Gunthorpe <jgg@nvidia.com>

commit b2b12db53507bc97d96f6b7cb279e831e5eafb00 upstream

VFIO_IOMMU_TYPE1 does not compile with !MMU:

../drivers/vfio/vfio_iommu_type1.c: In function 'follow_fault_pfn':
../drivers/vfio/vfio_iommu_type1.c:536:22: error: implicit declaration of function 'pte_write'; did you mean 'vfs_write'? [-Werror=implicit-function-declaration]

So require it.

Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <0-v1-02cb5500df6e+78-vfio_no_mmu_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@vger.kernel.org # 5.11.y, 5.10.y, 5.4.y
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

The noted stable branches include upstream commit 179209fa1270
("vfio: IOMMU_API should be selected") without the follow-up commit
b2b12db53507 ("vfio: Depend on MMU"), which should have included a
Fixes: tag for the prior commit.  Without this latter commit, we're
susceptible to randconfig failures with !MMU configs.  Thanks!

 drivers/vfio/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
index 90c0525b1e0c..67d0bf4efa16 100644
--- a/drivers/vfio/Kconfig
+++ b/drivers/vfio/Kconfig
@@ -22,7 +22,7 @@ config VFIO_VIRQFD
 menuconfig VFIO
 	tristate "VFIO Non-Privileged userspace driver framework"
 	select IOMMU_API
-	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64)
+	select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64)
 	help
 	  VFIO provides a framework for secure userspace device drivers.
 	  See Documentation/driver-api/vfio.rst for more details.



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

* Re: [PATCH 5.11.y, 5.10.y, 5.4.y] vfio: Depend on MMU
  2021-05-06 20:47 [PATCH 5.11.y, 5.10.y, 5.4.y] vfio: Depend on MMU Alex Williamson
@ 2021-05-06 21:10 ` Jason Gunthorpe
  2021-05-07  5:49   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2021-05-06 21:10 UTC (permalink / raw)
  To: Alex Williamson; +Cc: gregkh, stable, linux-kernel

On Thu, May 06, 2021 at 02:47:51PM -0600, Alex Williamson wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
> 
> commit b2b12db53507bc97d96f6b7cb279e831e5eafb00 upstream
> 
> VFIO_IOMMU_TYPE1 does not compile with !MMU:
> 
> ../drivers/vfio/vfio_iommu_type1.c: In function 'follow_fault_pfn':
> ../drivers/vfio/vfio_iommu_type1.c:536:22: error: implicit declaration of function 'pte_write'; did you mean 'vfs_write'? [-Werror=implicit-function-declaration]
> 
> So require it.
> 
> Suggested-by: Cornelia Huck <cohuck@redhat.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Message-Id: <0-v1-02cb5500df6e+78-vfio_no_mmu_jgg@nvidia.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: stable@vger.kernel.org # 5.11.y, 5.10.y, 5.4.y
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> 
> The noted stable branches include upstream commit 179209fa1270
> ("vfio: IOMMU_API should be selected") without the follow-up commit
> b2b12db53507 ("vfio: Depend on MMU"), which should have included a
> Fixes: tag for the prior commit.  Without this latter commit, we're
> susceptible to randconfig failures with !MMU configs.  Thanks!

Right. It would also be a fine solution to not include '1792 in any
stable branches either

Jason

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

* Re: [PATCH 5.11.y, 5.10.y, 5.4.y] vfio: Depend on MMU
  2021-05-06 21:10 ` Jason Gunthorpe
@ 2021-05-07  5:49   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-05-07  5:49 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: Alex Williamson, stable, linux-kernel

On Thu, May 06, 2021 at 06:10:53PM -0300, Jason Gunthorpe wrote:
> On Thu, May 06, 2021 at 02:47:51PM -0600, Alex Williamson wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > 
> > commit b2b12db53507bc97d96f6b7cb279e831e5eafb00 upstream
> > 
> > VFIO_IOMMU_TYPE1 does not compile with !MMU:
> > 
> > ../drivers/vfio/vfio_iommu_type1.c: In function 'follow_fault_pfn':
> > ../drivers/vfio/vfio_iommu_type1.c:536:22: error: implicit declaration of function 'pte_write'; did you mean 'vfs_write'? [-Werror=implicit-function-declaration]
> > 
> > So require it.
> > 
> > Suggested-by: Cornelia Huck <cohuck@redhat.com>
> > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> > Message-Id: <0-v1-02cb5500df6e+78-vfio_no_mmu_jgg@nvidia.com>
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > Cc: stable@vger.kernel.org # 5.11.y, 5.10.y, 5.4.y
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > 
> > The noted stable branches include upstream commit 179209fa1270
> > ("vfio: IOMMU_API should be selected") without the follow-up commit
> > b2b12db53507 ("vfio: Depend on MMU"), which should have included a
> > Fixes: tag for the prior commit.  Without this latter commit, we're
> > susceptible to randconfig failures with !MMU configs.  Thanks!
> 
> Right. It would also be a fine solution to not include '1792 in any
> stable branches either

It's already in released versions, so I'll just queue up this fix now as
well.

thanks,

greg k-h

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

end of thread, other threads:[~2021-05-07  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 20:47 [PATCH 5.11.y, 5.10.y, 5.4.y] vfio: Depend on MMU Alex Williamson
2021-05-06 21:10 ` Jason Gunthorpe
2021-05-07  5:49   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.