Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3877096imw; Thu, 7 Jul 2022 08:57:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sU5lF1XrmvjKpQo70PqGymBgTXr3RNyACiKcjhKPJtDmhhuT/3/AJzWE320l9iuGWWDh8q X-Received: by 2002:a17:90b:30d5:b0:1ef:ae96:c0af with SMTP id hi21-20020a17090b30d500b001efae96c0afmr5857042pjb.204.1657209442718; Thu, 07 Jul 2022 08:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657209442; cv=none; d=google.com; s=arc-20160816; b=O6krwT1sB0VVJ/gq8psckApaq44TDVOy6/Kpg3fNIaoM00jWGIpaV9Gl9aLdWoxtIN PCyuNclUhXZNBoS3CUVkUWbROGfEKrEuaA+67V1FZ61lJt0QUykS9kwg9iZ2AyAShV5t Xgm1R164lH/4MAxI62EEFv0bLLlN0zMvyYW7urRFx9g9ag8KooTZwQ94RvXQnhkMDKTz URlrLWBE4UwHewU1hhp8kkVYaw1NQ/jIBKSMzuRGmDgUoOc/teRegwUgG8KVPwJ/VRW+ Ry+DZlgR4wzSXDs09n8VrIeZPtevdTRV64I2EGcwjQ7FO09GXxrV1ZvfRJLaPt/rXkMN G2sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=syuU6hHKkMyzySl7opH6TLKAl/ic71oCS/pfUZCKirM=; b=SNn1GniqO5MvhdHxegc9iP78mDodCYUr82cW3YPuWJoTfTPbB0nCj96v4qE+JFguzT sDQNSv41lIhhG4P7Eg8LEPJEXn5H3hjLOrySO3g6+t2dhdBnAtcNy9k2MOWQabTp35D7 kEzuq6KF/udePM096uOcQl9PV0dM1TArieWSxf63xLgK0seuCM6J0t0i9urfy4wnp5v8 L9etjnbJgOp2DRGJRynPgud2TVn3dtD49doypc2Mz1X2M329qhX/2qNI/gvGcRgZo1fv JfhFuL+FidEWXijdzfU4KcRK9XyE01FfujS7zAc3WqaNDUEs5prOcb0QfvmWDDONt1E/ 22/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZMhXcj3R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j190-20020a6380c7000000b004156a348a23si582378pgd.569.2022.07.07.08.57.08; Thu, 07 Jul 2022 08:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZMhXcj3R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235908AbiGGPnN (ORCPT + 99 others); Thu, 7 Jul 2022 11:43:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235895AbiGGPnJ (ORCPT ); Thu, 7 Jul 2022 11:43:09 -0400 Received: from mail-wm1-x349.google.com (mail-wm1-x349.google.com [IPv6:2a00:1450:4864:20::349]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C8FC2CDC8 for ; Thu, 7 Jul 2022 08:43:08 -0700 (PDT) Received: by mail-wm1-x349.google.com with SMTP id z11-20020a05600c0a0b00b003a043991610so9712146wmp.8 for ; Thu, 07 Jul 2022 08:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=syuU6hHKkMyzySl7opH6TLKAl/ic71oCS/pfUZCKirM=; b=ZMhXcj3R8JjdbPGK1RMipFlJQJ86lMDFuZO9OnnWxoDWejMeiIKlQE1/l6rKmWBNjG OMeODvWz+13whwJrciZJHlMCeujeT5FqqIflItvUc81Rb6SoYdvKWyTgKiCQ34lqGEwY tWckpY38L6n6VQUCV+793/zDMGGIunjtCQrneZSfl77+vSXSBxcYumZs7v/NCfZARZwJ eLWEZaQoH4hop3NISpz9zZtSl3HUxldZ+h6EXt8oEI9kDARhFgrD657Y88eYUFBAojxk KDdv749g3Fix3+bOiahusF270WW9315W6Y2DQx8B26t6860pffFQ738fdnuj+iLnV73s 4BHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=syuU6hHKkMyzySl7opH6TLKAl/ic71oCS/pfUZCKirM=; b=HZVYeJTrqx9FkYw/VqZsU4M6noJTWv1SOH1YnPxKE+iWdKSVGIBND5jGnkDEB3hx+d aPp/T3c1cG3zLDxm0XCSbc+5UK0dixB9DNlmqmz1sEUoovOK2oO4rccdHh+k6SlWaEGE nasdm9cVhyVj+8lg/xdYXudeO7atxuc2GSz0CiWDIKkgZxhAaD+QMyUPkrw4FP4gJTJQ VrzYyHZaD/wW/BD/ChhoQPDzwIlReJeo0k3Uf/QmjyPoBxTURcprWzeYDjzUmyyqZwSr ZtzVytAft8RE8u3BSVjudy8Ojtb7Z+9xVtMfRcYf7imz5QzHrsXRIvBwy7FfvrUhd+FY WbkA== X-Gm-Message-State: AJIora+4ukIGoaQxRiWTnG1xP8gjw0BiLeAXaciH1dlBqh7RGTe0GrP8 xSDhCjxCppVCCxy6Xh44mR4ZJU/kdoJd31a74yM= X-Received: from seb.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:31bd]) (user=sebastianene job=sendgmr) by 2002:a05:600c:35cf:b0:3a0:49c1:f991 with SMTP id r15-20020a05600c35cf00b003a049c1f991mr5046739wmq.95.1657208586677; Thu, 07 Jul 2022 08:43:06 -0700 (PDT) Date: Thu, 7 Jul 2022 15:42:26 +0000 In-Reply-To: <20220707154226.1478674-1-sebastianene@google.com> Message-Id: <20220707154226.1478674-2-sebastianene@google.com> Mime-Version: 1.0 References: <20220707154226.1478674-1-sebastianene@google.com> X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog Subject: [PATCH v10 1/2] dt-bindings: vcpu_stall_detector: Add qemu,vcpu-stall-detector compatible From: Sebastian Ene To: Rob Herring , Greg Kroah-Hartman , Arnd Bergmann , Dragan Cvetic Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, maz@kernel.org, will@kernel.org, vdonnefort@google.com, Guenter Roeck , Sebastian Ene , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham 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 The VCPU stall detection mechanism allows to configure the expiration duration and the internal counter clock frequency measured in Hz. Add these properties in the schema. While this is a memory mapped virtual device, it is expected to be loaded when the DT contains the compatible: "qemu,vcpu-stall-detector" node. In a protected VM we trust the generated DT nodes and we don't rely on the host to present the hardware peripherals. Reviewed-by: Rob Herring Signed-off-by: Sebastian Ene --- .../misc/qemu,vcpu-stall-detector.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/qemu,vcpu-stall-detector.yaml diff --git a/Documentation/devicetree/bindings/misc/qemu,vcpu-stall-detector.yaml b/Documentation/devicetree/bindings/misc/qemu,vcpu-stall-detector.yaml new file mode 100644 index 000000000000..1aebeb696ee0 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/qemu,vcpu-stall-detector.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/qemu,vcpu-stall-detector.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VCPU stall detector + +description: + This binding describes a CPU stall detector mechanism for virtual CPUs + which is accessed through MMIO. + +maintainers: + - Sebastian Ene + +properties: + compatible: + enum: + - qemu,vcpu-stall-detector + + reg: + maxItems: 1 + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The internal clock of the stall detector peripheral measure in Hz used + to decrement its internal counter register on each tick. + Defaults to 10 if unset. + default: 10 + + timeout-sec: + description: | + The stall detector expiration timeout measured in seconds. + Defaults to 8 if unset. Please note that it also takes into account the + time spent while the VCPU is not running. + default: 8 + +required: + - compatible + +additionalProperties: false + +examples: + - | + vmwdt@9030000 { + compatible = "qemu,vcpu-stall-detector"; + reg = <0x9030000 0x10000>; + clock-frequency = <10>; + timeout-sec = <8>; + }; -- 2.37.0.rc0.161.g10f37bed90-goog