Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4874841iob; Mon, 9 May 2022 03:47:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTQibaDnc+vbP22m5bf3j+oxwCpOVofDYKa41u7nTGENAA7f7DJB/TBnFNW8s+fthA5XoM X-Received: by 2002:a65:6d16:0:b0:3c1:b056:5f5a with SMTP id bf22-20020a656d16000000b003c1b0565f5amr12487317pgb.469.1652093278487; Mon, 09 May 2022 03:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652093278; cv=none; d=google.com; s=arc-20160816; b=d1zGr3U0awWmqxhAX/sE54XYtIYNHPNIyYZqj0X5UCqOnkAIBo9QL4FNQDUs8TOz0d 8ly2HmnG3sblprh9/vmbWWR5o95jVUFcseKZDlC2A6ukiJonYzIEDJeHOxEq1pATDeNr z8RElKUunin+LfS6aCqAq82uxyV2RPfh/Vm/6xL4C4HAIqnGa/mmk51ndXSlqGgXWk0l 4cJr7ElG9YQzNlk4HgpTlro0qPpKsWml7dxt+uf5f4ebnyrXG0l73s7wSNGJNxb99AJr OEhB3VbtkxQEaG1tOh7fosJoVWPrLRHRW/we2j3Xjopd/0PHJMNtKLXfY3aqwQGdZWpT CUdg== 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=IH0vvM/kP0uifpRXlZnh4SaDor5QOPAjFTBMDXDGKyo=; b=xLZJF9a/OklCyBpqNMHRguOksMSqVUFAR/uW1uHDuBmBZcTL00YmDAedIhOc+60fr2 b8u3TOac67TPgRQXR9pifyH5niJOf6LsvVlnlsoQppMvN7WR7ooOcF2TlKnZsV3R0v0r ZzIezvEKmSW1fbE2BGHTfCo17a1UUhwoIw9x87qqic3NBisCyAAwTcoTRCzY10ww5PaI ElmXFGX6/RWjMzUaBIy05nSW67gXCT34W6Gbn1LjRdAKImk6x+eFckZFLnCdlNcLSQKX F00Ga047ytYXqrqzydP8zFSWSYmvKeIweTxM0BlKP6cKtG8P77jJc7OxHSMNm5Wf9O+p 8Pwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B09v9hRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b12-20020a056a00114c00b0050ddce187edsi15556975pfm.331.2022.05.09.03.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B09v9hRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 642AC219F71; Mon, 9 May 2022 03:09:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237762AbiEIJdx (ORCPT + 99 others); Mon, 9 May 2022 05:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235054AbiEIJP3 (ORCPT ); Mon, 9 May 2022 05:15:29 -0400 Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4626F184336 for ; Mon, 9 May 2022 02:11:34 -0700 (PDT) Received: by mail-wr1-x449.google.com with SMTP id s16-20020adfeb10000000b0020cc4e5e683so1244804wrn.6 for ; Mon, 09 May 2022 02:11:34 -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=IH0vvM/kP0uifpRXlZnh4SaDor5QOPAjFTBMDXDGKyo=; b=B09v9hRISUnIUJr8S6o8wK7zVTSj8p7Dl9kKiv6agbvXdk0K+rYHFsQ20A91SX2LQY a4u0BeNjZdtCIHaD6hg4CegDvRIumU+GG9+WswJSqcmqxyAaCndBhKWWA/sHm+mULJsM EFxCoAVKUQ62TqFfcEoIcjcQwUlAeEZtk+790dMSF/NrjY3dhm3GMEzv7pcHJmafQvPW Swp2yETs1yqHbFVgodLjp02YYtze2k5+QCtM7C7PB1k9Ldx4uTT94pFklbUwDiEih0lm Ehlp6ZSZbFfSclo1Bo+RsNbp95CtRYg77mCiPGfj1uWYZY3VIMXOv+KR4Ovb2UgNcgsU 1xMw== 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=IH0vvM/kP0uifpRXlZnh4SaDor5QOPAjFTBMDXDGKyo=; b=q5nJysPh405O2JpIBZb8w3G5g2G4I3Z2nTU+DT+K4oPf3qfgEQfExfUtejMAzj4WsD MgZuj4UsNRE+TU/FWcbfNXzuMMkQCcvi58CrwV9yxyU09apogWEUMjowwyF0kICpJ5Q/ Ks5py2q4AEbmaOdkKe4fnP2U0b/P8X9zJqRxzQ3c44OKspkgmf6FZSsNrAGXUf+0kviH CrraDWdeGbMYnsncHKliroIS/YYvzhSR69vyiZB5FgRQdGbV5SxKjR15fC4PXfXrsob2 N8rU4f0bG04V6/7oqy0HBexAJdSeKCReTfg0+HAHNXVcGWn6kiJkCZBexqAQMHUZ83tJ ACAg== X-Gm-Message-State: AOAM533XuWPkv2szjzfQR6j3ug2AduVZvam2J6rbxDnjlLldJ5vQAhG3 OkjCvGz6SWDxfIv+QCMfJbFvXnQo1ND+VBecLGo= X-Received: from sene.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:27c4]) (user=sebastianene job=sendgmr) by 2002:a05:6000:1843:b0:20c:57b2:472c with SMTP id c3-20020a056000184300b0020c57b2472cmr12738619wri.142.1652087492700; Mon, 09 May 2022 02:11:32 -0700 (PDT) Date: Mon, 9 May 2022 09:11:04 +0000 In-Reply-To: <20220509091103.2220604-1-sebastianene@google.com> Message-Id: <20220509091103.2220604-2-sebastianene@google.com> Mime-Version: 1.0 References: <20220509091103.2220604-1-sebastianene@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog Subject: [PATCH v5 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, qperret@google.com, Guenter Roeck , Sebastian Ene Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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. Signed-off-by: Sebastian Ene --- .../bindings/misc/vcpu_stall_detector.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/vcpu_stall_detector.yaml diff --git a/Documentation/devicetree/bindings/misc/vcpu_stall_detector.yaml b/Documentation/devicetree/bindings/misc/vcpu_stall_detector.yaml new file mode 100644 index 000000000000..2496fd84faa0 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/vcpu_stall_detector.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/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 + 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. + timeout-sec: + $ref: /schemas/types.yaml#/definitions/uint32 + 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. + +required: + - compatible + +additionalProperties: false + +examples: + - | + vmwdt@9030000 { + compatible = "qemu,vcpu-stall-detector"; + clock-frequency = <10>; + timeout-sec = <8>; + reg = <0x0 0x9030000 0x0 0x10000>; + }; + +... -- 2.36.0.512.ge40c2bad7a-goog