Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508869

RE: [PATCH v9 04/12] vfio iommu: Add support for mediated devices

From "Tian, Kevin" <kevin.tian@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH v9 04/12] vfio iommu: Add support for mediated devices
Date 2016-10-26 09:30 +0200
Message-ID <swqOS-pQ-3@gated-at.bofh.it> (permalink)
References <stnDQ-JF-5@gated-at.bofh.it> <stnDQ-JF-25@gated-at.bofh.it> <su6hA-6GV-13@gated-at.bofh.it> <surYJ-3VP-21@gated-at.bofh.it> <svDl8-1rO-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> From: Alex Williamson [mailto:alex.williamson@redhat.com]
> Sent: Monday, October 24, 2016 10:32 AM
> 
> > >> -static long vfio_unpin_pages(unsigned long pfn, long npage,
> > >> -			     int prot, bool do_accounting)
> > >> +static long __vfio_unpin_pages_remote(struct vfio_iommu *iommu,
> > >> +				      unsigned long pfn, long npage, int prot,
> > >> +				      bool do_accounting)
> > >
> > > Have you noticed that it's kind of confusing that
> > > __vfio_{un}pin_pages_remote() uses current, which does a
> > > get_user_pages_fast() while "local" uses a provided task_struct and
> > > uses get_user_pages_*remote*()?  And also what was effectively local
> > > (ie. we're pinning for our own use here) is now "remote" and pinning
> > > for a remote, vendor driver consumer, is now "local".  It's not very
> > > intuitive.
> > >

I questioned this confusing naming in v8 too...

> >
> > 'local' in local_domain was suggested to describe the domain for local
> > page tracking. Earlier suggestions to have 'mdev' or 'noimmu' in this
> > name were discarded. May be we should revisit what the name should be.
> > Any suggestion?
> >
> > For local_domain, to pin pages, flow is:
> >
> > for local_domain
> >     |- vfio_pin_pages()
> >         |- vfio_iommu_type1_pin_pages()
> >             |- __vfio_pin_page_local()
> >                 |-  vaddr_get_pfn(task->mm)
> >                     |- get_user_pages_remote()
> >
> > __vfio_pin_page_local() --> get_user_pages_remote()
> 
> 
> In vfio.c we have the concept of an external user, perhaps that could
> be continued here.  An mdev driver would be an external, or remote
> pinning.
> 

I prefer to use remote here. It's aligned with underlying mm operations

Thanks
Kevin

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v9 00/12] Add Mediated device support Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
  [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 10/12] vfio: Add function to get device_api string  from vfio_device_info.flags Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 21:40 +0200
      Re: [PATCH v9 10/12] vfio: Add function to get device_api string from  vfio_device_info.flags Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-20 22:40 +0200
        Re: [PATCH v9 10/12] vfio: Add function to get device_api string  from vfio_device_info.flags Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 23:10 +0200
          Re: [PATCH v9 10/12] vfio: Add function to get device_api string from  vfio_device_info.flags Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-20 23:20 +0200
            Re: [PATCH v9 10/12] vfio: Add function to get device_api string  from vfio_device_info.flags Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 23:30 +0200
              Re: [PATCH v9 10/12] vfio: Add function to get device_api string from  vfio_device_info.flags Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-21 05:10 +0200
                Re: [PATCH v9 10/12] vfio: Add function to get device_api string  from vfio_device_info.flags Alex Williamson <alex.williamson@redhat.com> - 2016-10-21 05:30 +0200
  [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    RE: [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices "Tian, Kevin" <kevin.tian@intel.com> - 2016-10-26 09:00 +0200
      Re: [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-26 17:10 +0200
  [PATCH v9 08/12] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare() Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
  [PATCH v9 11/12] docs: Add Documentation for Mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 11/12] docs: Add Documentation for Mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-25 18:20 +0200
  [PATCH v9 09/12] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare() Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
  [PATCH v9 04/12] vfio iommu: Add support for mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-19 23:10 +0200
      Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-20 22:20 +0200
        Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-24 04:40 +0200
          RE: [PATCH v9 04/12] vfio iommu: Add support for mediated devices "Tian, Kevin" <kevin.tian@intel.com> - 2016-10-26 09:30 +0200
            Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-26 17:10 +0200
      RE: [PATCH v9 04/12] vfio iommu: Add support for mediated devices "Tian, Kevin" <kevin.tian@intel.com> - 2016-10-26 10:00 +0200
        Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-26 17:30 +0200
      RE: [PATCH v9 04/12] vfio iommu: Add support for mediated devices "Tian, Kevin" <kevin.tian@intel.com> - 2016-10-26 10:00 +0200
        Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-26 17:20 +0200
    Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Jike Song <jike.song@intel.com> - 2016-10-21 10:00 +0200
      Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Alex Williamson <alex.williamson@redhat.com> - 2016-10-21 16:40 +0200
        Re: [PATCH v9 04/12] vfio iommu: Add support for mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-24 12:40 +0200
  [PATCH v9 06/12] vfio_pci: Update vfio_pci to use vfio_info_add_capability() Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 06/12] vfio_pci: Update vfio_pci to use  vfio_info_add_capability() Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 21:30 +0200
      Re: [PATCH v9 06/12] vfio_pci: Update vfio_pci to use  vfio_info_add_capability() Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-24 23:30 +0200
        Re: [PATCH v9 06/12] vfio_pci: Update vfio_pci to use  vfio_info_add_capability() Alex Williamson <alex.williamson@redhat.com> - 2016-10-24 23:40 +0200
  [PATCH v9 03/12] vfio: Rearrange functions to get vfio_group from dev Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 03/12] vfio: Rearrange functions to get vfio_group  from dev Alex Williamson <alex.williamson@redhat.com> - 2016-10-19 19:30 +0200
  [PATCH v9 05/12] vfio: Introduce common function to add capabilities Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 05/12] vfio: Introduce common function to add  capabilities Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 21:30 +0200
      Re: [PATCH v9 05/12] vfio: Introduce common function to add  capabilities Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-24 23:30 +0200
        Re: [PATCH v9 05/12] vfio: Introduce common function to add  capabilities Alex Williamson <alex.williamson@redhat.com> - 2016-10-24 23:40 +0200
  [PATCH v9 01/12] vfio: Mediated device Core driver Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-17 23:30 +0200
    Re: [PATCH v9 01/12] vfio: Mediated device Core driver Alex Williamson <alex.williamson@redhat.com> - 2016-10-19 01:20 +0200
      Re: [PATCH v9 01/12] vfio: Mediated device Core driver Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-19 21:20 +0200
        Re: [PATCH v9 01/12] vfio: Mediated device Core driver Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 00:30 +0200
    Re: [PATCH v9 01/12] vfio: Mediated device Core driver Jike Song <jike.song@intel.com> - 2016-10-20 09:30 +0200
      Re: [PATCH v9 01/12] vfio: Mediated device Core driver Alex Williamson <alex.williamson@redhat.com> - 2016-10-20 19:20 +0200
        Re: [PATCH v9 01/12] vfio: Mediated device Core driver Jike Song <jike.song@intel.com> - 2016-10-21 04:50 +0200
    RE: [PATCH v9 01/12] vfio: Mediated device Core driver "Tian, Kevin" <kevin.tian@intel.com> - 2016-10-26 09:00 +0200
      Re: [PATCH v9 01/12] vfio: Mediated device Core driver Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-26 17:00 +0200
  Re: [PATCH v9 00/12] Add Mediated device support Alex Williamson <alex.williamson@redhat.com> - 2016-10-17 23:50 +0200
  Re: [PATCH v9 12/12] docs: Sample driver to demonstrate how to use  Mediated device framework. Alex Williamson <alex.williamson@redhat.com> - 2016-10-18 19:20 +0200
    Re: [PATCH v9 12/12] docs: Sample driver to demonstrate how to use  Mediated device framework. Kirti Wankhede <kwankhede@nvidia.com> - 2016-10-19 21:20 +0200
  Re: [PATCH v9 00/12] Add Mediated device support Jike Song <jike.song@intel.com> - 2016-10-24 09:20 +0200

csiph-web