lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 1/3] docs: IOMMU user API
Date
> From: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Sent: Tuesday, June 16, 2020 11:22 PM
>
> On Thu, 11 Jun 2020 17:27:27 -0700
> Jacob Pan <jacob.jun.pan@linux.intel.com> wrote:
>
> > >
> > > But then I thought it even better if VFIO leaves the entire
> > > copy_from_user() to the layer consuming it.
> > >
> > OK. Sounds good, that was what Kevin suggested also. I just wasn't
> > sure how much VFIO wants to inspect, I thought VFIO layer wanted to do
> > a sanity check.
> >
> > Anyway, I will move copy_from_user to iommu uapi layer.
>
> Just one more point brought up by Yi when we discuss this offline.
>
> If we move copy_from_user to iommu uapi layer, then there will be multiple
> copy_from_user calls for the same data when a VFIO container has multiple domains,
> devices. For bind, it might be OK. But might be additional overhead for TLB flush
> request from the guest.

I think it is the same with bind and TLB flush path. will be multiple
copy_from_user.

BTW. for moving data copy to iommy layer, there is another point which
need to consider. VFIO needs to do unbind in bind path if bind failed,
so it will assemble unbind_data and pass to iommu layer. If iommu layer
do the copy_from_user, I think it will be failed. any idea?

Regards,
Yi Liu

> Thoughts?
>
> Jacob

\
 
 \ /
  Last update: 2020-06-17 08:21    [W:0.130 / U:1.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site