Received: by 2002:a05:6a10:3150:0:0:0:0 with SMTP id m16csp3146370pxc; Tue, 12 Apr 2022 14:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/UzhCn7Tusg/dnRseQdTrJPtKc8JsCWlE/Zwcn+cPd4H12qSzI6tEzclb+rAgq1Y1hVcW X-Received: by 2002:a17:90b:3c47:b0:1cb:8121:dcc8 with SMTP id pm7-20020a17090b3c4700b001cb8121dcc8mr7310197pjb.35.1649800411388; Tue, 12 Apr 2022 14:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649800411; cv=none; d=google.com; s=arc-20160816; b=1BqmGOBIi6PE3GUnUoe+9xenhUaipbwRRCZngBxIibuxljdjv9LK0D6bPQ0SN1tCgD N2W19VnnG1nO3DGq+XmpRVCKuCy/Oif56wIiKy/XyFZi5VVPpLU1pt/nBbQ0Ae/ba9dA npEBmjWdCgUwnZmWwcKXNNBfynNGk+M8t1EMH2OitGSGbL0mhxIktoBBF6dcDvDtXAfN oLZAvpkfDt5tnYLJMEay0lOucRA73O3rSuYSsrR206MoCBODdnLQ11TTWfvxRD3Qo9Q0 gD9oGy1F00eCqrW4KoTY6bRYPDQ95maXFusFSMGyAcWAc+jBnTV15JPwE5tt75G112GW hsRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:from:references:cc:to :subject:message-id:dkim-signature; bh=28M5lhAtnZOyUfE1LzLlkbiL5y+pZYDo9mGQ5Q/tvIs=; b=XZNeERAYxR6kFoqa2hQPgTiEhViFWc9L36GCbv0b5lC+Q6rVP9U5zmcmF681RI0axC XFHf9tCWe/fxZV4uEJ9D6oIi2RImkQvVi/z0GoXZWuAtL3kmw6lr5ofYa2e1ZJff37AZ UQjrXNNb4s29dD+puFrb9vM/YiUmetiTErzpY+opEoVkEFexb2w8zgH5bEhXy1kBNZu2 KnSJAEioFfqK6cGcd1TFXszzh8hr8+H0QNt5kYxzYI4Z0+qMZoRGOH1ftnYcVJQE9lxL KvmZF0Mx3EVnlQ3USVOx/DixNP73fp/mZgg+Li7N3JWGP912HMUp71fHMiVzkEwONRhm EMXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=BSDt4mSk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h15-20020a63df4f000000b0039cf338ee80si3750298pgj.697.2022.04.12.14.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:53:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=BSDt4mSk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9DCE513E15E; Tue, 12 Apr 2022 13:47:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344088AbiDKPQG (ORCPT + 99 others); Mon, 11 Apr 2022 11:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235648AbiDKPQE (ORCPT ); Mon, 11 Apr 2022 11:16:04 -0400 Received: from out162-62-57-137.mail.qq.com (out162-62-57-137.mail.qq.com [162.62.57.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4DF3152B for ; Mon, 11 Apr 2022 08:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1649690024; bh=28M5lhAtnZOyUfE1LzLlkbiL5y+pZYDo9mGQ5Q/tvIs=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=BSDt4mSkN4hjoijsc/dLY21pilM9yAooR3R/aAzy4aVTANA+0E964bY1+6pRulIYt 2pFuuU3I8YZ0VZSS0A25BFQ2f+OAvOc179IKE7pnFcPwehHluNpeveXLWfnFAbmesh E10vnN6dpMMPeu1X1xXNodEuh1vI5U/AGSbLDz24= Received: from [192.168.0.110] ([36.57.147.99]) by newxmesmtplogicsvrszb7.qq.com (NewEsmtp) with SMTP id 3681BC5A; Mon, 11 Apr 2022 23:13:40 +0800 X-QQ-mid: xmsmtpt1649690020ta5upzabz Message-ID: X-QQ-XMAILINFO: NQR8mRxMnur9LEcvCo3XM0873Nsg49FRdhT228Ob+jseg4lPImmFyJDw0dyjq2 1inUfGtSQpjOKkT1c+/th+IVe6qc1RFG/LSh8Gbi2z1qDOdz3I2UVGjj+pvEkcsElir20rb4OLvJ OG9mIlkZ33dyfiBswIrAx/A/guTUsRWelXSPyZlSyJSPA1tCro61SVyI2n8F9cPCu9x2CL4rI92N MhZvRHV2eiUjqIbW84A9EbMPX5nyxybB/D+lHI0eHN/w21qMD2xsoNsU/iNp3uATraiiKXf3KdfX QDUbEQKSDbof/qj6hx2eOhgw/Uy4hIwiggh/FoHURVSMScsEirhtJhhLfIvk75qIwNGO5dl5du8c O9MbA3imrNUtODhcDVzJQFk6zzwk8VhyVqDq1/e+7uZJycBxmzynGJk3mJfOgoWODYIKw8cSopLG 9CTxaHU7MCpKG/gxksyFzWF2K8a0sppFTt3Pd9Tfrl8+Y1V9/k+5AmzD56hw1ztJ8kKtVo+du28J IV+dtyWKUFyaOUPJZH3MvL43gx9tDsrsFZ8LIEobkhqLu55s0PsGDjhXGuX+wCFTw/5+8EIIzVoS BtSWlJcwNvvOOtIUYyH6YHmPtPDsp0TUgae+XFxH4wBb0TrCI1k3e0Bu81qbTHwkLTCPT1ZbKs4F GuBegEHaryk2Q0nhvGrG5yOtPiSKQW3ECBpkglLyopCpmEZGGmKxwx0YhpoZhew1X9clMipXktu1 Vs0GZta3wjJHsyKF0DLdntrRPfCGmFuCQQQEiRyH27uStAiqA6uddJfy/ABNgJWOgXu4Sqneh5sw PqWnJccEn8uEHFcZ+xqUiOPDBQDkN1xxopJtBO1NdW0Ct2aIZYjLO/H7/smEiIdJ3NYmYGTXzbKB Fb3eAQKcdT6rHg8JL34NOc3QLWm9wzn2cGwKQaWKIPA5Cz20MX/F9K4l/W8fTe/RPfdkQrBNoGnl h/YSHY29w= Subject: Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit To: Dave Hansen , Joerg Roedel , Fenghua Yu , jean-philippe Cc: Ravi V Shankar , Tony Luck , Ashok Raj , Peter Zijlstra , Dave Hansen , x86 , linux-kernel , iommu , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Josh Poimboeuf , Thomas Gleixner References: <20220207230254.3342514-1-fenghua.yu@intel.com> <20220207230254.3342514-6-fenghua.yu@intel.com> <56ed509d-a7cf-1fde-676c-a28eb204989b@intel.com> From: "zhangfei.gao@foxmail.com" X-OQ-MSGID: <0da0fea2-2b19-a9b6-910a-122ff57cb8f5@foxmail.com> Date: Mon, 11 Apr 2022 23:13:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/4/11 下午10:52, Dave Hansen wrote: > On 4/11/22 07:44, zhangfei.gao@foxmail.com wrote: >> On 2022/4/11 下午10:36, Dave Hansen wrote: >>> On 4/11/22 07:20, zhangfei.gao@foxmail.com wrote: >>>>> Is there nothing before this call trace?  Usually there will be at least >>>>> some warning text. >>>> I added dump_stack() in ioasid_free. >>> Hold on a sec, though... >>> >>> What's the *problem* here?  Did something break or are you just saying >>> that something looks weird to _you_? >> After this, nginx is not working at all, and hardware reports error. >> Suppose the the master use the ioasid for init, but got freed. >> >> hardware reports: >> [  152.731869] hisi_sec2 0000:76:00.0: qm_acc_do_task_timeout [error status=0x20] found >> [  152.739657] hisi_sec2 0000:76:00.0: qm_acc_wb_not_ready_timeout [error status=0x40] found >> [  152.747877] hisi_sec2 0000:76:00.0: sec_fsm_hbeat_rint [error status=0x20] found >> [  152.755340] hisi_sec2 0000:76:00.0: Controller resetting... >> [  152.762044] hisi_sec2 0000:76:00.0: QM mailbox operation timeout! >> [  152.768198] hisi_sec2 0000:76:00.0: Failed to dump sqc! >> [  152.773490] hisi_sec2 0000:76:00.0: Failed to drain out data for stopping! >> [  152.781426] hisi_sec2 0000:76:00.0: QM mailbox is busy to start! >> [  152.787468] hisi_sec2 0000:76:00.0: Failed to dump sqc! >> [  152.792753] hisi_sec2 0000:76:00.0: Failed to drain out data for stopping! >> [  152.800685] hisi_sec2 0000:76:00.0: QM mailbox is busy to start! >> [  152.806730] hisi_sec2 0000:76:00.0: Failed to dump sqc! >> [  152.812017] hisi_sec2 0000:76:00.0: Failed to drain out data for stopping! >> [  152.819946] hisi_sec2 0000:76:00.0: QM mailbox is busy to start! >> [  152.825992] hisi_sec2 0000:76:00.0: Failed to dump sqc! > That would have been awfully handy information to have in an initial bug report. :) > Is there a chance you could dump out that ioasid alloc *and* free information in ioasid_alloc/free()? This could be some kind of problem with the allocator, or with copying the ioasid at fork. Sure, will add some trace tomorrow. Thanks Dave