Re: [PATCH 7/7] vfio/pci: Remove map-on-fault behavior

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

 



On Tue, Aug 10, 2021 at 03:45:12PM -0600, Alex Williamson wrote:
> On Tue, 10 Aug 2021 16:54:19 -0400
> Peter Xu <peterx@xxxxxxxxxx> wrote:
> 
> > On Thu, Aug 05, 2021 at 11:08:21AM -0600, Alex Williamson wrote:
> > > diff --git a/drivers/vfio/pci/vfio_pci_private.h b/drivers/vfio/pci/vfio_pci_private.h
> > > index 0aa542fa1e26..9aedb78a4ae3 100644
> > > --- a/drivers/vfio/pci/vfio_pci_private.h
> > > +++ b/drivers/vfio/pci/vfio_pci_private.h
> > > @@ -128,6 +128,7 @@ struct vfio_pci_device {
> > >  	bool			needs_reset;
> > >  	bool			nointx;
> > >  	bool			needs_pm_restore;
> > > +	bool			zapped_bars;  
> > 
> > Would it be nicer to invert the meaning of "zapped_bars" and rename it to
> > "memory_enabled"?  Thanks,
> 
> I think this has it's own down sides, for example is this really less
> confusing?:
> 
>   if (!vdev->memory_enabled && __vfio_pci_memory_enabled(vdev))

Maybe "memory_enabled_last"?  No strong opinion, especially for namings. :)
zapped_bars still looks okay to me.  Thanks,

-- 
Peter Xu




[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