Browse Prior Art Database

An invention that enables VFIO with multiple address translation methods support

IP.com Disclosure Number: IPCOM000245678D
Publication Date: 2016-Mar-30
Document File: 7 page(s) / 165K

Publishing Venue

The IP.com Prior Art Database

Abstract

This invention abstracts a minimal set of interfaces that covers all of the Linux IOMMU APIs called by VFIO, to offer method of address translation to fulfill VFIO requirements. Any kind of new device, even for that who does not have an IOMMU support, you want to use under the VFIO framework, could realize this interface set independently, to have its own address translation method.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 49% of the total text.

Page 01 of 7

An invention that enables VFIO with multiple address translation methods support


1.Backgroud
"The VFIO driver is an IOMMU/device agnostic framework for exposing direct device access to userspace, in a secure, IOMMU

protected environment. In other words, this allows safe, non-privileged, userspace drivers."

For more information about vfio, vfio-iommu-drvier and vfio-device, see:
https://www.kernel.org/doc/Documentation/vfio.txt
It's a trend to use VFIO under Linux to realize userspace drivers for devices. However, VFIO has absolute dependencies on the

IOMMU APIs, and only support devices with IOMMU functions. For those devices who have no IOMMU support, users currently cann't rely on VFIO.

2.Summary of Invention
This invention abstracts a minimal set of interfaces that covers all of the Linux IOMMU APIs called by VFIO, to offer method of address translation to fulfill VFIO requirements. Any kind of new device, even for that who does not have an IOMMU support, you

want to use under the VFIO framework, could realize this interface set independently, to have its own address translation method. Currently the VFIO implementation only supports PCI device with IOMMU as its translation method. All parts of it call IOMMU API in a direct way.

1

-- Definition of VFIO.



Page 02 of 7

VFIO dependents on IOMMU API absolutely.

This invention will bring VFIO the possibility to support more kinds of devices with different (against IOMMU) address translation methods.

3.Description
This invention abstracts a minimal set of interfaces that covers all of the Linux IOMMU APIs called by VFIO. The set contents 9(can be introduced more in future by demand) interfaces, namely: 1. get
Return the group for a device and increment reference.


2. put

2


Page 03 of 7

   Decrement group reference. 3. id
Return ID for a group.

4. for_each_dev
Iterate over each device in the group

5. reg_notifier
Register a notifier for group changes.

6. unreg_notifier Unregister a notifier.

7. notifier
Notifier to be registered.


8. map

  Address map method.
9. unmap

Address unmap method.

The first seven interfaces could be used to initialize vfio_iommu_api instance. While the last two interfaces could provide core

3


Page 04 of 7

address translation methods for vfio_iommu_driver.

The current version of VFIO has an absolute dependency relation with IOMMU driver, because VFIO calls IOMMU APIs directly.

The abstract of the minimal interface set helps to remove this dependency .

This invention introduces a data structure named vfio_iommu_api to maintain the interface set. For every new created vfio_group, the new program will attach a vfio_iommu_api instance with it. In the places, where VFIO calls IOMMU API, VFIO now calls the interfaces provided by the api instance.

For the reason that the minimal interface set covers the IOMMU APIs used by VFIO, VFIO device could define a vfio_iommu_api instance by initializing it with the corresponding IOMMU APIs. All the vfio-devices those added to a vfio_group, woul...