Re: [PATCH] vfio: Add "#ifdef CONFIG_MMU" for vma operations

From: Alex Williamson
Date: Tue Jul 27 2021 - 14:01:25 EST


On Tue, 27 Jul 2021 18:35:14 +0200
Cornelia Huck <cohuck@xxxxxxxxxx> wrote:

> On Tue, Jul 27 2021, Cai Huoqing <caihuoqing@xxxxxxxxx> wrote:
>
> > Add "#ifdef CONFIG_MMU",
> > because vma mmap and vm_operations_struct depend on MMU
>
> vfio_pci already depends on MMU -- what problems are you trying to fix?

Exactly my question, we silenced the randconfig builds without
CONFIG_MMU in commit 2a55ca373501 ("vfio/pci: zap_vma_ptes() needs
MMU"). Surely there are prototypes for vma_area_struct regardless of
CONFIG_MMU and vfio-core having an mmap callback has no dependency on
vm_operations_struct. Thanks,

Alex