Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1264351iog; Thu, 16 Jun 2022 02:37:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5taaUs0c7IVaYoXoHIsNlsuRb5RAPcYler3cbW6RSdzwyEpxTpUkZxmIhGHQo7hknGfQS X-Received: by 2002:a17:907:a40f:b0:71c:3ffc:530a with SMTP id sg15-20020a170907a40f00b0071c3ffc530amr982254ejc.672.1655372241959; Thu, 16 Jun 2022 02:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655372241; cv=none; d=google.com; s=arc-20160816; b=02QW2GAix97EtmKjyDTm/FKjCgKys3vJteeKhNdKDO1oiojZ0Y8J9VO+IZ0qJ20ARy pGQ7OdP9cYg6wvZQ1a07CbIK/+DYT3vziHZ5CZUeUEii782OXkxi5yIytFKAl79L/F+3 kl8ekPBTaDyTt0wQfhlrxlb5KcWxa6HlT1hKQy2ym+ZSgkIO5EPym82+UaroCGeitJN7 OTpsUSlKxy7UWpXDFTsP2FayAKdIPngRoLb8UrcIZYme7Ue/G0Njd1yVKTSLWdfr70fT HuB1qafz0bPfaTvYgNajDT4pVuqPDD/C4UbhhK7jjmL7K+nOpydzWwsekqqeQwxrlZIz MfEg== 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=1US4ipP4yJiU7A6OGZd0Asu0Q0XiNeHCX3Q6kDfh5U0=; b=c+jPKvFolxiT8S8gWPMm5I/BF3FFHGB7QH/ujvivsHcXL6HTBfnOK1ttgtXO5S8li2 K97m2La+5JYyiGn5TRI/Unsx9FytligWWBp0UaXLHv9Nc0Q6TF4MvLIbHtYH/Hv7FTSZ I32KfFy/6EBSq4RsrCCjKJPqhN0EuIeqgOteWG0PenUeiByQbkTSRRljeEDSEBAPotSH kHdyd9aYfaKgAPfzGdOLzrrtQ+5bz37CPCAmuaAv3IMV+0QYR/A2m8Cbw5vjlgwbIHds Pv71VGWp3a/mRMxsH75Um8YJ8AVVkXsNTqfEjbB2WSwcJora2U3i/ov7+TwORa/DbSK6 6/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rkjeg6Rz; 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 d25-20020a1709067a1900b006feb7f30ef7si1117187ejo.58.2022.06.16.02.36.56; Thu, 16 Jun 2022 02:37:21 -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=rkjeg6Rz; 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 S1359845AbiFPJ2K (ORCPT + 99 others); Thu, 16 Jun 2022 05:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242186AbiFPJ2I (ORCPT ); Thu, 16 Jun 2022 05:28:08 -0400 Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC0E11C04 for ; Thu, 16 Jun 2022 02:28:03 -0700 (PDT) Received: by mail-wm1-x34a.google.com with SMTP id c187-20020a1c35c4000000b003970013833aso402675wma.1 for ; Thu, 16 Jun 2022 02:28:03 -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=1US4ipP4yJiU7A6OGZd0Asu0Q0XiNeHCX3Q6kDfh5U0=; b=rkjeg6RzT4J90BHSluI8KX4QcffgtXJbeCtRKfmkre+JXLudYR4VRgH4/f/sAtKP24 gCvaL7uTHvaolQ1vI0ecJAxHl297gGL0c/9oBzo/ne6cBzWpYmVg+dm+ur0lWR1KEPSV nXQg3OZBmMCOssO5lBoP+IjCi4k8Clf/1f14iTlh4nxjDRT5ILERmepDp59hga/dGZj3 jxctvT0izLS4PnwBgxxhSNdVKMOWw710Lr2Z/MBeCCneQVgdcFwJqnGVIMzbAWyzWe9H Pq1/D9Hb3cJ6ZalBqzfRcykZW9lr7hxuLPPj9g+JpNSZTiFoqLpUfOeqY6BCMaf1k3LZ 3ESQ== 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=1US4ipP4yJiU7A6OGZd0Asu0Q0XiNeHCX3Q6kDfh5U0=; b=hI/n1GlhLaxKknTg46oftbeLj16rrLGw5M3JrlGFr1QcGzhWmQjc2SBcvD+rHqO1Us rrRQ8XZ6J/LGPVXOp2REUN6MjeyyLSc8G5d8V7Ddk+/RkRj2eHM265+hWJl7oXohLlCP bURlY8r07o7nG04LRvMEpLaB1l7bC+LbR76ZwBnB8GeXQvi+RGV2TnQ2Gecx/jy6DYLf ttfbBBV6IjlDqJ4GdvYQ6ajDxCjE+7/G1WCxD3JRYqmOewH4y0bos6eewtc/zJ93UBbG xPzcURfTbXnQbfFgel7ExI0Cx1jfBiNpxZBp6lm6uhyaJULx+UMb0TmnrBBWIEcH7c4J Y7mQ== X-Gm-Message-State: AJIora8UdzAXuVncthm6cY2wC2CfsDeNhY24LXqC8z61P5N2nS9AKY3d Tk3kCP3E2zcChSfAqgwwQadraRIjaYhCgbdHgiE= X-Received: from sene.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:27c4]) (user=sebastianene job=sendgmr) by 2002:a5d:4dc9:0:b0:215:c611:db73 with SMTP id f9-20020a5d4dc9000000b00215c611db73mr3886585wru.551.1655371682085; Thu, 16 Jun 2022 02:28:02 -0700 (PDT) Date: Thu, 16 Jun 2022 09:27:38 +0000 In-Reply-To: <20220616092737.1713667-1-sebastianene@google.com> Message-Id: <20220616092737.1713667-2-sebastianene@google.com> Mime-Version: 1.0 References: <20220616092737.1713667-1-sebastianene@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH v6 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 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=unavailable 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 | 49 +++++++++++++++++++ 1 file changed, 49 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..55323676194b --- /dev/null +++ b/Documentation/devicetree/bindings/misc/vcpu_stall_detector.yaml @@ -0,0 +1,49 @@ +# 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.1.476.g0c4daa206d-goog