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: 13195213 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 EC289C6FD1D for ; Fri, 31 Mar 2023 01:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbjCaBpX (ORCPT ); Thu, 30 Mar 2023 21:45:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjCaBpS (ORCPT ); Thu, 30 Mar 2023 21:45:18 -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 EAAE71882C for ; Thu, 30 Mar 2023 18:45:00 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5458dde029bso207681507b3.13 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=HUNuDKrwdE/eXBvFCbdS3krETxIBswrGsFqx27LZrCJRllNXY+Iv4qnp6wP28lhmss uGT+I4oNbL3pZdxf2v/KlSv6zwH1fh2O6Mr2KhEyRvPZnFr29Fgf+yVLd+Ixe2sVqNiJ mo6oGJeZuggGYcsbaK4WqSOAOJFQ1vGxrttiJLwFxOqYQFeHASld/qbLdaJt4mrZhYhK 43sxGo0h/EmxuAqZyUpkOuvuDtcjCHQz5XEDwQnw/MoC3hMzz4OPbVPoy8g4m6CWpIIk gn8cHdoK9waABhHPbUeM0o/xgtbX5RwwTlvtWGTq/cA7wXKFmmHVSqolAIiWH89dtbOB mXoQ== X-Gm-Message-State: AAQBX9eJlTVhJA5se7IdprlOTrhjIZekRc9CI3LxCIC8kipKYYVLag4G TsC3oizrHxE2t2T1mtd92Pv+f7ilqkcc 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: linux-pm@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"; + }; + + };