On Wed, Aug 31, 2022 at 08:48:55AM +0000, Tian, Kevin wrote: > > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > > Sent: Wednesday, August 31, 2022 9:02 AM > > #ifdef CONFIG_VFIO_NOIOMMU > > -static bool noiommu __read_mostly; > > +static bool vfio_noiommu __read_mostly; > > module_param_named(enable_unsafe_noiommu_mode, > > - noiommu, bool, S_IRUGO | S_IWUSR); > > + vfio_noiommu, bool, S_IRUGO | S_IWUSR); > > MODULE_PARM_DESC(enable_unsafe_noiommu_mode, "Enable UNSAFE, > > no-IOMMU mode. This mode provides no device isolation, no DMA > > translation, no host kernel protection, cannot be used for device assignment > > to virtual machines, requires RAWIO permissions, and will taint the kernel. If > > you do not know what this is for, step away. (default: false)"); > > +#else > > +enum { vfio_noiommu = false }; > > #endif > > what is the benefit of enum here? It means we don't have to use #ifdef to protect references to vfio_noiommu. Do mean enum vs #define? I prefer generally prefer enums as they behave more like a variable. Jason