From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 811A4DDB2; Fri, 8 Dec 2023 08:52:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O43+9heA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FDAFC433C8; Fri, 8 Dec 2023 08:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702025574; bh=GGin+ffmFsAIIYI0+FuoqvMAJCTZtM17ET3mTliENQE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=O43+9heARsbU18XvLBdff7nNufEQual/uVGCvfWn6gumNvg2tSX5iQ14tOUctWqw6 0MsQb/OHgBknXG0VWJ8j/WasCDxrhCGMH2yXu9wm7kOoX1sPXN+s23icXnBXwIw0z/ H3oH7obvoR0UewEZYV2LTQGA0S60B11l8xjWKreoTdgtd+8UW+L1N3ESCRtYNltpFJ yVrLt90uWCL39G/veTh62fC4/Rv9mJLxpHJ9ba0WRh9xkSk2Xn8eIIvIXjWJ6mN9Th Q4eZif+jciBgg27H4h8balCwgMGgZH6zeOjnrp+8ICemZ14rpCS3mwTCikTZeqeuPf 8oHw/B1Gf3ZCQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rBWbL-002THO-BF; Fri, 08 Dec 2023 08:52:51 +0000 Date: Fri, 08 Dec 2023 08:52:50 +0000 Message-ID: <867clpaxel.wl-maz@kernel.org> From: Marc Zyngier To: Saravana Kannan Cc: David Dai , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Quentin Perret , Masami Hiramatsu , Will Deacon , Peter Zijlstra , Vincent Guittot , Oliver Upton , Dietmar Eggemann , Pavan Kondeti , Gupta Pankaj , Mel Gorman , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] dt-bindings: cpufreq: add virtual cpufreq device In-Reply-To: References: <20231111014933.1934562-1-davidai@google.com> <20231111014933.1934562-2-davidai@google.com> <865y231jvj.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: saravanak@google.com, davidai@google.com, rafael@kernel.org, viresh.kumar@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, sudeep.holla@arm.com, qperret@google.com, mhiramat@google.com, will@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, oliver.upton@linux.dev, dietmar.eggemann@arm.com, quic_pkondeti@quicinc.com, pankaj.gupta@amd.com, mgorman@suse.de, kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 07 Dec 2023 22:44:36 +0000, Saravana Kannan wrote: >=20 > On Wed, Nov 15, 2023 at 12:49=E2=80=AFAM Marc Zyngier wr= ote: > > > > On Sat, 11 Nov 2023 01:49:29 +0000, > > David Dai wrote: > > > > > > Adding bindings to represent a virtual cpufreq device. > > > > > > Virtual machines may expose MMIO regions for a virtual cpufreq device > > > for guests to read frequency information or to request frequency > > > selection. The virtual cpufreq device has an individual controller for > > > each frequency domain. > > > > I would really refrain form having absolute frequencies here. A > > virtual machine can be migrated, and there are *zero* guarantees that > > the target system has the same clock range as the source. > > > > This really should be a relative number, much like the capacity. That, > > at least, can be migrated across systems. >=20 > There's nothing in this patch that mandates absolute frequency. > In true KVM philosophy, we leave it to the VMM to decide. This has nothing to do with KVM. It would apply to any execution environment, including QEMU in TCG mode. To quote the original patch: + description: + Address and size of region containing frequency controls for each of= the + frequency domains. Regions for each frequency domain is placed + contiugously and contain registers for controlling DVFS(Dynamic Freq= uency + and Voltage) characteristics. The size of the region is proportional= to + total number of frequency domains. What part of that indicates that *relative* frequencies are acceptable? The example explicitly uses the opp-v2 binding, which clearly is about absolute frequency. To reiterate: absolute frequencies are not the right tool for the job, and they should explicitly be described as relative in the spec. Not left as a "whatev'" option for the execution environment to interpret. M. --=20 Without deviation from the norm, progress is not possible.