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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 5ABD9C433E0 for ; Mon, 1 Feb 2021 11:15:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 140B164E9B for ; Mon, 1 Feb 2021 11:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233120AbhBALP1 (ORCPT ); Mon, 1 Feb 2021 06:15:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233263AbhBALPZ (ORCPT ); Mon, 1 Feb 2021 06:15:25 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCBFBC061574 for ; Mon, 1 Feb 2021 03:14:44 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id e15so12805543wme.0 for ; Mon, 01 Feb 2021 03:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=N5BZOmcQ5eaoia0uXY2fCg9xo8VYDzkvrXIaWmQwtR+0Z8YRR6TlUeDokPLVe5BCAW H3DC+wWCtna8njs76VVMhasaFKCAmpk4MXeFzqZT20bYlATjWYenkCVu1g/0mPrjcl0j vnUIqMT+MDwaZrWmgHMw2Sm12ewqP8o6plvIvTPhLqrOZ3p5Yi21gzjj/uR53DxDIbI2 ADPvi5zgh2zFy7ir5STtR3+suU4Ff1pwnOABA6sqUUNBYg1DDwphrMiys69QC5ku3nEm +L2ZMenCdJkhpE9TKQV1cBrKC0bGo/JGER5i3i9dpNa/XF2aCYYWDNo7jd7jF/w5ofp8 Zicg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=jYL6zdzj6Pu7a8fMA0qQq9UAXdofem/qMt3M1txxUNVHB9je2oQmBq1QhQnYdMBwTY 70HaJKwzMSGaUP8AGbWVUOz8vgubNQF7iefXO1JD4O2l151VuBcp1vUjoATx7dumx6d9 xKSXi7i9/vz41rWl/DcPQ0UBor6ZKtmIC9yiuZTRd5pa2UaBbAdDj+KgSh9dsTNqRqbE mbDUq4lLFZ0yIpmPnJkVQ0LS0wG2mZdTxOzNXshkD3lXy2Prw1GQJhQILcpnB9gZ2AB2 rlzGVQhguOr56RKOC5p8ayb5LUtMMTsGesYcFBOQfKJ+eyDeKPa4zmIcdxY7/u4xU+G6 Rt3w== X-Gm-Message-State: AOAM5329uYtcaAh5XqmrelzR91TsoFpj4c9TsPGLaiNfKmXC1Gt8UJfV ytSHp6Ay8VbEDP5Qxh9SnAbBgA== X-Google-Smtp-Source: ABdhPJxHrA/jAlwYZxpdhywNDQAzvWYPSxBihzr6oYOFEMnHxFQec2SJ/QJ9CVoDRLEeW3uaLbQm5w== X-Received: by 2002:a7b:c09a:: with SMTP id r26mr1165953wmh.60.1612178083354; Mon, 01 Feb 2021 03:14:43 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id e4sm27187437wrw.96.2021.02.01.03.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 03:14:42 -0800 (PST) Date: Mon, 1 Feb 2021 12:14:23 +0100 From: Jean-Philippe Brucker To: Zhou Wang Cc: joro@8bytes.org, will@kernel.org, vivek.gautam@arm.com, guohanjun@huawei.com, linux-acpi@vger.kernel.org, zhangfei.gao@linaro.org, lenb@kernel.org, devicetree@vger.kernel.org, kevin.tian@intel.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, rjw@rjwysocki.net, iommu@lists.linux-foundation.org, sudeep.holla@arm.com, robin.murphy@arm.com, linux-accelerators@lists.ozlabs.org Subject: Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices Message-ID: References: <20210127154322.3959196-1-jean-philippe@linaro.org> <20210127154322.3959196-11-jean-philippe@linaro.org> <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi Zhou, On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > > @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain *smmu_domain, int ssid, > > FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | > > CTXDESC_CD_0_V; > > > > - /* STALL_MODEL==0b10 && CD.S==0 is ILLEGAL */ > > - if (smmu->features & ARM_SMMU_FEAT_STALL_FORCE) > > + if (smmu_domain->stall_enabled) > > Could we add ssid checking here? like: if (smmu_domain->stall_enabled && ssid). > The reason is if not CD.S will also be set when ssid is 0, which is not needed. Some drivers may want to get stall events on SSID 0: https://lore.kernel.org/kvm/20210125090402.1429-1-lushenming@huawei.com/#t Are you seeing an issue with stall events on ssid 0? Normally there shouldn't be any fault on this context, but if they happen and no handler is registered, the SMMU driver will just abort them and report them like a non-stall event. Thanks, Jean 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=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 2E7BEC433E6 for ; Mon, 1 Feb 2021 11:14:48 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 CD9AF60295 for ; Mon, 1 Feb 2021 11:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD9AF60295 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7F23786961; Mon, 1 Feb 2021 11:14:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6yWfv4-rexVz; Mon, 1 Feb 2021 11:14:46 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id BE4578694B; Mon, 1 Feb 2021 11:14:46 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 96930C0FA7; Mon, 1 Feb 2021 11:14:46 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 002CDC013A for ; Mon, 1 Feb 2021 11:14:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E8F3186F72 for ; Mon, 1 Feb 2021 11:14:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L1TmxYx+iohM for ; Mon, 1 Feb 2021 11:14:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1164286F66 for ; Mon, 1 Feb 2021 11:14:45 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id f16so12278935wmq.5 for ; Mon, 01 Feb 2021 03:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=N5BZOmcQ5eaoia0uXY2fCg9xo8VYDzkvrXIaWmQwtR+0Z8YRR6TlUeDokPLVe5BCAW H3DC+wWCtna8njs76VVMhasaFKCAmpk4MXeFzqZT20bYlATjWYenkCVu1g/0mPrjcl0j vnUIqMT+MDwaZrWmgHMw2Sm12ewqP8o6plvIvTPhLqrOZ3p5Yi21gzjj/uR53DxDIbI2 ADPvi5zgh2zFy7ir5STtR3+suU4Ff1pwnOABA6sqUUNBYg1DDwphrMiys69QC5ku3nEm +L2ZMenCdJkhpE9TKQV1cBrKC0bGo/JGER5i3i9dpNa/XF2aCYYWDNo7jd7jF/w5ofp8 Zicg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=W1+sQxJIrBDncOdpDGwy1Ubdra5qCwsZkLcPa8w08WmcDcUMROA/7zUEhrsIwvOBC8 ZDlAKbRmxh8Wyis9vGDTaB1EOKf/upAOyCFdzhk3ZkTdnk4dkF4Dri45lB4MRWSkx1RA 0SAbEQjwcK8Ebt9uyRsB64ZPu9ATEWz8LjlyncF/fIc4yXv9MPSF1Z1MbmaVlnNutu5g irs/LhvwVfyoyhC55Bfg5hEm56BFrmWaOpSQMkdSW8qgAFWfcNPx1MmbqjMn4b0s3lGr schkqZInwOryU7KXF310l1wBi/+LSSx60Wsh4TFX3/drslq5gYI8luoEdwuROX08r+sQ 8e8A== X-Gm-Message-State: AOAM532ehiSiCmfcTQ7lLSNU2lp0VEXaTcdm+OPHWccITsjfAfzrqe3m by5RqHAw9DCe5xrYIRkQ2RLrdA== X-Google-Smtp-Source: ABdhPJxHrA/jAlwYZxpdhywNDQAzvWYPSxBihzr6oYOFEMnHxFQec2SJ/QJ9CVoDRLEeW3uaLbQm5w== X-Received: by 2002:a7b:c09a:: with SMTP id r26mr1165953wmh.60.1612178083354; Mon, 01 Feb 2021 03:14:43 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id e4sm27187437wrw.96.2021.02.01.03.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 03:14:42 -0800 (PST) Date: Mon, 1 Feb 2021 12:14:23 +0100 From: Jean-Philippe Brucker To: Zhou Wang Subject: Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices Message-ID: References: <20210127154322.3959196-1-jean-philippe@linaro.org> <20210127154322.3959196-11-jean-philippe@linaro.org> <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> Cc: devicetree@vger.kernel.org, kevin.tian@intel.com, linux-acpi@vger.kernel.org, robin.murphy@arm.com, sudeep.holla@arm.com, rjw@rjwysocki.net, vivek.gautam@arm.com, iommu@lists.linux-foundation.org, robh+dt@kernel.org, linux-accelerators@lists.ozlabs.org, guohanjun@huawei.com, zhangfei.gao@linaro.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, lenb@kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Zhou, On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > > @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain *smmu_domain, int ssid, > > FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | > > CTXDESC_CD_0_V; > > > > - /* STALL_MODEL==0b10 && CD.S==0 is ILLEGAL */ > > - if (smmu->features & ARM_SMMU_FEAT_STALL_FORCE) > > + if (smmu_domain->stall_enabled) > > Could we add ssid checking here? like: if (smmu_domain->stall_enabled && ssid). > The reason is if not CD.S will also be set when ssid is 0, which is not needed. Some drivers may want to get stall events on SSID 0: https://lore.kernel.org/kvm/20210125090402.1429-1-lushenming@huawei.com/#t Are you seeing an issue with stall events on ssid 0? Normally there shouldn't be any fault on this context, but if they happen and no handler is registered, the SMMU driver will just abort them and report them like a non-stall event. Thanks, Jean _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E5B1CC433E0 for ; Mon, 1 Feb 2021 11:16:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 89E5164E9B for ; Mon, 1 Feb 2021 11:16:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89E5164E9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kBWRj63szHyHOUI9qsS12Fe+f7hMCIzKWUV+kugwzMw=; b=bdLz17whVyPmV9v1sHP86rfLb 1KXIsaodtn4lbBAUYDTmYuUl3O/1Hu6bx76ad9Jz4dZ45q/ORVX18n93D/RlcmIbq52IPnPUPikzZ FomgiNd5k4UUV2UlvMFLkVk3R50fxBbAAOLEN6HDa2TifdrmRVUmKBKMY1SN/PzN0x6MgQO42oZkS XPzGUj7VAAtlhLhi7ZkaPUDmLLIf5cmg43UJVPjwY7OcfzMLYOk6WPysC3COCFiqs3tQg1SJ7NL2H qBYNHeMHj8rt9nksBlZkzi2DENp6iG+ZZpZhyYQOQBt/sZzXcvLJ1tKJTDEjHQK+b4AnPRdVIIqpc xIyGT+3WA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6XAO-00073Y-8Q; Mon, 01 Feb 2021 11:14:48 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6XAL-00072y-51 for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2021 11:14:46 +0000 Received: by mail-wm1-x331.google.com with SMTP id j18so12287673wmi.3 for ; Mon, 01 Feb 2021 03:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=N5BZOmcQ5eaoia0uXY2fCg9xo8VYDzkvrXIaWmQwtR+0Z8YRR6TlUeDokPLVe5BCAW H3DC+wWCtna8njs76VVMhasaFKCAmpk4MXeFzqZT20bYlATjWYenkCVu1g/0mPrjcl0j vnUIqMT+MDwaZrWmgHMw2Sm12ewqP8o6plvIvTPhLqrOZ3p5Yi21gzjj/uR53DxDIbI2 ADPvi5zgh2zFy7ir5STtR3+suU4Ff1pwnOABA6sqUUNBYg1DDwphrMiys69QC5ku3nEm +L2ZMenCdJkhpE9TKQV1cBrKC0bGo/JGER5i3i9dpNa/XF2aCYYWDNo7jd7jF/w5ofp8 Zicg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=L2OCKKQQHglqUwYJM9UBUI+jPzsS7a6jZ5mkXorxUPk=; b=ZfdWuE1u5MNqk4Ukec+rxaw2cwIpRDKO1UFrpHVfeOjxSflXXLQsp7PEtgbrE3eYNv dWvg6mid8b6/kr4/joozogVCJveZshE27od3htl9a2idgp3RC4baUvuFiloyeRCoTIsZ 3+zsqS8A00c1YMzOFN8dHt0wv9hpKudPJXkKE3CL23tRK/UUsG5qqyw9xlRi69HdUUI0 m6PsI8FFWRPWBAkD3aX/wJQgDY9eAKZXys/e0H5k+8PD5RMdPhHPnyUb0P8uA1qjxjyd rByY0CD01cd5v6ifothd5OdmINJFo72Fo/k7jAxIS7EUSp1KZ0GjHOr7pDD21syzl8et YOsA== X-Gm-Message-State: AOAM532hy+ugr7FaIiXch9FkflOFB3mRM9mEaWE5ml2yXAphoad/OR5U tLv+0VZEDhgJ2RBvNuZh8TyYioX9CF8niA== X-Google-Smtp-Source: ABdhPJxHrA/jAlwYZxpdhywNDQAzvWYPSxBihzr6oYOFEMnHxFQec2SJ/QJ9CVoDRLEeW3uaLbQm5w== X-Received: by 2002:a7b:c09a:: with SMTP id r26mr1165953wmh.60.1612178083354; Mon, 01 Feb 2021 03:14:43 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id e4sm27187437wrw.96.2021.02.01.03.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 03:14:42 -0800 (PST) Date: Mon, 1 Feb 2021 12:14:23 +0100 From: Jean-Philippe Brucker To: Zhou Wang Subject: Re: [PATCH v12 10/10] iommu/arm-smmu-v3: Add stall support for platform devices Message-ID: References: <20210127154322.3959196-1-jean-philippe@linaro.org> <20210127154322.3959196-11-jean-philippe@linaro.org> <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8adc79cc-7afb-dfe8-4f7b-07fa6dc5b905@hisilicon.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210201_061445_324081_12A6CFA7 X-CRM114-Status: GOOD ( 14.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, kevin.tian@intel.com, linux-acpi@vger.kernel.org, robin.murphy@arm.com, joro@8bytes.org, sudeep.holla@arm.com, rjw@rjwysocki.net, vivek.gautam@arm.com, iommu@lists.linux-foundation.org, robh+dt@kernel.org, linux-accelerators@lists.ozlabs.org, guohanjun@huawei.com, zhangfei.gao@linaro.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, lenb@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Zhou, On Mon, Feb 01, 2021 at 09:18:42AM +0800, Zhou Wang wrote: > > @@ -1033,8 +1076,7 @@ int arm_smmu_write_ctx_desc(struct arm_smmu_domain *smmu_domain, int ssid, > > FIELD_PREP(CTXDESC_CD_0_ASID, cd->asid) | > > CTXDESC_CD_0_V; > > > > - /* STALL_MODEL==0b10 && CD.S==0 is ILLEGAL */ > > - if (smmu->features & ARM_SMMU_FEAT_STALL_FORCE) > > + if (smmu_domain->stall_enabled) > > Could we add ssid checking here? like: if (smmu_domain->stall_enabled && ssid). > The reason is if not CD.S will also be set when ssid is 0, which is not needed. Some drivers may want to get stall events on SSID 0: https://lore.kernel.org/kvm/20210125090402.1429-1-lushenming@huawei.com/#t Are you seeing an issue with stall events on ssid 0? Normally there shouldn't be any fault on this context, but if they happen and no handler is registered, the SMMU driver will just abort them and report them like a non-stall event. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel