Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
vfio.h File Reference
#include <linux/iommu.h>
#include <linux/mm.h>
#include <uapi/linux/vfio.h>

Go to the source code of this file.

Data Structures

struct  vfio_device_ops
 
struct  vfio_iommu_driver_ops
 

Macros

#define offsetofend(TYPE, MEMBER)
 

Functions

int vfio_add_group_dev (struct device *dev, const struct vfio_device_ops *ops, void *device_data)
 
voidvfio_del_group_dev (struct device *dev)
 
int vfio_register_iommu_driver (const struct vfio_iommu_driver_ops *ops)
 
void vfio_unregister_iommu_driver (const struct vfio_iommu_driver_ops *ops)
 

Macro Definition Documentation

#define offsetofend (   TYPE,
  MEMBER 
)
Value:
({ \
TYPE tmp; \
offsetof(TYPE, MEMBER) + sizeof(tmp.MEMBER); }) \

offsetofend(TYPE, MEMBER)

: The type of the structure : The member within the structure to get the end offset of

Simple helper macro for dealing with variable sized structures passed from user space. This allows us to easily determine if the provided structure is sized to include various fields.

Definition at line 86 of file vfio.h.

Function Documentation

int vfio_add_group_dev ( struct device dev,
const struct vfio_device_ops ops,
void device_data 
)

VFIO driver API

Definition at line 597 of file vfio.c.

void* vfio_del_group_dev ( struct device dev)

Definition at line 678 of file vfio.c.

int vfio_register_iommu_driver ( const struct vfio_iommu_driver_ops ops)

IOMMU driver registration

Definition at line 91 of file vfio.c.

void vfio_unregister_iommu_driver ( const struct vfio_iommu_driver_ops ops)

Definition at line 120 of file vfio.c.