lkml.org 
[lkml]   [2023]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH v6 8/8] iommu/vt-d: Disallow read-only mappings to nest parent domain
    Date
    > From: Baolu Lu <baolu.lu@linux.intel.com>
    > Sent: Monday, October 23, 2023 8:18 PM
    >
    > On 2023/10/23 19:15, Liu, Yi L wrote:
    > >> I would also prefer to introduce is_nested_parent_domain to the user
    > >> domain allocation patch (patch 7/8). This field should be checked when
    > >> allocating a nested user domain.
    > > A ctually, no need. This should be a common check, so iommufd core already
    > > has the check. So the parent should be a nest parent domain, otherwise already
    > > returned in iommufd.
    > >
    > > + if (!parent->nest_parent)
    > > + return ERR_PTR(-EINVAL);
    >
    > I know this will not cause errors in the code. But since you are
    > introducing is_parent property in the vt-d driver. The integrity of the
    > property should be ensured. In this way, it will make the code more
    > readable and maintainable.

    Ok, if consider it as a property, then it's fine. At first, I just want to
    make it as a special flag for this errata. But we cannot predict if there
    will be more nested parent special stuffs, then this flag is also needed.

    Regards,
    Yi Liu
    \
     
     \ /
      Last update: 2023-10-24 04:07    [W:2.505 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site