From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 209FAC433B4 for ; Tue, 13 Apr 2021 00:28:06 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE07661246 for ; Tue, 13 Apr 2021 00:28:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE07661246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.109463.208929 (Exim 4.92) (envelope-from ) id 1lW6u8-0005kJ-T8; Tue, 13 Apr 2021 00:27:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 109463.208929; Tue, 13 Apr 2021 00:27:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lW6u8-0005kC-Ob; Tue, 13 Apr 2021 00:27:44 +0000 Received: by outflank-mailman (input) for mailman id 109463; Tue, 13 Apr 2021 00:27:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lW6u7-0005k7-D8 for xen-devel@lists.xenproject.org; Tue, 13 Apr 2021 00:27:43 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 417e07d7-10a9-4686-86fa-14cf90fc7f17; Tue, 13 Apr 2021 00:27:42 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4443B6109E; Tue, 13 Apr 2021 00:27:41 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 417e07d7-10a9-4686-86fa-14cf90fc7f17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618273661; bh=dENYFUjEUnHuUQgwPE7nhH4LIoGHwVzQZ6ZtbZUv2UI=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=ZJqH0m6UMR/0L6Tqwr4wztekJhpRBaaCQn8FzjUz+6kTi6tXFUytp9OE12EKMdkxq B6pYVD+1Cxn1ACur00sZbgTORNG27Nqo56Whb2k45toLH1sT04c1VhxnmdrEUQfnBz AnPfs2NfLB2rKaBceq6xtQG4CxbV4ZOVchI69MBYG5maBmv99kGcoAYu/1WZb6Po1p s6qnv5cGRF/Q+XCVivUNGLDM7s6u7I/YRvCUVdkwOg+W8+KBf6JtuOsA/YMESuQc5q oRh/dJBgPJoY1+9RGsj9IFCaK3srThNwBXD87u65yXIRiBtVe6QinMR+bqyhAG9HKr d9mu7idfaj8Sg== Date: Mon, 12 Apr 2021 17:27:40 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Rahul Singh cc: Stefano Stabellini , Julien Grall , xen-devel , Bertrand Marquis , Volodymyr Babchuk , "brian.woods@xilinx.com" Subject: Re: [PATCH v3 0/3] Generic SMMU Bindings In-Reply-To: Message-ID: References: <80de3eb5-b338-af4e-42eb-d358f51d0bd7@xen.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-204089749-1618273661=:4885" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-204089749-1618273661=:4885 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Mon, 12 Apr 2021, Rahul Singh wrote: > Hi Stefano, > > > On 10 Apr 2021, at 1:27 am, Stefano Stabellini wrote: > > > > On Tue, 6 Apr 2021, Stefano Stabellini wrote: > >> On Mon, 5 Apr 2021, Julien Grall wrote: > >>> On 26/01/2021 22:58, Stefano Stabellini wrote: > >>>> Hi all, > >>> > >>> Hi Stefano, > >>> > >>>> This series introduces support for the generic SMMU bindings to > >>>> xen/drivers/passthrough/arm/smmu.c. > >>>> > >>>> The last version of the series was > >>>> https://marc.info/?l=xen-devel&m=159539053406643 > >>> Some changes in the SMMU drivers went in recently. I believe this touched > >>> similar area to this series. Would you be able to check that this series still > >>> work as intented? > >> > >> Thanks for the heads up, no, unfortunately they don't work :-( > >> > >> They badly clash. I did the forward port of the three patches but they > >> fail at runtime in my tests. I ran out of time to figure out what is the > >> problem, and I'll have to pick it up at some point in the future (it > >> might not be any time soon unfortunately). > >> > >> Rahul, if you have any ideas about what the problem is please let me > >> know. This is the branch with the forward port: > >> > >> http://xenbits.xenproject.org/git-http/people/sstabellini/xen-unstable.git smmu-generic > > > > I did some more investigation and spotted a minor error in my forward > > port. This an updated branch based on staging: > > > > http://xenbits.xenproject.org/git-http/people/sstabellini/xen-unstable.git smmu-generic-2 > > > > However, the real issue is that Rahul's patches break SMMU support on > > ZynqMP even without my changes. I ran a bisection and found out that > > patch #2 is the culprit: > > > > 5ee3fa0b21ea xen/arm: smmuv1: Consolidate stream map entry state > > > > It causes the abort appended below. The problem doesn't seem > > particularly ZynqMP specific. Rahul, can you reproduce it on your side? > > Yes. I can reproduce the issue on Xilinx QEMU as we don’t have access to physical ZynqMP and found out that > associating an iommu group pointer with the S2CR causing the issue. > > Associating the group pointer with S2CR is part of the patch "xen/arm: smmuv1: Intelligent SMR allocation”. > > I just revert that part of the code from the patch and it works fine for me. Please find the attached patch for the same. > > As per your analysis "5ee3fa0b21ea xen/arm: smmuv1: Consolidate stream map entry state” is causing the issue but what I found out that > "xen/arm: smmuv1: Intelligent SMR allocation” is causing the issue. > Can you please test it on the physical device and let me know if it works for you also to make sure we both observing the same issue. Great! Yes, I can confirm that your patch fixed the issue, now I can boot staging on ZynqMP without errors and I can do device assignment too. Thank you so much! The other good news is that the three "Generic SMMU Bindings" patches work too on top of yours with the fix! Is the patch you submitted the valid fix for the problem? In other words, should we go ahead, review, and commit the patch you attached or do you want to send a different version of the patch for inclusion in Xen staging? --8323329-204089749-1618273661=:4885--