mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
vfio Updates for v3.11
Largely hugepage support for vfio/type1 iommu and surrounding cleanups and fixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQIcBAABAgAGBQJR2uNvAAoJECObm247sIsiJRYQAJK15MfXgJq2PtBABNvFUAOG nqUvLgBgM5Ow1NI0Rzh9jkNohNqCvXDFGaWXXnsaX83hIpi59GFK31W2E3SiFCj3 xISA9SUnm7Kjt9LAF6HTNz805zBkshIOk4MCx6HlezVWSRlWwT3rZzI4dI2fMvl8 iPRk1Ion3QSQui99HWfXv/rtezAIzgZqsFqPC6DjWRfN7LcdEtKtcQwnrSb5GGY9 3TIRY9IRYTSfJ2yjSz5f5258JxoDG5sR8dTMkgG2Gm92iGvGcPGpzQWPzVc4t+TO PdTqtv9ftEyAJKsYTFjPIod8XbzJBa1FSPadVAIfwF0JCDcsSFjoWGp+RzMQQSF8 MK3VsnQ/pqJfs2nJHDQbWbKu0qWYPntvOCdojZ4679ceDTd0t515npfYeDQuX8yU fAA5rB46mDXjyxikTP574NdnkcGjbAj7EOCp7s+WTsVPGQQ3mId/3fQw0Wg7bE6v jaJqdRj70SNTRHs8DFLQhvSZgpef4RzepE4sRBZqzY4vWd4riNcAC3Got+F2rQy3 X4hcHHU/5LGLoGMxOJQmuBfKVM8RAgikq6w2RfttVMLeKCknKtJ29OnotKilvILh W8nAOGxRnkmONFfHakNJtLl5tQJ4FQXc2cG8OeIIhHgheJjUxL72/zv8bBxOo7rY jUBjtZ5riQXc/ck4FEGI =9+Jh -----END PGP SIGNATURE----- Merge tag 'vfio-v3.11' of git://github.com/awilliam/linux-vfio Pull vfio updates from Alex Williamson: "Largely hugepage support for vfio/type1 iommu and surrounding cleanups and fixes" * tag 'vfio-v3.11' of git://github.com/awilliam/linux-vfio: vfio/type1: Fix leak on error path vfio: Limit group opens vfio/type1: Fix missed frees and zero sized removes vfio: fix documentation vfio: Provide module option to disable vfio_iommu_type1 hugepage support vfio: hugepage support for vfio_iommu_type1 vfio: Convert type1 iommu to use rbtree
This commit is contained in:
commit
15a49b9a90
4 changed files with 424 additions and 230 deletions
|
|
@ -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 a new issue