From patchwork Thu Mar 30 22:43:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dai X-Patchwork-Id: 669195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21796C77B6F for ; Thu, 30 Mar 2023 22:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjC3WpB (ORCPT ); Thu, 30 Mar 2023 18:45:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbjC3Woe (ORCPT ); Thu, 30 Mar 2023 18:44:34 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C440B11EAD for ; Thu, 30 Mar 2023 15:44:29 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-545d3b026a8so152311657b3.7 for ; Thu, 30 Mar 2023 15:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680216269; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mcnJNCHDCGQ7Pzom/y/MQEMC0VEcznZRpNuHkAP16dM=; b=h+fWFQgFgIewRQ/oEBbhup3NdEkI7VTVNsuOE+DEbbkPezfcqmPxt821KjIEBRuQbG l0zjD5y2da69givEVl5sGT/LrKzZ3TjBHss675g7X6otDgYpfdh+qN2+RTa4QLDKNv9g PDcFoEuUC2taY6ePkBcT1Z7N0RA9q3bwXricL/gDzEv4dXafQDmGXlIKBeyXeR2sEz8o E9FH3ufwR/fPbEciGQgLYG6zQkSaBSw0BtOfmnkR4YfxaB7/7EETD5gleyNZwM9ywyrO n+i0UKoKt4E+CXqxkN8hBn0e4jSHrCNiFCw+gjvKmBdlUar6F84Pyzh3o9haY+aKhz2B Wi9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680216269; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mcnJNCHDCGQ7Pzom/y/MQEMC0VEcznZRpNuHkAP16dM=; b=5Yygz2IR3xpfYp6TTB6FKeuDSP3UV/zZxJ0tTQREf/J8195ml4xbIMbRcIdG81ZOef VTm9zDuAibYN3kiXzm6SpyAMoPdBA6IPOxXac8R7I0zUPK8btupQ192Ye4cDYKGf3G81 ncHqPxl18B7wcqqhZhTq4EMd7axqsamgOUcdTX0B4FFl9oKV4DZMIO2T/lTg02z9LYss MqfXkug7z2vEuneuLZRzFzfQkaN82H5DzXFNoVv1Gw20QSjB/9VP0IxQG85yurJpLqFG uneBCatihMs+Mu58ZMgVGgWqVumorFVCs9SYIL/zr3RyWfSmDCZO8wbcWazVDhLbuQk4 nQDg== X-Gm-Message-State: AAQBX9cUJX7ew/RUCwAi7c/E2BBglBom5fePHpP6k+BwTidLKQ4n+CuZ 59r5WthW7urbvUGRPoi5BpI+mOCosVJe X-Google-Smtp-Source: AKy350bH+FT4rO63l4r7xqHnuPynxVbMsgCzCxhntsgRkI9CjhoZf4Ra9qEtMvcWq32MGU3qdNWQmk0U4T9r X-Received: from davidai2.mtv.corp.google.com ([2620:15c:211:201:c162:24e8:ec5e:d520]) (user=davidai job=sendgmr) by 2002:a25:c58f:0:b0:b7d:87f:ce3e with SMTP id v137-20020a25c58f000000b00b7d087fce3emr8231840ybe.6.1680216269063; Thu, 30 Mar 2023 15:44:29 -0700 (PDT) Date: Thu, 30 Mar 2023 15:43:40 -0700 In-Reply-To: <20230330224348.1006691-1-davidai@google.com> Mime-Version: 1.0 References: <20230330224348.1006691-1-davidai@google.com> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog Message-ID: <20230330224348.1006691-6-davidai@google.com> Subject: [RFC PATCH 5/6] dt-bindings: cpufreq: add bindings for virtual kvm cpufreq From: David Dai To: "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , David Dai Cc: Saravana Kannan , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add devicetree bindings for a virtual kvm cpufreq driver. Co-developed-by: Saravana Kannan Signed-off-by: Saravana Kannan Signed-off-by: David Dai --- .../bindings/cpufreq/cpufreq-virtual-kvm.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml new file mode 100644 index 000000000000..31e64558a7f1 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/cpufreq/cpufreq-virtual-kvm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Virtual KVM CPUFreq + +maintainers: + - David Dai + +description: | + + KVM CPUFreq is a virtualized driver in guest kernels that sends utilization + of its vCPUs as a hint to the host. The host uses hint to schedule vCPU + threads and select CPU frequency. It enables accurate Per-Entity Load + Tracking for tasks running in the guest by querying host CPU frequency + unless a virtualized FIE exists(Like AMUs). + +properties: + compatible: + const: virtual,kvm-cpufreq + +required: + - compatible + +additionalProperties: false + +examples: + - | + { + #address-cells = <2>; + #size-cells = <2>; + + cpufreq { + compatible = "virtual,kvm-cpufreq"; + }; + + };