[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABN1KCLbhh9Rf9R2J2UoTS+6Dzc8yysOedKgXizPbQvYuG8tqQ@mail.gmail.com>
Date: Thu, 2 May 2024 13:17:57 -0700
From: David Dai <davidai@...gle.com>
To: Sudeep Holla <sudeep.holla@....com>
Cc: Saravana Kannan <saravanak@...gle.com>, Rob Herring <robh@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, Viresh Kumar <viresh.kumar@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Quentin Perret <qperret@...gle.com>, Masami Hiramatsu <mhiramat@...gle.com>, Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Vincent Guittot <vincent.guittot@...aro.org>,
Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
Dietmar Eggemann <dietmar.eggemann@....com>, Pavan Kondeti <quic_pkondeti@...cinc.com>,
Gupta Pankaj <pankaj.gupta@....com>, Mel Gorman <mgorman@...e.de>, kernel-team@...roid.com,
linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: cpufreq: add virtual cpufreq device
On Thu, Feb 15, 2024 at 3:26 AM Sudeep Holla <sudeep.holla@....com> wrote:
>
> On Fri, Feb 02, 2024 at 09:53:52AM -0600, Rob Herring wrote:
> > On Wed, Jan 31, 2024 at 10:23:03AM -0800, Saravana Kannan wrote:
> > >
> > > We also need the OPP tables to indicate which CPUs are part of the
> > > same cluster, etc. Don't want to invent a new "protocol" and just use
> > > existing DT bindings.
> >
> > Topology binding is for that.
> >
> > What about when x86 and other ACPI systems need to do this too? You
> > define a discoverable interface, then it works regardless of firmware.
> > KVM, Virtio, VFIO, etc. are all their own protocols.
> >
>
> +1 for the above. I have mentioned the same couple of times but I am told
> it can be taken up later which I fail to understand. Once we define DT
> bindings, it must be supported for long time which doesn't provide any
> motivation to such a discoverable interface which works on any virtual
> platforms irrespective of the firmware.
>
Hi Sudeep,
We are thinking of a discoverable interface like this, where the
performance info and performance domain mappings are discoverable
through the device registers. This should make it more portable across
firmwares. Would this address your concerns? Also, you asked to
document this. Where exactly would you want to document this? AFAIK
the DT bindings documentation is not supposed to include this level of
detail. Would a comment in the driver be sufficient?
CPU0..CPUn
+-------------+-------------------------------+--------+-------+
| Register | Description | Offset | Len |
+-------------+-------------------------------+--------+-------+
| cur_perf | read this register to get | 0x0 | 0x4 |
| | the current perf (integer val | | |
| | representing perf relative to | | |
| | max performance) | | |
| | that vCPU is running at | | |
+-------------+-------------------------------+--------+-------+
| set_perf | write to this register to set | 0x4 | 0x4 |
| | perf value of the vCPU | | |
+-------------+-------------------------------+--------+-------+
| perftbl_len | number of entries in perf | 0x8 | 0x4 |
| | table. A single entry in the | | |
| | perf table denotes no table | | |
| | and the entry contains | | |
| | the maximum perf value | | |
| | that this vCPU supports. | | |
| | The guest can request any | | |
| | value between 1 and max perf. | | |
+---------------------------------------------+--------+-------+
| perftbl_sel | write to this register to | 0xc | 0x4 |
| | select perf table entry to | | |
| | read from | | |
+---------------------------------------------+--------+-------+
| perftbl_rd | read this register to get | 0x10 | 0x4 |
| | perf value of the selected | | |
| | entry based on perftbl_sel | | |
+---------------------------------------------+--------+-------+
| perf_domain | performance domain number | 0x14 | 0x4 |
| | that this vCPU belongs to. | | |
| | vCPUs sharing the same perf | | |
| | domain number are part of the | | |
| | same performance domain. | | |
+-------------+-------------------------------+--------+-------+
Thanks,
David
> --
> Regards,
> Sudeep
Powered by blists - more mailing lists