Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • bpf-spectre default protected
  • vf-baseline
  • bpf-spectre-baseline
  • pkt-ptr-revert-v1
  • v6.5-rc6-bpf-spectre-nospec
  • spectector-bpf
  • bpftask protected
  • bpftask-no-unused-args
  • bpftask-master
  • v5.9-bpftask
  • v5.8-amd-17h-em protected
  • v5.8-amd-17h-eas protected
  • freqinv-amd3950x-v5.8
  • v5.8-scale-inv-acc-amd-ryzen-3950x
  • 23186e43-amd-17h-eas protected
  • caffb99b6929-perf-x86-rapl-Enable-RAPL-for-AMD-Fam17h
  • 6a9ee74800a1-amd-17h-eas protected
  • add2fae34926-amd_17h_em
  • 3643c88e5545-Add-support-for-frequency-invariance-for-some-x86
  • v5.7-rc6
21 results

vfio-mdev

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Jason Gunthorpe authored and Alex Williamson committed
    Many of the mdev drivers use a simple counter for keeping track of the
    available instances. Move this code to the core code and store the counter
    in the mdev_parent. Implement it using correct locking, fixing mdpy.
    
    Drivers just provide the value in the mdev_driver at registration time
    and the core code takes care of maintaining it and exposing the value in
    sysfs.
    
    [hch: count instances per-parent instead of per-type, use an atomic_t
     to avoid taking mdev_list_lock in the show method]
    
    Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
    Reviewed-by: default avatarKirti Wankhede <kwankhede@nvidia.com>
    Reviewed-by: default avatarEric Farman <farman@linux.ibm.com>
    Link: https://lore.kernel.org/r/20220923092652.100656-15-hch@lst.de
    
    
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    9c799c22
    History