RE: [iommufd 1/2] i915/gvt: Move kvmgt_protect_table_init() and gvt_cache_init() into init

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

 



> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> Sent: Friday, November 25, 2022 5:07 PM
> >
> > Current gvt internal cache is handled with .open_device()
> and .close_device() pair,
> > so those internal cache is now re-initialized for each device session, how is
> that
> > handled for iommufd? Looks that's missed in this patch..
> 
> you are right. I noticed below two helpers are used to destroy. However,
> the code seems to be more clear the internal cache. So seems no need to
> re-initialize. I'm no expert here. :)
> 
> gvt_cache_destroy()
> kvmgt_protect_table_destroy()
> 

It's common practice to have init in the probe path and then do the
housekeeping in the close path.

Re-init in every open is unnecessary.




[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