lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 09/17] iommufd/device: Add helpers to enforce/remove device reserved regions
    > @@ -444,10 +465,9 @@ iommufd_device_do_replace(struct iommufd_device *idev,
    > }
    >
    > old_hwpt = igroup->hwpt;
    > - if (hwpt->ioas != old_hwpt->ioas) {
    > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt)) {
    > list_for_each_entry(cur, &igroup->device_list, group_item) {
    > - rc = iopt_table_enforce_dev_resv_regions(
    > - &hwpt->ioas->iopt, cur->dev, NULL);
    > + rc = iommufd_device_enforce_rr(cur, hwpt, NULL);
    > if (rc)
    > goto err_unresv;
    > }
    > @@ -461,12 +481,10 @@ iommufd_device_do_replace(struct iommufd_device *idev,
    > if (rc)
    > goto err_unresv;
    >
    > - if (hwpt->ioas != old_hwpt->ioas) {
    > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt)) {
    > list_for_each_entry(cur, &igroup->device_list, group_item)
    > - iopt_remove_reserved_iova(&old_hwpt->ioas->iopt,
    > - cur->dev);
    > + iommufd_device_remove_rr(cur, hwpt);
    Should be "iommufd_device_remove_rr(cur, old_hwpt);"

    > }
    > -
    > igroup->hwpt = hwpt;
    >
    > /*


    \
     
     \ /
      Last update: 2023-10-07 09:49    [W:4.895 / U:0.560 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site