Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4996504rwb; Mon, 31 Jul 2023 16:21:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvI2Y3NZpenSZCC8nXoMn0TOJ4o2Da3FVMxUkcsvf2k2Sdz0m3raaVEUOHq50OwQ7LaYeP X-Received: by 2002:a17:90a:4489:b0:267:a6c5:e601 with SMTP id t9-20020a17090a448900b00267a6c5e601mr9972490pjg.1.1690845679346; Mon, 31 Jul 2023 16:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690845679; cv=none; d=google.com; s=arc-20160816; b=cGqzO6oizHW/aMEQHK6QcXfkfnII/YbaNJ+NF1Z1hUvxZnzOkuxYBjzX1OCBjKdY7y HCfwlm0CVZWfhmNPD0ouX9LhFyIVof2wt+vxVKOvhBLI3YEURZzhz5mbG9cO/fNb8bwp RwHrKFlld4DnYscXkkCDaCjoVLX2djMrZoS9SlzGYb7O9wh0e30+CBkuct6rf3qS9k5o e9kHyiN8x7bQbfH53pp9Ws8nGrwVM0CWp6yOSoVle8Flg83vsUqj3/Hfy5KQsVAzxdk5 d77EFLb0u5+Z3+DT0uwjwDEb7IcbF7Yel11SDMQF0xrn0++HAMnZOoP1eu4k94KiXpwy 1Ggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gHoaM7eGFNI0KBp/0qw5JaxvSgb4EPXM7prcdF6Gpvo=; fh=4E4hL26mLnd0LBZtdm/u+z54wgSKGzBS5X4pe849u1I=; b=dYqzaH0bgGFWp8MM3HxA6fUKPXFn+2vUf5PzJRgp1fwL95rQNCNt9FZWZPqrYqHs9L 5/P7UIyBC2tqFQXvcAHYgiJwat6XD+BqIxnC9V1wqYZCxmvXK0I2Li5xCnYO9TXLv1CQ ylQO/9ERLoB7s6MSaEHgYPAxEulrO5G0tWXaat3GZNpVIOw1/vVJH6eaTHQxic/HHFzC lBBTJgsLQeKdGtsOQnzV9uxe0lE0OqVm8WXAKN8dSa96k5GfMKikaXROlpTw4i3MzOXw L1o/WbLw0j0oRt9POE0xlt7rS1OiylD6G2PNZjQLyY+tf1hG0b39NpQvXf+TPHYTHojV y17w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YOow06nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020a17090ab31400b00262c146b8cesi4317477pjr.158.2023.07.31.16.21.07; Mon, 31 Jul 2023 16:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YOow06nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbjGaWDM (ORCPT + 99 others); Mon, 31 Jul 2023 18:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbjGaWDA (ORCPT ); Mon, 31 Jul 2023 18:03:00 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E0E7139; Mon, 31 Jul 2023 15:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=gHoaM7eGFNI0KBp/0qw5JaxvSgb4EPXM7prcdF6Gpvo=; b=YOow06njeJ2olbzkCBKb8IZ9Nj jVqID3WRMSIwJ/moJkKieCB6dlOM6c18c0/E525uSPWKhKvDBfNhl9+sz1rfHT7CU0mSzimPsTbJD SK2jmsLU3kM/+Y+W+yFl5k69zuubZRgknxIPJtf1rGYYqD6UM5g0DcZNixGYffLkNEyZaZHbpNAYz mnxoMRdRuuxhHWWwK+QcuIELp00rYFGkNBppcswr9d0vcIkKFOXZRwth+afyxMBZQ4ZhStUOUIrfh vJLv4jqUMgfChpAkgO1/UwuuaC8r5L/k4nORLEkD6rVlDJTDwp5/6ZNJg5U2A4yRLuJa/HKlsXMhI 3TkWjTVw==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qQayW-00HSp6-1h; Mon, 31 Jul 2023 22:02:48 +0000 Message-ID: Date: Mon, 31 Jul 2023 15:02:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 2/2] cpufreq: add virtual-cpufreq driver Content-Language: en-US To: David Dai , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , 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 References: <20230731174613.4133167-1-davidai@google.com> <20230731174613.4133167-3-davidai@google.com> From: Randy Dunlap In-Reply-To: <20230731174613.4133167-3-davidai@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/31/23 10:46, David Dai wrote: > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig > index f429b9b37b76..3977ca796747 100644 > --- a/drivers/cpufreq/Kconfig > +++ b/drivers/cpufreq/Kconfig > @@ -217,6 +217,21 @@ config CPUFREQ_DT > > If in doubt, say N. > > +config CPUFREQ_VIRT > + tristate "Virtual cpufreq driver" > + depends on OF > + select PM_OPP > + help The 4 lines above should be indented with one tab (not 8 spaces). > + This adds a virtualized cpufreq driver for guest kernels that > + read/writes to a MMIO region for a virtualized cpufreq device to reads/writes to an MMIO region > + communicate with the host. It sends frequency updates to the host > + which gets used as a hint to schedule vCPU threads and select CPU > + frequency. If a VM does not support a virtualized FIE such as AMUs, > + it updates the frequency scaling factor by polling host CPU frequency > + to enable accurate Per-Entity Load Tracking for tasks running in the guest. > + > + If in doubt, say N. -- ~Randy