Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2202103rdb; Fri, 8 Dec 2023 00:53:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEA0jOgjokSP4thet8sYcyol3Ezu2Fk9OmVSblr3Rn+33uCH8DEdvHe+wIh3nYtZKBR0NE6 X-Received: by 2002:a05:6a00:2d88:b0:6ce:61e4:862f with SMTP id fb8-20020a056a002d8800b006ce61e4862fmr3840929pfb.53.1702025584388; Fri, 08 Dec 2023 00:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702025584; cv=none; d=google.com; s=arc-20160816; b=SiAe/lnhNfQ84ut8DMP1h3bsvdZAD+vpUfbLeoOYCQyda/A9bT69+NxeViSWwqGqCl iO1G6fcsy2dELbCxg3/+R0b3f/Z0ML7Pujv4Rl77s9EJQ9l+SksOm4rj6I26D5K56EHv yXifKPAw643W3CRn6RdwmKGFUlsIf7/PjPxDhH1FYE0/vTs6NcugfakDey6n4GzJEzEY dglQsaLS7octV1SblWJGPxeToAGILTmsMitBCoNdlRfnQ3foREPLA0hgbUNgHkeRpV7p aQbqyZLOZ4flYZ3wW4obIu3EZcXNkLIbn8129BWejnlFE2+MFMSTEky91BHOYPWr4hws lIOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=Z4iLbuFL4b9Llnbf9pUNXefmRj7JEzMb2KegpXbpicU=; fh=TbQYqMfTQZGhFhw9aW4TaHLSUSusKGq1ns2xDVq5b34=; b=Gg3DosJOKY7y7hI4KseFgmm9/UN0V0JkdJMlzQmWEqd/iDu8ouPt6/Lg4DwSIemLf4 l4jKg1tqNav7YYo+EvopGLD9jXXcZjWbVqquoiXBsUlripIdCL+dxWN71/KleiOVW8bD YT6XcAwOc1mp0TGn2ZGvAURdjCnzpovNBDxAsecjeM6XIGOYp3opigT3NGtHVSXZHzFV 8Em0JWOIRgcW6G1HBuWiEkEjQF4V27d8Q1zrsZ5ca+fIFf3vxtjqI6JV4TFpddIUY1F2 V+fI5Rf/8+QZY9Bo/MCLpWlk3xeSZA0X3JVLmEY9au0JLG0OKmfDNnhYWOMpyuzFOzxq FwIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O43+9heA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id b2-20020a655cc2000000b005c21722b7d6si1164705pgt.863.2023.12.08.00.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 00:53:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O43+9heA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9C3A9829AA2E; Fri, 8 Dec 2023 00:53:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573374AbjLHIwt (ORCPT + 99 others); Fri, 8 Dec 2023 03:52:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232892AbjLHIws (ORCPT ); Fri, 8 Dec 2023 03:52:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81DD4171C for ; Fri, 8 Dec 2023 00:52:54 -0800 (PST) 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) 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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 00:53:01 -0800 (PST) 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.