From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 3E26817C7 for ; Sat, 1 Apr 2023 03:28:25 +0000 (UTC) Received: by mail-pl1-f177.google.com with SMTP id w4so23180762plg.9 for ; Fri, 31 Mar 2023 20:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680319704; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1aOQ4eYy8N4YCSiaLMCwB/yerXMVOmw3wp9ck3pUmQA=; b=Ok8vzWQ0fTWrdQmBekE/vwQkYJaeU+hCLGvU18l6tpgh+LY+guFyw1PCOkt6cTIDi2 Bi2rSAQ4ZWcSGNL5VXFZfhfY9W+UUMxFc836pBNMtI/YKiNa3lkmWiIeZkq/HOE2i6v1 CrYVfVRFvUIKsb9OYQYZttYR9+0qI6gi6G2q3B6O6heI5B6NINqaX8Decf4bPIdmgNnw OaJfm9V/8H+3AActZ4CZ6pmApo3U2T1Addxc3QfoMJxKRJcGIg7WF89sAh+ZjT4HrCSn og13ZG7hFc8Nl0yLoQjtBu0DXS/TVzMXnQhNidB4L5HU73Pr3qRkc91hBgz7qlyfdc9C 2WzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680319704; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1aOQ4eYy8N4YCSiaLMCwB/yerXMVOmw3wp9ck3pUmQA=; b=jnDiIcKMlbKaZ5ciLz52VNumgJlkhFQLLvdyj74X8hXtJLgCZKG0igxy2vH9LmTzgz OvDa27fU+DkHY6/JU2vy+yn1cKRvYlVEgq51dDpITrShQ+N3lu+9FMISJPpaFI7oIR4X fjsFJUCdtilRdo3Y6jNuHf9veWt6IUCHPtCKE5lY7mRoasldJ4dFxsB3CFBkVBK0hhEp ps8fWN7XQykljMFGQ4utpdNWFnWPcyFbaxxIWtk55moQYRrY6YBDwULb3lLHX3G8fm88 MAcQI6d2w170uheSz5QIHQ/lrGY6rqDqiCHqpbTJGQaQUhhoX2RHUvCUS6mQHdnvgqCU 2Vxg== X-Gm-Message-State: AAQBX9dvb6FIQxHP7UPwANZR6NkqEynkQPxzO5jWPSsod3BwP0F+sNyL rp2RrbF5yo0WswUmxxG4PN8= X-Google-Smtp-Source: AKy350Yoi20kGNomZnY7Fh4bdxg2fFhnur0eeEf88TS9IaTsvuK0id2OfKq0eADwsFcWp5pRxAwcFg== X-Received: by 2002:a17:902:f683:b0:1a0:7156:f8d1 with SMTP id l3-20020a170902f68300b001a07156f8d1mr37983907plg.19.1680319704568; Fri, 31 Mar 2023 20:28:24 -0700 (PDT) Received: from debian.me (subs02-180-214-232-71.three.co.id. [180.214.232.71]) by smtp.gmail.com with ESMTPSA id f6-20020a170902ab8600b001a1f5dc64e5sm2271330plr.177.2023.03.31.20.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 20:28:24 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id CC3F510677D; Sat, 1 Apr 2023 10:28:21 +0700 (WIB) Date: Sat, 1 Apr 2023 10:28:21 +0700 From: Bagas Sanjaya To: David Dai , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Paolo Bonzini , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Cc: Saravana Kannan , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [RFC PATCH v2 4/6] kvm: arm64: Add support for get_freqtbl service Message-ID: References: <20230331014356.1033759-1-davidai@google.com> <20230331014356.1033759-5-davidai@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230331014356.1033759-5-davidai@google.com> On Thu, Mar 30, 2023 at 06:43:48PM -0700, David Dai wrote: > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst > index 38ce33564efc..8f905456e2b4 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -8400,6 +8400,14 @@ after normalizing for architecture. This is useful when guests are tracking > workload on its vCPUs. Util hints allow the host to make more accurate > frequency selections and task placement for vCPU threads. > > +8.42 KVM_CAP_GET_CPUFREQ_TBL > +--------------------------- > + > +:Architectures: arm64 > + > +This capability indicates that the KVM supports getting the > +frequency table of the current CPU that the vCPU thread is running on. > + > 9. Known KVM API problems > ========================= > > diff --git a/Documentation/virt/kvm/arm/get_freqtbl.rst b/Documentation/virt/kvm/arm/get_freqtbl.rst > new file mode 100644 > index 000000000000..f6832d7566e7 > --- /dev/null > +++ b/Documentation/virt/kvm/arm/get_freqtbl.rst > @@ -0,0 +1,23 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +get_freqtbl support for arm/arm64 > +============================= > + > +Allows guest to query the frequency(in KHz) table of the current CPU that > +the vCPU thread is running on. > + > +* ARM_SMCCC_VENDOR_HYP_KVM_GET_CPUFREQ_TBL_FUNC_ID: 0x86000042 > + > +This hypercall uses the SMC32/HVC32 calling convention: > + > +ARM_SMCCC_VENDOR_HYP_KVM_GET_CPUFREQ_TBL_FUNC_ID > + ============== ======== ===================================== > + Function ID: (uint32) 0x86000042 > + Arguments: (uint32) index of the current CPU's frequency table > + Return Values: (int32) NOT_SUPPORTED(-1) on error, or > + (uint32) Frequency table entry of requested index > + in KHz > + of current CPU(r1) > + Endianness: Must be the same endianness > + as the host. > + ============== ======== ===================================== Sphinx reports htmldocs warnings: /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. 8.42 KVM_CAP_GET_CPUFREQ_TBL --------------------------- /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. 8.42 KVM_CAP_GET_CPUFREQ_TBL --------------------------- /home/bagas/repo/linux-kernel/Documentation/virt/kvm/arm/get_freqtbl.rst:4: WARNING: Title underline too short. get_freqtbl support for arm/arm64 ============================= I have applied the fixup: ---- >8 ---- diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index baf8a4c43b5839..3579c470375938 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8401,7 +8401,7 @@ workload on its vCPUs. Util hints allow the host to make more accurate frequency selections and task placement for vCPU threads. 8.42 KVM_CAP_GET_CPUFREQ_TBL ---------------------------- +---------------------------- :Architectures: arm64 diff --git a/Documentation/virt/kvm/arm/get_freqtbl.rst b/Documentation/virt/kvm/arm/get_freqtbl.rst index f6832d7566e7e5..215bf0f653e461 100644 --- a/Documentation/virt/kvm/arm/get_freqtbl.rst +++ b/Documentation/virt/kvm/arm/get_freqtbl.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 get_freqtbl support for arm/arm64 -============================= +================================= Allows guest to query the frequency(in KHz) table of the current CPU that the vCPU thread is running on. Thanks. -- An old man doll... just what I always wanted! - Clara From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01263C76196 for ; Sat, 1 Apr 2023 03:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HuyWS0+xRtKMKnRGEVWdEhZj8US5jJzv/bjrWGPyt7o=; b=XnzRLtSXrojurB ZHwf9/hdM+b3DzFWLnaGwdJe9EcwnuaFjTyMeCMW/Kw/TD2uEYBnaAQlmGXCYVthQMiS/5mzv+Zis Kwss6GaNYKod2GSqIKPde9lT0CvFRqI8lmQ56A2f/IBkxObajefWjbbWUEdvPvyHnpOu1xM3+knYm +8kN57LK+jgMwQP4IwrfTGhyxMsett+L/ie3G2NhY+gk1FNgxL+Ks3xx9h5iX4j1AKsCUj0bLMXqb k2EGWalQkURfOU9iXTD0LCd9SIzNFKx+sKG0N/5EwTLsehjSlf5jZ4fyIVmdE3sW8qzf9hxOpIhMu NguMPjFzRm4cqA3F3uwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1piRun-009eJI-1i; Sat, 01 Apr 2023 03:28:29 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1piRuk-009eIX-1v for linux-arm-kernel@lists.infradead.org; Sat, 01 Apr 2023 03:28:28 +0000 Received: by mail-pl1-x62e.google.com with SMTP id z19so23217737plo.2 for ; Fri, 31 Mar 2023 20:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680319704; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1aOQ4eYy8N4YCSiaLMCwB/yerXMVOmw3wp9ck3pUmQA=; b=Ok8vzWQ0fTWrdQmBekE/vwQkYJaeU+hCLGvU18l6tpgh+LY+guFyw1PCOkt6cTIDi2 Bi2rSAQ4ZWcSGNL5VXFZfhfY9W+UUMxFc836pBNMtI/YKiNa3lkmWiIeZkq/HOE2i6v1 CrYVfVRFvUIKsb9OYQYZttYR9+0qI6gi6G2q3B6O6heI5B6NINqaX8Decf4bPIdmgNnw OaJfm9V/8H+3AActZ4CZ6pmApo3U2T1Addxc3QfoMJxKRJcGIg7WF89sAh+ZjT4HrCSn og13ZG7hFc8Nl0yLoQjtBu0DXS/TVzMXnQhNidB4L5HU73Pr3qRkc91hBgz7qlyfdc9C 2WzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680319704; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1aOQ4eYy8N4YCSiaLMCwB/yerXMVOmw3wp9ck3pUmQA=; b=osZE/LlxjEijtq1YvBcxSqOsVwLnmT2AEEoQOpkWSqJISa26sYXYh17e6abi5aGQII Ul2CZnUDZtltnI3ROpHyFmWTj9cuLVLlGtgntfuMKU3nRcA6GSOc1egATASFpe6UG0Uv 8sTdSjGQiLkQwoqicVVo02RCX+d/HstsZ5bjHRQXFjTZsLignWm0b5KtUZf9VyOQCzej PB+vAPyz7BFyGCI5ejxi7D7p93hWblNyOQ6IROzSgq4fbnO8LIVV9I31KpWebLnp5N5e arMtR+wjSEFUkJRIT8WBTXUtGHWjzBWi87fSfs+vAHLenSM1AIGsrz9ErABCcsw/Kvjc OYZg== X-Gm-Message-State: AAQBX9fHb2uRqCoV0G3HlybDCCvoGpr0OdP6di0QyA32uFihBidlEprA MujGwtOFiPQaohkWyvDgsdU= X-Google-Smtp-Source: AKy350Yoi20kGNomZnY7Fh4bdxg2fFhnur0eeEf88TS9IaTsvuK0id2OfKq0eADwsFcWp5pRxAwcFg== X-Received: by 2002:a17:902:f683:b0:1a0:7156:f8d1 with SMTP id l3-20020a170902f68300b001a07156f8d1mr37983907plg.19.1680319704568; Fri, 31 Mar 2023 20:28:24 -0700 (PDT) Received: from debian.me (subs02-180-214-232-71.three.co.id. [180.214.232.71]) by smtp.gmail.com with ESMTPSA id f6-20020a170902ab8600b001a1f5dc64e5sm2271330plr.177.2023.03.31.20.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 20:28:24 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id CC3F510677D; Sat, 1 Apr 2023 10:28:21 +0700 (WIB) Date: Sat, 1 Apr 2023 10:28:21 +0700 From: Bagas Sanjaya To: David Dai , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Krzysztof Kozlowski , Paolo Bonzini , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Cc: Saravana Kannan , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [RFC PATCH v2 4/6] kvm: arm64: Add support for get_freqtbl service Message-ID: References: <20230331014356.1033759-1-davidai@google.com> <20230331014356.1033759-5-davidai@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230331014356.1033759-5-davidai@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230331_202826_653974_1EA92616 X-CRM114-Status: GOOD ( 21.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 30, 2023 at 06:43:48PM -0700, David Dai wrote: > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst > index 38ce33564efc..8f905456e2b4 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -8400,6 +8400,14 @@ after normalizing for architecture. This is useful when guests are tracking > workload on its vCPUs. Util hints allow the host to make more accurate > frequency selections and task placement for vCPU threads. > > +8.42 KVM_CAP_GET_CPUFREQ_TBL > +--------------------------- > + > +:Architectures: arm64 > + > +This capability indicates that the KVM supports getting the > +frequency table of the current CPU that the vCPU thread is running on. > + > 9. Known KVM API problems > ========================= > > diff --git a/Documentation/virt/kvm/arm/get_freqtbl.rst b/Documentation/virt/kvm/arm/get_freqtbl.rst > new file mode 100644 > index 000000000000..f6832d7566e7 > --- /dev/null > +++ b/Documentation/virt/kvm/arm/get_freqtbl.rst > @@ -0,0 +1,23 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +get_freqtbl support for arm/arm64 > +============================= > + > +Allows guest to query the frequency(in KHz) table of the current CPU that > +the vCPU thread is running on. > + > +* ARM_SMCCC_VENDOR_HYP_KVM_GET_CPUFREQ_TBL_FUNC_ID: 0x86000042 > + > +This hypercall uses the SMC32/HVC32 calling convention: > + > +ARM_SMCCC_VENDOR_HYP_KVM_GET_CPUFREQ_TBL_FUNC_ID > + ============== ======== ===================================== > + Function ID: (uint32) 0x86000042 > + Arguments: (uint32) index of the current CPU's frequency table > + Return Values: (int32) NOT_SUPPORTED(-1) on error, or > + (uint32) Frequency table entry of requested index > + in KHz > + of current CPU(r1) > + Endianness: Must be the same endianness > + as the host. > + ============== ======== ===================================== Sphinx reports htmldocs warnings: /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. 8.42 KVM_CAP_GET_CPUFREQ_TBL --------------------------- /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. 8.42 KVM_CAP_GET_CPUFREQ_TBL --------------------------- /home/bagas/repo/linux-kernel/Documentation/virt/kvm/arm/get_freqtbl.rst:4: WARNING: Title underline too short. get_freqtbl support for arm/arm64 ============================= I have applied the fixup: ---- >8 ---- diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index baf8a4c43b5839..3579c470375938 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8401,7 +8401,7 @@ workload on its vCPUs. Util hints allow the host to make more accurate frequency selections and task placement for vCPU threads. 8.42 KVM_CAP_GET_CPUFREQ_TBL ---------------------------- +---------------------------- :Architectures: arm64 diff --git a/Documentation/virt/kvm/arm/get_freqtbl.rst b/Documentation/virt/kvm/arm/get_freqtbl.rst index f6832d7566e7e5..215bf0f653e461 100644 --- a/Documentation/virt/kvm/arm/get_freqtbl.rst +++ b/Documentation/virt/kvm/arm/get_freqtbl.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 get_freqtbl support for arm/arm64 -============================= +================================= Allows guest to query the frequency(in KHz) table of the current CPU that the vCPU thread is running on. Thanks. -- An old man doll... just what I always wanted! - Clara _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel