From patchwork Fri Mar 31 01:43:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dai X-Patchwork-Id: 669179 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 EF206C6FD1D for ; Fri, 31 Mar 2023 01:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbjCaBp0 (ORCPT ); Thu, 30 Mar 2023 21:45:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjCaBpS (ORCPT ); Thu, 30 Mar 2023 21:45:18 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA07B18829 for ; Thu, 30 Mar 2023 18:45:00 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 204-20020a2514d5000000b00a3637aea9e1so20757588ybu.17 for ; Thu, 30 Mar 2023 18:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680227097; 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=M/Dq0K05dn7RZdEyBco1zZW8o9aWbWD0tOGYp2aROenD9B8zG0YkXNU+ypXcmNaQHy 4te0VdM4kG75aRgDJAiNeipUhfEk+8e/2sx5TS12tTIKnwevTbmQxo+lHWm8c4GqVIme 9obizM0C3ozNmYHsi7lUhQIGaKT/Br4nuLulq8WoaCHOkuqxJMA1bY+CMXCC0ew5OUZ4 1jdQ0A+60hb3BK31NK4oiYIATEqSpKYaYoTbaF3+E58KDNOd+GbOm3KRIRxTxJKRucQs fJJk6ss0ykBavcFxwDBDlUhiJ9dG27uWdOFRP7shyzkO7Uda44T+RDaamnaXQVhGcf2m ufIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680227097; 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=ks7v7/a/iHU27ceDiBOl/RIGm/X4mTLCp9yk1IbSCyXcH5oNjA3zgpXKLAxsZ4m0hW RSGD3elgj3LoZxbgI9tpHWLWp4CdfF1q4tEucbR+QrY8n3qwSsvqyE4cmBJA4Iqe1SEC 5cIe3Dqpuod097HvGyV3bKpS/MJ6mjmO7CW3ulOsy5Q/qURL5d0WfZRoLOvqhRdy+/hA G2LGd0uqjysAyiTZbX2Di5X2Nji8b+rIazyZ51MlriwC6mif/JqevkSDqFAiQjRYa5O1 9nBSEVgEe02QdYNQPNoGJbX3KUadWg0FQsFOe9k/UfnT6rjfMvJjP/+X6sS0ykpbecvD E8Tg== X-Gm-Message-State: AAQBX9fVBxOWVnl6t+qn1P6IITKLHXsa4Ml1DWu/b61agEwhsNht3xWN K4NjF+5002xl2SqdIPwIfzSK5H1o70DB X-Google-Smtp-Source: AKy350Yd56UldAkJl7asDkNCi90KnSNtQkBy2kVHq8vFVuOOr9KiBt3/jvgItL1ugb+qYv+7kMO0tDmyjIK9 X-Received: from davidai2.mtv.corp.google.com ([2620:15c:211:201:c162:24e8:ec5e:d520]) (user=davidai job=sendgmr) by 2002:a25:344:0:b0:b27:4632:f651 with SMTP id 65-20020a250344000000b00b274632f651mr12517637ybd.3.1680227097054; Thu, 30 Mar 2023 18:44:57 -0700 (PDT) Date: Thu, 30 Mar 2023 18:43:49 -0700 In-Reply-To: <20230331014356.1033759-1-davidai@google.com> Mime-Version: 1.0 References: <20230331014356.1033759-1-davidai@google.com> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog Message-ID: <20230331014356.1033759-6-davidai@google.com> Subject: [RFC PATCH v2 5/6] dt-bindings: cpufreq: add bindings for virtual kvm cpufreq From: David Dai To: "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Paolo Bonzini , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , David Dai Cc: Saravana Kannan , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev 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"; + }; + + };