Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2854770lqo; Mon, 20 May 2024 21:32:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRL6B8Qax84k53SPBUzE1zMDsoo8PKPzB9xXNTAgESBmrBCHaQ6bqBoASPCaoi9V/Y142g83O43ME6uUmp8XWimAb2ZMyVkK3bj8xk3g== X-Google-Smtp-Source: AGHT+IHyWv5ndGvJp6SyR571ZNBgcBfgIy35PQaeCHiRmWXGu+iBWsQmBVyXMgzKFWXBU6QO+uK0 X-Received: by 2002:a05:6214:5b82:b0:6aa:9998:3170 with SMTP id 6a1803df08f44-6aa999832e1mr41725246d6.22.1716265938407; Mon, 20 May 2024 21:32:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716265938; cv=pass; d=google.com; s=arc-20160816; b=Lp6KjlsUDjVvfip+TEhKq8Kwke5oTkTAKSabTFaTphgiy4wECag6IDdnJXH1p89JqJ aveS8sg0U/DMwqLHzitCdBEmggxltFXLHNqVtkaxAMJy3ZXBSlAGtvsMjA70p5ipLeZ9 VoCAvf7ViDby287J5/bsVV+EIt7KxMiblXMdWYG51pBCb8u4QSmeE14xiUQNAf2OZGOT KyV5dMfdC9aVkvLKJQx/qXBLVDvAIyUS+7QyxIShImxl6xD7N9pDN4KJOk/9skg4aWtb ypBwY5pSB2lhUZ4IrF/RxKHhcCUmRL7jgKfECifNiWHWy21m3wAiNh00FtRjRPsAj21o Ls2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=JYMeQLigsijt5Vd63qHRbjZn+nihymDP7t8hjQqISCc=; fh=1IhCnSU6t+6KHDlREgFxfaj/4JEWmzzobU45Pn4B2FM=; b=vv1KrQpVc18ubCcwUCqiB1ocyOKOzcFFvgeT0pbbEpy5tN2tHsiy4t+tJtNy8rkpqA /FSR39kIW+JKSja2I1UVcp5JwOQ6R+58p3eQt7ZS23h1GMev/EoGeGuMraOE8Z4UlXxF r4b0iS0NNvXidMQWMKBV+xgCAr667D7ZkzphKA4cLUXez7+RcrnNvn4TqrPtXhnvfvn3 xlMMbqvpTG7uYsl3lRCsfdbJSkZQNC41m4EE1Xdf5veYVZik9qDsIjciCCvvzQLLsPKK N/6twYO/NnnAbg1SIWK+LQqosl6sKiq1TL7H6hT/w1RIGdc4AV+yPzuLiWnGO8dcTKbK pINQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sC1Oadl3; arc=pass (i=1 spf=pass spfdomain=flex--davidai.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-184489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6aafb770bb5si21503506d6.84.2024.05.20.21.32.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 21:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sC1Oadl3; arc=pass (i=1 spf=pass spfdomain=flex--davidai.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-184489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1ABB61C20321 for ; Tue, 21 May 2024 04:32:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 341743FB3B; Tue, 21 May 2024 04:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sC1Oadl3" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E008A2E85A for ; Tue, 21 May 2024 04:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716265919; cv=none; b=AWk5fK9EO5D/nFd1uLdGIi6Rict+ua5vn5n9VdisgNa2nKvK471z+l29myoD4k6oIM2YONoYysNTk8120Jl4F2KH3W68XTE9ljfjUMoTwC7RlKjOoU+FRp7DH5mLy6ll/dVOmCIF7EesqiVRmTfQvwNQWV1aryRRWbaDgeTXOEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716265919; c=relaxed/simple; bh=O4FuQzq87q5Gl4pSbrtEQJa0TSgByHcVu33I3F4fdWI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=rIvCSYtWcq8AccPZXp/BVKoVZdq+/Cl18TBJBjeOHi+bonTSpauouEKFrE3Yv6CZydf6VKaYRD4rBDT3hQzb3s4Yz2SsoxfGpEKbspI/NkkEyO8gypHrtUlCLTZEG6dK78eYlRIPQsInhOFXtxaPX3s7YM6buDgzO/KKwlAOVLY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--davidai.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sC1Oadl3; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--davidai.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-61d21cf3d3bso215163647b3.3 for ; Mon, 20 May 2024 21:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716265917; x=1716870717; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=JYMeQLigsijt5Vd63qHRbjZn+nihymDP7t8hjQqISCc=; b=sC1Oadl3kSJGAnVlxLIQiRg0JJnbLGKJ/KMmhDDDdmev3hcSnNrV9w1A9q3u1TbMzk KZ3GvnZPRm8D5is0v8SnX5g1vjMWFey+Zp33Ww5gvaM6yq9WiEVQFZJ0lClwXnQ7J01M em1VB/1amepv1YMDWMyra0zQdV072sXFrZD/eZ6KfsljTMTiejHobKKDvvFXlKfdJnni c5AS5u26XwAj0zvB36ecLi18OMMImMOOcEreXY7/QC1lekTitBP+0EYYagATlqU1te9v YGEq64A9zTV6rM/eD2kPqyeE7btQEEMifL+/danONutEY2hx3P2STdyObbIf7HNPMbOQ vIsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716265917; x=1716870717; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JYMeQLigsijt5Vd63qHRbjZn+nihymDP7t8hjQqISCc=; b=ZR+lrS3GH75Q3bb6oRBoOQ9wujhJcgAl4O0Qi8SvyqRuSBjwVVbjplpXI0bKcbpZA3 annxS0NJorUVR/77QEuwgdw4VuQPIYlJT30PSfQb61zNdX+Dojkp/av/rwGJRyP57n6J ZgVUg8hU2q7r83O4ycx2ifHIQUwDEfJ3FulO3bPsHN3BCWMoPGkm9RvAZq7LZShGBHAN eaHejUi16ks6PlGGvpDJ0Qm05AEZhJoXgFS2lsrBT2y4apb6cHzBUw9Jj+hAcMSf32+Y ej329V2LGB5CLS1JRSXii/ZBdWg5LpaibmWM+in6+Fk2P4vZwpgLGMxcxTazE9TpwlqU m3xQ== X-Forwarded-Encrypted: i=1; AJvYcCX96HLPjajbc89l/WMEMHr201jYkM2s74H7hjgfxvzefzgjn8m41GLCfXDgd7hlOKlCiLl+U0L+Z6gzgxmVgeLAx1dRpQibOr8SW4ls X-Gm-Message-State: AOJu0YyN0NLqBPiYmaD4FL7pNzGkDoP0WdheMekYzRcHSS6mYxKClfL4 INc9VGYnrnCh/FQSmiZ5u5vQAVKCE1RPFVYZ86lIYpROhLDksoKqoofACaAaZLp0WvRP0NdRZGP PjvH8nw== X-Received: from davidai2.mtv.corp.google.com ([2620:15c:211:201:ffe6:3bcf:e120:a07a]) (user=davidai job=sendgmr) by 2002:a0d:d855:0:b0:627:8b31:e81 with SMTP id 00721157ae682-6278b3116famr21076067b3.5.1716265916846; Mon, 20 May 2024 21:31:56 -0700 (PDT) Date: Mon, 20 May 2024 21:30:51 -0700 In-Reply-To: <20240521043102.2786284-1-davidai@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240521043102.2786284-1-davidai@google.com> X-Mailer: git-send-email 2.45.0.215.g3402c0e53f-goog Message-ID: <20240521043102.2786284-2-davidai@google.com> Subject: [PATCH v6 1/2] dt-bindings: cpufreq: add virtual cpufreq device From: David Dai To: "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , David Dai , Saravana Kannan Cc: Quentin Perret , Masami Hiramatsu , Will Deacon , Peter Zijlstra , Vincent Guittot , Marc Zyngier , 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 Content-Type: text/plain; charset="UTF-8" Adding bindings to represent a virtual cpufreq device. Virtual machines may expose MMIO regions for a virtual cpufreq device for guests to read performance information or to request performance selection. The virtual cpufreq device has an individual controller for each performance domain. Performance points for a given domain can be normalized across all domains for ease of allowing for virtual machines to migrate between hosts. Co-developed-by: Saravana Kannan Signed-off-by: Saravana Kannan Signed-off-by: David Dai --- .../cpufreq/qemu,virtual-cpufreq.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/qemu,virtual-cpufreq.yaml diff --git a/Documentation/devicetree/bindings/cpufreq/qemu,virtual-cpufreq.yaml b/Documentation/devicetree/bindings/cpufreq/qemu,virtual-cpufreq.yaml new file mode 100644 index 000000000000..018d98bcdc82 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/qemu,virtual-cpufreq.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/cpufreq/qemu,virtual-cpufreq.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Virtual CPUFreq + +maintainers: + - David Dai + - Saravana Kannan + +description: + Virtual CPUFreq is a virtualized driver in guest kernels that sends performance + selection of its vCPUs as a hint to the host through MMIO regions. Each vCPU + is associated with a performance domain which can be shared with other vCPUs. + Each performance domain has its own set of registers for performance controls. + +properties: + compatible: + const: qemu,virtual-cpufreq + + reg: + maxItems: 1 + description: + Address and size of region containing performance controls for each of the + performance domains. Regions for each performance domain is placed + contiguously and contain registers for controlling DVFS(Dynamic Frequency + and Voltage) characteristics. The size of the region is proportional to + total number of performance domains. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <1>; + #size-cells = <1>; + + cpufreq@1040000 { + compatible = "qemu,virtual-cpufreq"; + reg = <0x1040000 0x2000>; + }; + }; -- 2.45.0.215.g3402c0e53f-goog