VFIO fixes for v4.10
- Fix regression in attaching groups to existing container for SPAPR IOMMU backend (Alexey Kardashevskiy) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJYnIsVAAoJECObm247sIsiv7kP/iRZRv46IqmIL4ynKKJL44Bl Oz2NO5EPvyb56yE0JZY+Em46yQYsQDuMSNOnuQC7FXKrmrmRj/rD0wPIa344umtZ /wxJ1aruR37UJjbYHkXGfZ89F/D7ahiZsAyT95t7LIGKNOwALS2JGBZbpnHxArFL SjOs4E8lDZCwBHwWJWYs3JQjPU/VrvCPMiULKaADDzw6sRWvFV+Xpk9uJnJpGMPD ggVnSzASFYd3jZjOS8p2YM14m8yudMdYDu112fWHefi0znXL7QgfxnOHD8vRhwYu zNOAP8qKW4MvMlHXh0hXWiT8fBQ86GUydBhTtc/Cd7UqJEhmjtununEQhJxyfOJw +XSjBjfdTSoQdFEe4XgReFbTntCK6PiiLza9kZ5mEArgUKOl5hkxml1el3PkPZrO Efukr0b06ZdJWNKkR4OkFkW7c/WVXeFcuW1FhVQf3OBZOoT9ev4VlAXitK/l1+dl s54HP0mpxrOlkYwJsWzA8NKzB8cQcvaMs4loo6YzR5hJ8IOPxBc+jVjjqAz+H72Z S7bP6ilTuxWiPQy0s4k3vLoDWaAwWJ9GxjR0Yd+tmG+TafVNPiUr9ZmBQNaCjIjH 2/hX9CDiAQs5vHYk8R+HgdFNvD2ntH8KD9DQnqnXhZsnCXYGcai9Boja/9jUxGK1 uELj3AYYa4FubZiSWnMl =iCg7 -----END PGP SIGNATURE----- Merge tag 'vfio-v4.10-final' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "Fix regression in attaching groups to existing container for SPAPR IOMMU backend (Alexey Kardashevskiy)" * tag 'vfio-v4.10-final' of git://github.com/awilliam/linux-vfio: vfio/spapr_tce: Set window when adding additional groups to container
This commit is contained in:
commit
189addce85
|
@ -1245,6 +1245,8 @@ static void tce_iommu_release_ownership_ddw(struct tce_container *container,
|
|||
static long tce_iommu_take_ownership_ddw(struct tce_container *container,
|
||||
struct iommu_table_group *table_group)
|
||||
{
|
||||
long i, ret = 0;
|
||||
|
||||
if (!table_group->ops->create_table || !table_group->ops->set_window ||
|
||||
!table_group->ops->release_ownership) {
|
||||
WARN_ON_ONCE(1);
|
||||
|
@ -1253,7 +1255,27 @@ static long tce_iommu_take_ownership_ddw(struct tce_container *container,
|
|||
|
||||
table_group->ops->take_ownership(table_group);
|
||||
|
||||
/* Set all windows to the new group */
|
||||
for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) {
|
||||
struct iommu_table *tbl = container->tables[i];
|
||||
|
||||
if (!tbl)
|
||||
continue;
|
||||
|
||||
ret = table_group->ops->set_window(table_group, i, tbl);
|
||||
if (ret)
|
||||
goto release_exit;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
release_exit:
|
||||
for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i)
|
||||
table_group->ops->unset_window(table_group, i);
|
||||
|
||||
table_group->ops->release_ownership(table_group);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tce_iommu_attach_group(void *iommu_data,
|
||||
|
|
Loading…
Reference in New Issue