Re: [PATCH v5 06/13] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2024 at 11:24:10AM +0800, Zhangfei Gao wrote:

> > +/**
> > + * iommufd_viommu_alloc_hwpt_nested() - Get a hwpt_nested for a vIOMMU
> > + * @viommu: vIOMMU ojbect to associate the hwpt_nested/domain with
> > + * @user_data: user_data pointer. Must be valid
> > + *
> > + * Allocate a new IOMMU_DOMAIN_NESTED for a vIOMMU and return it as a NESTED
> > + * hw_pagetable.
> > + */
> > +static struct iommufd_hwpt_nested *
> > +iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags,
> > +                                const struct iommu_user_data *user_data)
> > +{
> > +       struct iommufd_hwpt_nested *hwpt_nested;
> > +       struct iommufd_hw_pagetable *hwpt;
> > +       int rc;
> > +
> > +       if (flags)
> > +               return ERR_PTR(-EOPNOTSUPP);
> 
> This check should be removed.
> 
> When a user page fault is required, IOMMU_HWPT_FAULT_ID_VALID is set.
> if (cmd->flags & IOMMU_HWPT_FAULT_ID_VALID) {

It can't just be removed..

I suspect that IOMMU_HWPT_FAULT_ID_VALID should not be set on the
nested domain but on the parent?

Jason




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux