mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
vfio: fix documentation
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
5c6c2b21ec
commit
b0e59b85ab
@ -172,12 +172,12 @@ group and can access them as follows:
|
||||
struct vfio_device_info device_info = { .argsz = sizeof(device_info) };
|
||||
|
||||
/* Create a new container */
|
||||
container = open("/dev/vfio/vfio, O_RDWR);
|
||||
container = open("/dev/vfio/vfio", O_RDWR);
|
||||
|
||||
if (ioctl(container, VFIO_GET_API_VERSION) != VFIO_API_VERSION)
|
||||
/* Unknown API version */
|
||||
|
||||
if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_X86_IOMMU))
|
||||
if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU))
|
||||
/* Doesn't support the IOMMU driver we want. */
|
||||
|
||||
/* Open the group */
|
||||
@ -193,7 +193,7 @@ group and can access them as follows:
|
||||
ioctl(group, VFIO_GROUP_SET_CONTAINER, &container);
|
||||
|
||||
/* Enable the IOMMU model we want */
|
||||
ioctl(container, VFIO_SET_IOMMU, VFIO_X86_IOMMU)
|
||||
ioctl(container, VFIO_SET_IOMMU, VFIO_TYPE1_IOMMU)
|
||||
|
||||
/* Get addition IOMMU info */
|
||||
ioctl(container, VFIO_IOMMU_GET_INFO, &iommu_info);
|
||||
|
Loading…
Reference in New Issue
Block a user