From patchwork Fri Mar 29 09:26:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Hsu X-Patchwork-Id: 1917760 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TpqvhDT3; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=pGuXCyo9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=nEC9PQm6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V5Znp1VX9z1yYx for ; Fri, 29 Mar 2024 20:27:58 +1100 (AEDT) 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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jQNwIdIHN6vg6A7QgMjkhiK7C8HNdHDjs//I2vOG9jE=; b=TpqvhDT3imhN4D qwumvS4XuxfxaHlcCyvDo9OklPX0+NoBfM9I88W8a1yLnkF7jyqwFWEdtOwgnicJXiQg8mvjYcQnc LuEGxyVLfQi9TB5oC+8squr7NU/sg+DEmLfsVAlSDSPrPvZXWlGhOjPMl0lIcnnNpEZ2alt3zb038 nOd7MwokD1Aake4XmyVKbGPTsYwDv3HbgMu0YweItAnGCHQPijPea1dJG3kvFqZrfCrToq2YeWR1w swd6LgL5RUnvmOJWZ8f4tXuIDBZj6L4xkENIL7mYDRLxuBMFF9dy3+CpmK5+rJ3nFiwqmb5OsmQd6 0MPy3jSD+bcZYXCAwepA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq8Wi-0000000HURg-0GfS; Fri, 29 Mar 2024 09:27:56 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq8Wg-0000000HUPr-0siU for kvm-riscv@bombadil.infradead.org; Fri, 29 Mar 2024 09:27:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; b=pGuXCyo9V1kVHkdLNmzDoBr+jd WlYHWcjpBYxuQQwGLhr38YXpFEnBojLdvMPGeToUXyjavo2sFPGl43EsI5CWtlmsZeGi4laFFdX7s YcVxdwkEPxxA9exfl8KF8B6qr1bqYh7RFwtulNT+OEYolTCYEvhfmfZe0sqe+DbPh1azkqot0IxAd gUqcETFUP5bD1WmvVDFVAc1Qhi3xDNq60edx742JBfbWCDsarS4eFk57x/Xiq8gGEy//SlvbzUkfY jc+GzWZQ0hVYd9v8ubDNwW2QZt69rL7ovUooVG/IPrBVncIPGDKBphmj5M6GJXjZq3Whv0CfM50Rt cpBsq+Rg==; Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq8Wc-00000001TtF-0iyn for kvm-riscv@lists.infradead.org; Fri, 29 Mar 2024 09:27:52 +0000 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-29f749b6667so1316278a91.0 for ; Fri, 29 Mar 2024 02:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711704467; x=1712309267; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; b=nEC9PQm63JyXAmhbXJ4VFbbJZxZ4C6n14c4fTMNDoOp91u5ScwFl/Qtlu20NiZq21f HhFAvRp6PyZAApb2dUYPzTDKmELieiHoZcH9d3zvsAj1c77vSScSvoLjgd+hT57XRVLf ujAmBdwydSPcrIkKv0cTj58zyAAAa6tgElNG1GAUWeTaggacvHkT5vfCb142flFptWkK AsV9EN+rPR/ShE1hlhh7LyV1uga/vj+c117GmPsoYz/tn4eor4BtJyYOoJp2exuIpg/P elG4X0tFEurc9YEYr1vekKh6c2a+ATfwElipkWjpOkDIgA0ty+XkEUAox+HRhNIQoCHU YLtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711704467; x=1712309267; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; b=KW8zMhaZ4OrsYZRmH/UvNUpxg8eLRmL6erJ6IP3/bzuCouZjhYyRLu1Cto07wyKIER D4+JbzZCLgCRlnhbupH8j5qcGNELCNTy3uXGC8w5rARcAHiMxxilHlwxTOQo8c146OyE 1LCI1tIN8pTJ8z/ePtSle9jkAmXkKsatQ0RD6enSwuYQOYexUY5vrTGySDPP+keJlh68 X8wSR+jvxMd6zcmIoxJ9Hyjd4e5rg61QFbLk6rWCFWPI/Gu7O9avZ3tQwszy7OQTdrWQ 6koZqDcb5VWKtoBZwB8LJ7EnlE6H4pv/mSGC42dUB/FN9oqeKbYEOUf9LvheM42UNphT YioQ== X-Forwarded-Encrypted: i=1; AJvYcCUPrNt9vwcokztBXXJ7zPBbPurDuOsrwHbxRkJfUo8MTGAmHNpsy2P68uHa2+gIhDdadgjZ7JrJWKZxeMshhPs3tc9VdyPA9BtlAzhm8g== X-Gm-Message-State: AOJu0YxSuD89xAB6ru2EK1sDBuo1TmwZ5wI56Ih+BOV7ICNVnRd2oekJ HMpUum/vQUnYZc3E12LtYEvZ+K35+CDvD4ot57JuUDIz4U08nanPzTBq4L9dIWE= X-Google-Smtp-Source: AGHT+IEuJwWsZcF37cdSyR4oAfPxO9tw5zd/KR1va4FW9dJBQvIHdmB9ul/Vbw6Ly8QQV6MyjM+RcQ== X-Received: by 2002:a17:90b:46c6:b0:2a2:176f:fba9 with SMTP id jx6-20020a17090b46c600b002a2176ffba9mr596520pjb.43.1711704467546; Fri, 29 Mar 2024 02:27:47 -0700 (PDT) Received: from [127.0.1.1] (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id cv17-20020a17090afd1100b002a02f8d350fsm2628830pjb.53.2024.03.29.02.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 02:27:47 -0700 (PDT) From: Max Hsu Date: Fri, 29 Mar 2024 17:26:18 +0800 Subject: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT MIME-Version: 1.0 Message-Id: <20240329-dev-maxh-lin-452-6-9-v1-2-1534f93b94a7@sifive.com> References: <20240329-dev-maxh-lin-452-6-9-v1-0-1534f93b94a7@sifive.com> In-Reply-To: <20240329-dev-maxh-lin-452-6-9-v1-0-1534f93b94a7@sifive.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J. Wysocki" , Pavel Machek , Anup Patel , Atish Patra , Paolo Bonzini , Shuah Khan Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, Max Hsu X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240329_092750_930624_0F891122 X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension, to prevent RW operations to the missing CSRs, which will cause illegal instructions. As a solution, we have proposed the dt format for these CSRs. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:102f listed in] [list.dnswl.org] X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension, to prevent RW operations to the missing CSRs, which will cause illegal instructions. As a solution, we have proposed the dt format for these CSRs. Signed-off-by: Max Hsu --- Documentation/devicetree/bindings/riscv/cpus.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index d87dd50f1a4b..c713a48c5025 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -137,6 +137,24 @@ properties: DMIPS/MHz, relative to highest capacity-dmips-mhz in the system. + debug: + type: object + properties: + compatible: + const: riscv,debug-v1.0.0 + trigger-module: + type: object + description: | + An indication set of optional CSR existence from + riscv-debug-spec Sdtrig extension + properties: + mcontext-present: + type: boolean + hcontext-present: + type: boolean + scontext-present: + type: boolean + anyOf: - required: - riscv,isa