vfio: Add vfio_container_ioctl()

While most operations with VFIO IOMMU driver are generic and used inside
vfio.c, there are still some operations which only specific VFIO IOMMU
drivers implement. The first example of it will be reading a DMA window
start from the host.

This adds a helper which passes an ioctl request to the container's fd.

The helper will check if @req is known. For this, stub is added. This return
-1 on any requests for now.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Alexey Kardashevskiy 2014-06-10 15:39:22 +10:00 committed by Alexander Graf
parent 9bb62a0702
commit 6d8be4c343
2 changed files with 51 additions and 0 deletions

9
include/hw/misc/vfio.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef VFIO_API_H
#define VFIO_API_H
#include "qemu/typedefs.h"
extern int vfio_container_ioctl(AddressSpace *as, int32_t groupid,
int req, void *param);
#endif