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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 21E44C48BDF for ; Fri, 18 Jun 2021 07:45:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D6D4D61209 for ; Fri, 18 Jun 2021 07:45:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6D4D61209 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=Qe0Eh2q/EWUht9a5xGPV3aVcw5GjA+veDaqagb/Ei9w=; b=Rgcc+74IpVuhKl 1VprwQz0fRhbDb+ez0JWfxCdNb2hB56T3Mhb9Boj5zyKPiBqlLalTfQXpPkpy2X3oUc9CjUX1r7qt XFspWk3LitFA8oMmmF5FukR4sODobHdCIhaa3PaH4tw4y9PL0uNmzIZ3gwoc1PIQRvHhCFW2wTnQs qcNgSUoEfjDBHNXjRvm3kag/056EgU+s2IsfOQOfnPhjWvlYrnIpLS4ajWQUQ5Dk3QvZ5RsdesEk2 1RYd398j6Xl5LA0cGcOgrF4nhHfzCGLibPDB5hoAFMeWJgISNJJxL2hHBZDGZXA0sh2NVs5y05UMa 9YLRn70PVdDn1EzAPe8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu9Ai-00D7eM-Iq; Fri, 18 Jun 2021 07:44:12 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu9Ae-00D7dK-Ht for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 07:44:09 +0000 Received: by mail-ed1-x533.google.com with SMTP id t3so7322853edc.7 for ; Fri, 18 Jun 2021 00:44:07 -0700 (PDT) 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=xrVDbV297cRNejKsonngV4vGhbIFMI93Q9VE4px56sk=; b=DJrFso3Sd/PK31zGllWY1zpb+A/KUBtA1E8u5Qir0hsdifTQYSdRZW1U6CNektQcl7 8Gwsv7C1odv1jrBJeUaUkxlcjlp8X1pKeC2J+1DP3IUSv0CsFCITaq8JZc3WjTws7uPQ 4IxWmREr3j6FYQj+LSiYl4jQTvWE68g/xCWzMfT0kpokkoIFlm0HlOIaovz3NUm3XRbN wE7uyBGbqLDvxaWPAzFanMx77+YZjL556iOB0wbtNEUUYyaZWtg3ae9HJjDoNyKVy1IK fvCBuKgdbz3tUsMUMs1z8Q2cwdxKNYtxY/sI/BfDgxkDL/babYZa0vN5UhC3RLA+ilVb 2Qtw== 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=xrVDbV297cRNejKsonngV4vGhbIFMI93Q9VE4px56sk=; b=PVgSLCmFzBZp0oU9aXuEXnOEfT4A2ZmxcB0KntkZHecN5CDkg0P8yHkYbrIl0lvhV6 5FYZMQpAZxzX8+JvD5ZTxhTnRd7Q8FhKEj3w0qKseI5DypIGM2phqyGwqcStPbptI3n8 0AWn2JHmJdOWBIBwANjSwOJT4rLex7/WXblImVqmSzfBwYmNwsOvNFwmxHeGOfB2Q9ck OECY5mSRSuFxJ0FCzg/UKf2BspadUpcNNppGUGm8jZxAxJLsv1oFUKORAAffv5wZmMJh fDU05JqXQMsYQUd2LdO2fIMvgBk/NrjQ/e1lKveTSbFZ5gZS6loUJeeAf87q5C2nVReI pWsg== X-Gm-Message-State: AOAM532hZGcJWy5fG+/kGHBlB/SJRtrPmpa21NZf2U/1DnBc6g8Pqa/M Xwiv6ecxmOL7XUCHgK9BaNthkw== X-Google-Smtp-Source: ABdhPJzREIN0+D0Q7W8RSrNNQ4NDgbr/Euk9okd86tzehslscukuMpktyxR1ml4l0LZerVVX4xGYvQ== X-Received: by 2002:a05:6402:17d3:: with SMTP id s19mr1921993edy.222.1624002246807; Fri, 18 Jun 2021 00:44:06 -0700 (PDT) Received: from myrica (adsl-84-226-111-173.adslplus.ch. [84.226.111.173]) by smtp.gmail.com with ESMTPSA id cf26sm680470ejb.38.2021.06.18.00.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 00:44:06 -0700 (PDT) Date: Fri, 18 Jun 2021 09:43:47 +0200 From: Jean-Philippe Brucker To: Eric Auger Cc: rjw@rjwysocki.net, lenb@kernel.org, joro@8bytes.org, mst@redhat.com, will@kernel.org, catalin.marinas@arm.com, baolu.lu@linux.intel.com, dwmw2@infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, sebastien.boeuf@intel.com, robin.murphy@arm.com, kevin.tian@intel.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com Subject: Re: [PATCH v4 3/6] ACPI: Add driver for the VIOT table Message-ID: References: <20210610075130.67517-1-jean-philippe@linaro.org> <20210610075130.67517-4-jean-philippe@linaro.org> <5a16c21f-ca02-1016-80e9-c374a6fe2b25@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5a16c21f-ca02-1016-80e9-c374a6fe2b25@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_004408_652063_B258343B X-CRM114-Status: GOOD ( 17.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 On Wed, Jun 16, 2021 at 03:26:08PM +0200, Eric Auger wrote: > > + default: > > + pr_warn("Unsupported node %x\n", hdr->type); > > + ret = 0; > > + goto err_free; > > + } > > + > > + /* > > + * To be compatible with future versions of the table which may include > > + * other node types, keep parsing. > > + */ > nit: doesn't this comment rather apply to the default clause in the > switch. Yes, the comment doesn't accurately explain the code below, I'll tweak it. /* * A future version of the table may use the node for other purposes. * Keep parsing. */ > In case the PCI range node or the single MMIO endoint node does > not refer to any translation element, isn't it simply an error case? It is permissible in my opinion. If a future version of the spec appends new fields to the MMIO endpoint describing some PV property (I can't think of a useful example), then the table can contain the vIOMMU topology as usual plus one MMIO node that's only here to describe that property, and doesn't have a translation element. If we encounter that I think we should keep parsing. > > + if (!ep->viommu) { > > + pr_warn("No IOMMU node found\n"); > > + ret = 0; > > + goto err_free; > > + } > Besides > Reviewed-by: Eric Auger Thanks! Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel