Received: by 2002:a05:6a10:d593:0:0:0:0 with SMTP id gn19csp1325317pxb; Wed, 6 Jan 2021 18:54:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrnvcXHrdsSpw3RRQ1A50fDpCUamQ8Knc19CVkRphb1/sL6h2h6g3yJXVw1Qeh27G8SN8O X-Received: by 2002:a17:906:7f10:: with SMTP id d16mr4845268ejr.104.1609988057524; Wed, 06 Jan 2021 18:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609988057; cv=none; d=google.com; s=arc-20160816; b=x1O+84qNnkYywHualEjN2fg6rOIlGyNqneW/iM3OGRa0dQRIPOC64AGdrrLSBsts1j 5yEbFwUx2eWFevWxn+XN31fIZWjy+bnKPNZUgz3wDTlQHnhvcSqY+Y2WAQjIbTul/2hX Eu27WWWrOMrUqsu7ozDpS5qgzLLHa8argejPLSU8ymY+9JcSg+rAl76outrGn6DL37pq gktehcnJRGLsM/02TyBU9HMC2PGMmAYqyRkLIWfb8BzdG1AMSiCloExmMxmwvzjcEnY2 m958MYImzBLnVpfn6E3TgnRmb7Mjt4C9BdeZ5UtTNCcpcDAm4c1+2TeAhYRXfmzjLjMn rBOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8LO5/Phbq28+31YDa1UZ1eQndglIwHyPOPdAo8T96Wc=; b=Q2nMtOYqNByzG3yydOH/fQS2PJYUgG8lL3ShgEXpY+b/IUy+7o5JZLdiHdppv1p0E6 Dgr0Vqwz0gBu3W4R9CPeHbkonROzJBAQCdll3tAIFDVqoV0yFPgnto96DSuW6j+yBXLD Y93h+d2S2Ru3xuNVPsUtYrxd0WrKjrBmb4bNB0ZmwviwTX+leqI3ulA/i7Ke4aqBAD86 1Ag2KROsJSg70Vqdmh+UHjL2uKNw7Nkwa+IXVc4U5H7WOsOKEoftNxqZEYdLh7xE7sH4 V+aoxCDaWvaPe7u3/WF485NqA+Pq5AfSd+9+bAIIpAmMIN5T7Pn0CvMDr9OQlHI/VJCk QRGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HQhQLnWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si1617859ejt.153.2021.01.06.18.53.49; Wed, 06 Jan 2021 18:54:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HQhQLnWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbhAGCw0 (ORCPT + 99 others); Wed, 6 Jan 2021 21:52:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbhAGCw0 (ORCPT ); Wed, 6 Jan 2021 21:52:26 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7BCFC0612F0 for ; Wed, 6 Jan 2021 18:51:45 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id w1so7692635ejf.11 for ; Wed, 06 Jan 2021 18:51:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8LO5/Phbq28+31YDa1UZ1eQndglIwHyPOPdAo8T96Wc=; b=HQhQLnWS/ZJhdarKXSdd9H4qvqQ2V+N1W+bmCj0unK8v+b1kFb1bhI3HaS9/i50hzT kjnzni0TONbDtitbOV6IQqx+GH4UXTeabroXuypuTDDPupJ76lnHJOx66Ubp1AM2qBCP DdR/dJqziE60ULJpT4G1r7LtGQ4lkufUh1z85qvdRuzVd1H+YkUGZ32a4e6wu7cQF2AT qZI51OWODB4y0r+MMljmwvkatkq2Ym0xpyzFNmpM89mXs0bwDHxVo5YocIdmCoyUEgPk pn769EBOtvuoqxUfOSg3D7K1mvP8t0awPntTVNXSxKKzJka6xeC11b4yjF7HNVm95RtS ujHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8LO5/Phbq28+31YDa1UZ1eQndglIwHyPOPdAo8T96Wc=; b=FuSO5bvjJWv/9lOdpoxRWfnDqsCSjLQAx2oXnfxiBWZh3ljHQ6dvpDWT0EAu/+Ulp5 1qoZGjjhhnWRb+K07od+JDWnIK2ILz4EZda3mr+ravtcJYbwXQKIWXM+a2j794ARm2W9 YcLlBjzG43kKgCEFq5oLJ9k+wJBwm8dW4wfL5gtUQ1r/niWZwkwC+c1wTNxqdp3i9G0C eCTH1g80CxFpBlAXvy8F30apq14930Lhl35Xj6Qwf2scKeO9YdQ+S6WsCWQ5jJI0Nmo0 Cu87oFs3WXYN6/tWq4uAdvmY9pSc9qDF5S6MZFqiMRoofMdLHsfWJZLqFjMvfNa/BpML juHw== X-Gm-Message-State: AOAM531H210C+weYqGMee9USdPlIqKBwfsX4PvQ7veBh0h35NcjZo48K ylIImMeQ5FyYw0evtnOOOmEtxGZumVdQXlm5EWM= X-Received: by 2002:a17:906:417:: with SMTP id d23mr4922263eja.19.1609987904487; Wed, 06 Jan 2021 18:51:44 -0800 (PST) MIME-Version: 1.0 References: <20201223062412.343-1-zhenzhong.duan@gmail.com> <20210104190240.GF6029@char.us.oracle.com> In-Reply-To: <20210104190240.GF6029@char.us.oracle.com> From: Zhenzhong Duan Date: Thu, 7 Jan 2021 10:51:33 +0800 Message-ID: Subject: Re: [PATCH] x86/iommu: Fix two minimal issues in check_iommu_entries() To: Konrad Rzeszutek Wilk Cc: linux-kernel , zhongjiang@huawei.com, joe@perches.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , iommu@lists.linux-foundation.org, David Woodhouse , Lu Baolu , Joerg Roedel , will@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 5, 2021 at 3:04 AM Konrad Rzeszutek Wilk 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. > > > > The second issue is about the report of exectuion order reverse, > > the order is reversed incorrectly in the report, fix it. > > Heya! > > When you debugged this, did you by any chance save the > serial logs and the debug logs to double-check it? Hi Konrad, The iommu_table_entry is sorted by sort_iommu_table() and check_iommu_entries() finds nothing abnormal, so there is no related logs to check. Sorry for my poor english, I'm not saying there is order reverse, even if there is, it will be repaired by sort_iommu_table(). Then check_iommu_entries() report nothing. What I mean is about check_iommu_entries() itself, below printk isn't correct. printk(KERN_ERR "EXECUTION ORDER INVALID! %pS should be called before %pS!\n", p->detect, q->detect); Should be: printk(KERN_ERR "EXECUTION ORDER INVALID! %pS should be called before %pS!\n", q->detect, p->detect); Regards Zhenzhong