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


Groups > linux.kernel > #1397142

Re: VFIO MSIX Query

From Alex Williamson <alex.williamson@redhat.com>
Newsgroups linux.kernel
Subject Re: VFIO MSIX Query
Date 2016-05-09 17:30 +0200
Message-ID <rwVi9-8if-3@gated-at.bofh.it> (permalink)
References <ruONP-6p2-9@gated-at.bofh.it> <ruONP-6p2-7@gated-at.bofh.it> <rwcO7-46p-31@gated-at.bofh.it> <rwmaK-4td-3@gated-at.bofh.it> <rwVi9-8if-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 8 May 2016 20:45:10 +0530
Nitin Saxena <nitin.lnx@gmail.com> wrote:

> Hi Alex,
> 
> Thanks for your answer. I got the point that all access to device must be
> VFIO.
> I have few more questions.
> 
> >> When the device is initially opened via the VFIO_GET_DEVICE_FD ioctl, we  
> go through an initialization sequence on the device, including a device
> reset
> Does this mean only one process (primary in multiprocess app) can only
> perform VFIO_GROUP_GET_DEVICE_FD ioctl ? which I doubt as I saw in dpdk
> that each process (regardless primary or not) does VFIO_GROUP_GET_DEVICE_FD
> ioctl. Kindly confirm.

Users can call GET_DEVICE_FD multiple times, but note that the group
file descriptor can only be opened once, so you'd need to pass
device file descriptors off to other threads.

> >> Use VFIO for all access to the device or don't use VFIO at all.  
> I will map PCI BARS via VFIO but what about hugepages for each process.
> Since I am using VFIO_NOIOMMU do I need to call VFIO_IOMMU_MAP_DMA ioctl
> for each hugepage of each process? I think this is not needed in my case.
> Please confirm.

No-IOMMU mode does not have MAP_DMA or UNMAP_DMA ioctls.  If you want
to support a safe operating mode, with an IOMMU providing DMA
isolation, then yes, you would need to map DMA targets for the device
using those ioctls for the type1 IOMMU backend.

> Can you please also confirm about the patch I attached. Is there any thing
> missing in the patch that I needed to incorporate from kernel 4.5 to make
> VFO NOIOMMU work? Patch

I can't confirm or deny whether the backport is accurate.  Thanks,

Alex

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


Thread

Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-03 22:10 +0200
  Re: VFIO MSIX Query "Saxena, Nitin" <Nitin.Saxena@caviumnetworks.com> - 2016-05-04 04:50 +0200
  Fwd: VFIO MSIX Query Nitin Saxena <nitin.lnx@gmail.com> - 2016-05-07 18:00 +0200
  Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-08 04:00 +0200
    Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-09 17:30 +0200

csiph-web