lkml.org 
[lkml]   [2021]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 14/29] drm/i915/gvt: devirtualize ->{get,put}_vfio_device
    On Tue, Nov 02, 2021 at 08:05:46AM +0100, Christoph Hellwig wrote:
    > Just open code the calls to the VFIO APIs.
    >
    > Signed-off-by: Christoph Hellwig <hch@lst.de>
    > drivers/gpu/drm/i915/gvt/dmabuf.c | 12 ++++++-----
    > drivers/gpu/drm/i915/gvt/hypercall.h | 2 --
    > drivers/gpu/drm/i915/gvt/kvmgt.c | 22 --------------------
    > drivers/gpu/drm/i915/gvt/mpt.h | 30 ----------------------------
    > 4 files changed, 7 insertions(+), 59 deletions(-)

    I suspect the use of get/put here is very questionable

    It only prevents the vfio_device from becoming unregistered, but the
    main thing a mdev should care about is if it is still beween
    opne_device() / close_device() - ie the FD is open, there is a SW
    IOMMU available, and memory pins can be made.

    Still, not for this patch

    Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

    Jason

    \
     
     \ /
      Last update: 2021-11-02 17:50    [W:3.977 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site