Re: [PATCH v2] vfio: Support VFIO_NOIOMMU with iommufd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 17, 2023 at 03:02:56PM -0700, Alex Williamson wrote:
> > diff --git a/drivers/vfio/group.c b/drivers/vfio/group.c
> > index bb24b2f0271e03..e166ad7ce6e755 100644
> > --- a/drivers/vfio/group.c
> > +++ b/drivers/vfio/group.c
> > @@ -133,9 +133,12 @@ static int vfio_group_ioctl_set_container(struct vfio_group *group,
> >  
> >  	iommufd = iommufd_ctx_from_file(f.file);
> >  	if (!IS_ERR(iommufd)) {
> > -		u32 ioas_id;
> > +		if (IS_ENABLED(CONFIG_VFIO_NOIOMMU) &&
> > +		    group->type == VFIO_NO_IOMMU)
> 
> 
> We can't have type == VFIO_NO_IOMMU without CONFIG_VFIO_NOIOMMU in any
> of these cases, so I'm assuming the IS_ENABLED() is just a
> micro-optimization for the compiler here.  It's repeated enough that
> maybe it deserves a macro though.  Thanks,

Yes, I put it in an inline for Yi

And did the other stuff

Thanks,
Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux