Re: [PATCH] x86/iommu: Fix two minimal issues in check_iommu_entries()

From: Zhenzhong Duan
Date: Mon Jan 04 2021 - 00:45:03 EST


On Wed, Dec 30, 2020 at 3:02 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Wed, Dec 23, 2020 at 02:24:12PM +0800, Zhenzhong Duan wrote:
> > check_iommu_entries() checks for cyclic dependency in iommu entries
> > and fixes the cyclic dependency by setting x->depend to NULL. But
> > this repairing isn't correct if q is in front of p, there will be
> > "EXECUTION ORDER INVALID!" report following. Fix it by NULLing
> > whichever in the front.
>
> When does "q is in front of p" happen? How does it happen?

Sorry, just realized it never happen.
>
> > The second issue is about the report of exectuion order reverse,
> > the order is reversed incorrectly in the report, fix it.
>
> I have no clue what that means.

I mean if p depends on q, then q->detect should be called before p->detect.
The message generated by printk() is wrong.

Regards
Zhenzhong