Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1307427rwl; Wed, 5 Apr 2023 15:12:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZlCo3bWeqfG6ZweDQj2YB7OX+0pAJ4JHriH8SqnP49NOkvrS4ac9nYg8oPZbyuY9g0YPH8 X-Received: by 2002:a05:6402:3d9:b0:4fd:2346:7225 with SMTP id t25-20020a05640203d900b004fd23467225mr3566586edw.34.1680732723589; Wed, 05 Apr 2023 15:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680732723; cv=none; d=google.com; s=arc-20160816; b=SRtPQyUmELWGiLCt48bl24Wo+Ai90IKqbMOi15PuMPALlfv8LcbZ6+tp5XQT6o89hu NCjtQ/MyFejXgbViTowYfEzwz7Xd+DvhYdZ+9LvmCAvgYi7BXHofrfmDBndViBKWShUL XWIpoZ0uDHs8kEAtVdT5HM/nOCzlspIgMWr9a5SOzQRGSR8snPm4LyS15FIxPUk/HQQ6 +Lu48ORJN2mC87xJqtAlUP7duee+ycKIOV/ZbCYuHTi0IeLO1nqEOPCrNcQmcu5RRDwd 0pNGEdsX4LcOQhXa8AKUU7tyWAjrk828It73Qn5GbWD8SV0VUYTAfZaMdxqTTqLdH74C +25w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6G4NsFlCDV5fs2a2Hk+HPn6BW+TSo8l8fhvL/n7IKto=; b=nA/M4JPwhBJuPcM6nrFDVPBQtZ7lWLK8HEgfU3dh9gTG+5MqKUMioXwwMvyRg2P02R 3PoZG7f4JeSdOuD7BvbH1DStrV7DERjm9yaltPrLQMFYsr+YA6bXwe1dcExWNCXduzBz qiyTWJFhx/WPfkBHVW9wxkj3uR0KvlODnCcSlmYp9XGPefk6i07pbEgMUmWyLwlXg1v4 iWk/G+IIbdvHqBjd92KJ4swCon+TPA5tG1VFNKrXSeWJ1kefqcNU/Bk0S7lUR15zodzK znm4+FXAYACQ1YYHAVfdEkfVU/mzCV8Gh4VqsfCPPK8IDy8cE+QjVpoJASKGi2EVmyVx jHmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Co/XH8kh"; 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 r1-20020a056402034100b0050202fbb587si8020edw.352.2023.04.05.15.11.38; Wed, 05 Apr 2023 15:12:03 -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="Co/XH8kh"; 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 S232955AbjDEWIE (ORCPT + 99 others); Wed, 5 Apr 2023 18:08:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231880AbjDEWIB (ORCPT ); Wed, 5 Apr 2023 18:08:01 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66485267 for ; Wed, 5 Apr 2023 15:07:59 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id cm5so18803647pfb.0 for ; Wed, 05 Apr 2023 15:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680732479; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6G4NsFlCDV5fs2a2Hk+HPn6BW+TSo8l8fhvL/n7IKto=; b=Co/XH8kheGMcW5639kFQflWIBdRbseeE5Rgi33B4NHAwkIuhJ8cRjGblOk3jTnpe3M r8NDGd4BbIPvGUCTtlIr1C3Zi3M3kVBDoSPBmqFnbVUgJEH+rMm0xic9kbB5F1PS469K v1mqbc0XbrOyTEZFxU0ygPvmf+3dHmAY6CsJ9O7wnH7swCU/AVkriErypZpzAdgN2JX5 g7RiLqySQwykhvK9Yp436hJ6RVIMG7NxCvKb3YHlnhCMdin4lAC9yBtRjNUKm8bUitaS sSu9j6TkAiYHkxQxzNBHO0Xb9op6XALV5XasEjMG0VTfxTM7nkVUzYMSqHE97uOdWJz9 t2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680732479; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6G4NsFlCDV5fs2a2Hk+HPn6BW+TSo8l8fhvL/n7IKto=; b=4rJysrSQJbGIJBEBDP6qlw6OB7kT9Ufv5vA7PKtiOoEhV1wbrlGLR5LrLQ0ec/nOep kvRVopv3g0VsM5u3cXiblA2xh/peZnXL18wtnnXCGHazDwfAMLUd6djBrH+0mHZcvsPF nm+XY8fgFo50k/zKzhrZNunzsj+2T873B+1Tskt88I/BX5/IVBU0dppJGYjAYSJwXKH2 0CqcgreMQ9fl3CbT7VsK98cwp5EaqHo2ARjH35HQH6QvCnoMNpEo9IfoCizh837HqUbV BmWivHYbctlnS0ByyYR3nIX8znQYF/4WQ9K6X/p/wQIdKQy2HAUMTw61FnK/sqWCC/9L pkZg== X-Gm-Message-State: AAQBX9fN4BxDEwgvRvySeiXJBmhlmZjar6RSP37737kr+UbkPR+0vJU5 KIppaU9D8zKyGt5KwuAksrd5ye37sZQiNk8ItqcCbQ== X-Received: by 2002:a05:6a00:999:b0:625:cda5:c28c with SMTP id u25-20020a056a00099900b00625cda5c28cmr4345578pfg.6.1680732478867; Wed, 05 Apr 2023 15:07:58 -0700 (PDT) MIME-Version: 1.0 References: <20230331014356.1033759-1-davidai@google.com> <20230331014356.1033759-6-davidai@google.com> In-Reply-To: From: Saravana Kannan Date: Wed, 5 Apr 2023 15:07:22 -0700 Message-ID: Subject: Re: [RFC PATCH v2 5/6] dt-bindings: cpufreq: add bindings for virtual kvm cpufreq To: Rob Herring Cc: David Dai , "Rafael J. Wysocki" , Viresh Kumar , 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 , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_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 On Fri, Mar 31, 2023 at 5:47=E2=80=AFAM Rob Herring wr= ote: > > On Thu, Mar 30, 2023 at 8:45=E2=80=AFPM David Dai wr= ote: > > > > 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-v= irtual-kvm.yaml > > > > diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-= kvm.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.ya= ml > > new file mode 100644 > > index 000000000000..31e64558a7f1 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yam= l > > @@ -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 util= ization > > + of its vCPUs as a hint to the host. The host uses hint to schedule v= CPU > > + threads and select CPU frequency. It enables accurate Per-Entity Loa= d > > + Tracking for tasks running in the guest by querying host CPU frequen= cy > > + unless a virtualized FIE exists(Like AMUs). > > + > > +properties: > > + compatible: > > + const: virtual,kvm-cpufreq > > + > > +required: > > + - compatible > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + { > > + #address-cells =3D <2>; > > + #size-cells =3D <2>; > > + > > + cpufreq { > > + compatible =3D "virtual,kvm-cpufreq"; > > + }; > > The same thing was tried on non-virtual h/w too. This is not a device > so it doesn't go in DT. It is just an abuse of DT as a kernel driver > instantiation mechanism. Because it has no registers it's reading and writing, right? Yeah, just went with this for now to make it easy for people to cherry pick and test it. Maybe we shouldn't have added documentation and made this look too official. In the end, I'm expecting this will be a real MMIO device. Until we move from RFC to PATCH, feel free to ignore this patch. -Saravana