[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGETcx_YhXqgyuWwH7BrMV4-z2LVEq5-X-FtPvmi-9tCrjVXVw@mail.gmail.com>
Date: Wed, 5 Apr 2023 15:07:22 -0700
From: Saravana Kannan <saravanak@...gle.com>
To: Rob Herring <robh+dt@...nel.org>
Cc: David Dai <davidai@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Jonathan Corbet <corbet@....net>,
Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
kernel-team@...roid.com, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev
Subject: Re: [RFC PATCH v2 5/6] dt-bindings: cpufreq: add bindings for virtual
kvm cpufreq
On Fri, Mar 31, 2023 at 5:47 AM Rob Herring <robh+dt@...nel.org> wrote:
>
> On Thu, Mar 30, 2023 at 8:45 PM David Dai <davidai@...gle.com> wrote:
> >
> > Add devicetree bindings for a virtual kvm cpufreq driver.
> >
> > Co-developed-by: Saravana Kannan <saravanak@...gle.com>
> > Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> > Signed-off-by: David Dai <davidai@...gle.com>
> > ---
> > .../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 <davidai@...gle.com>
> > +
> > +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";
> > + };
>
> 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
Powered by blists - more mailing lists