From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 2EB6115A3 for ; Sat, 1 Apr 2023 03:12:20 +0000 (UTC) Received: by mail-pl1-f178.google.com with SMTP id ix20so23195068plb.3 for ; Fri, 31 Mar 2023 20:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680318739; 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=GMsqA2/S4acnYNFGSszhcxD2t1ID/uK62fRiA76JiBA=; b=izzE5BwTcnLtWXiLFvb1b1GiNKSO8qGbitdSPuU2w3doJeL1SXvD/0YcRCbyPbSHd0 LJwJSLBiDslPaI69lmy9Y/1xjuqTF2IXhiJ8wNO0q2bY7aTUTx/B/sgRoZFeuoGkJ6wA rNdMRDFWVWTizj4ktebC7jnALxztJWSYdPqf2/gQSMTizk+5ibKtsgavvHVVIoewpNJT fsfUbERSIZUx5xKiNwnld9prEvcpmyju0cY2+8iMbiB9tuZCpC6ZGmadcu0dWe3w5hyx 2hhXx2L3psFIFJb0tN83ePDQsMHg7eNPqt3ZzfYzibSAlBikvflC3XtoU4IgYDVIoPzb 1dJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680318739; 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=GMsqA2/S4acnYNFGSszhcxD2t1ID/uK62fRiA76JiBA=; b=zpOrOFPGFUWUUZnjs9ww+xylJ8/xGvKPHIbfZq8HQ04z46R7vU9Z5vL1ehayJZPGU/ LWWDl2HiTmidTuhd08xBRXPlG7SczyPc1G5Foz0+j3LCcKKSv86jMiW7FQhlOnWApXFh IkZ/hOnwkEVbnHgH+5R3Y/xYUcP0GEjD0XsEKV0ZLqAtR1nAjuL2xTjgXuibXidTYyWQ Hdsl0AqEvghNtoXKW6vJuOcrw5qTBAR3AkHTlJ7edL1n/sM0rFnUwEjcGDcTJb1iWFZ3 Ll5M/mOOXw3ngfdrVes8THI8Kg+tcSlurOhz0DPYKMMXf55eG3EX/pIIJceAN5SkH5SE sNfw== X-Gm-Message-State: AAQBX9c7w+UY65eiucSIitRPvgKgaICf5s3gFXkunXZTNMEcvh3atdED p5b9TN7HWyOXCsw2swZnKRw= X-Google-Smtp-Source: AKy350bPTa+6wCaLlfIe0t8Z/dZpxNsv/Fw1CdcxoSM2Sy7O3EUGDsMbmYmRcGqE3Vk4WsBjOQymQA== X-Received: by 2002:a17:902:fa43:b0:1a1:a8db:495d with SMTP id lb3-20020a170902fa4300b001a1a8db495dmr22990145plb.4.1680318739546; Fri, 31 Mar 2023 20:12:19 -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 w15-20020a1709027b8f00b0019f789cddccsm2292207pll.19.2023.03.31.20.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 20:12:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 31AA4101622; Sat, 1 Apr 2023 10:12:15 +0700 (WIB) Date: Sat, 1 Apr 2023 10:12:15 +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 2/6] kvm: arm64: Add support for get_cur_cpufreq service Message-ID: References: <20230331014356.1033759-1-davidai@google.com> <20230331014356.1033759-3-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-3-davidai@google.com> On Thu, Mar 30, 2023 at 06:43:46PM -0700, David Dai wrote: > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst > index 62de0768d6aa..b0ff0ad700bf 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -8380,6 +8380,14 @@ structure. > When getting the Modified Change Topology Report value, the attr->addr > must point to a byte where the value will be stored or retrieved from. > > +8.40 KVM_CAP_GET_CUR_CPUFREQ > +------------------------ > + > +:Architectures: arm64 > + > +This capability indicates that KVM supports getting the > +frequency of the current CPU that the vCPU thread is running on. > + > 9. Known KVM API problems > ========================= > > diff --git a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst > new file mode 100644 > index 000000000000..06e0ed5b3868 > --- /dev/null > +++ b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst > @@ -0,0 +1,21 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +get_cur_cpufreq support for arm/arm64 > +============================= > + > +Get_cur_cpufreq support is used to get current frequency(in KHz) of the > +current CPU that the vCPU thread is running on. > + > +* ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID: 0x86000040 > + > +This hypercall uses the SMC32/HVC32 calling convention: > + > +ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID > + ============== ======== ===================================== > + Function ID: (uint32) 0x86000040 > + Return Values: (int32) NOT_SUPPORTED(-1) on error, or > + (uint32) Frequency in KHz of current CPU that the > + vCPU thread is running on. > + Endianness: Must be the same endianness > + as the host. > + ============== ======== ===================================== Sphinx reports htmldocs warnings: /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8384: WARNING: Title underline too short. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------ /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8384: WARNING: Title underline too short. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------ /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. I have applied the fixup: ---- >8 ---- diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 8f905456e2b4a1..baf8a4c43b5839 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8381,7 +8381,7 @@ When getting the Modified Change Topology Report value, the attr->addr must point to a byte where the value will be stored or retrieved from. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------- +---------------------------- :Architectures: arm64 diff --git a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst index 06e0ed5b3868d7..76f112efb99f92 100644 --- a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst +++ b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst @@ -11,11 +11,12 @@ current CPU that the vCPU thread is running on. This hypercall uses the SMC32/HVC32 calling convention: ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID - ============== ======== ===================================== + + ============== ======== ======================================== Function ID: (uint32) 0x86000040 Return Values: (int32) NOT_SUPPORTED(-1) on error, or (uint32) Frequency in KHz of current CPU that the vCPU thread is running on. Endianness: Must be the same endianness as the host. - ============== ======== ===================================== + ============== ======== ======================================== 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 9A861C761A6 for ; Sat, 1 Apr 2023 03:13:33 +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=fpgtnD2rHqL3H5HpPxW8hh5nEbVc0pjpe1CLjhgM7/s=; b=gPfD+BcP6LBmMg Q/HAqE6661NOqItHt6HfC2r6Ey3Iyrlid/cYwzEB83CiR1pMbtfErUf9t9rAOfrOkVyDCoqQGQyn7 KLyzgvZgC+o1eJonzRpETe1us9pHhFZTkSH+8KpuNpboi0l5CVJ8nBLWQq1HX0iSAfvWXGgZfwx8/ GxB68wKS6OSGQargSH+/QHZ0HdBZVPRPMK2UfCrxN9O+3yARZP8ZNptrRlxQ1ggmoreOHxnPgIQRH MRomCatZOBvdK+Ms0M5YrhtaSCO3ycKTTqIHrKTQOjFdsenh2DDjkBN01evtoHKnDPwZMHfKWKLHk qYpDsQdIo8fdUvD59xgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1piRfE-009cUS-2m; Sat, 01 Apr 2023 03:12:24 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1piRfB-009cTm-2m for linux-arm-kernel@lists.infradead.org; Sat, 01 Apr 2023 03:12:23 +0000 Received: by mail-pl1-x636.google.com with SMTP id iw3so23183864plb.6 for ; Fri, 31 Mar 2023 20:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680318739; 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=GMsqA2/S4acnYNFGSszhcxD2t1ID/uK62fRiA76JiBA=; b=izzE5BwTcnLtWXiLFvb1b1GiNKSO8qGbitdSPuU2w3doJeL1SXvD/0YcRCbyPbSHd0 LJwJSLBiDslPaI69lmy9Y/1xjuqTF2IXhiJ8wNO0q2bY7aTUTx/B/sgRoZFeuoGkJ6wA rNdMRDFWVWTizj4ktebC7jnALxztJWSYdPqf2/gQSMTizk+5ibKtsgavvHVVIoewpNJT fsfUbERSIZUx5xKiNwnld9prEvcpmyju0cY2+8iMbiB9tuZCpC6ZGmadcu0dWe3w5hyx 2hhXx2L3psFIFJb0tN83ePDQsMHg7eNPqt3ZzfYzibSAlBikvflC3XtoU4IgYDVIoPzb 1dJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680318739; 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=GMsqA2/S4acnYNFGSszhcxD2t1ID/uK62fRiA76JiBA=; b=2MevPlG8vn9uzTBpHdYlQJoUIfUNH8kEmWHaggfMYgoCfmXjoYgtnyMFzW/pI9ApRW NM3OJNGpce3eTTDqJTjLwqpVpI8vDAQ3qx3nYAXdSkeKY6mkLuqtM0o1TJ+TqqN+dVkm LqHg0YxcP3kasjgZJEI+hox72WOo+IyEcfgxBnFPcAkWFd3YbZvHpjZS8SfbmujOOwOW w0QYfmIBOwMX/dxAASsMC6ajneXJtOufkkw7uQU7xo7lb5CYk2MOjiz3EUI6hXdGBPJM 0qdaQfoUuuSWxTxiqA6efXUSAw9fs2ucEoYv5Z0Zkyg9iEG+75u9kpo3DJVr5yJPl0UL DoXw== X-Gm-Message-State: AAQBX9c7ULjQkf7UQ5VW9MBSCUlZK+sp5sCUjbxsl9wOBg56gTAyhr31 5pphdxuB/GUblBcf9drGB3w= X-Google-Smtp-Source: AKy350bPTa+6wCaLlfIe0t8Z/dZpxNsv/Fw1CdcxoSM2Sy7O3EUGDsMbmYmRcGqE3Vk4WsBjOQymQA== X-Received: by 2002:a17:902:fa43:b0:1a1:a8db:495d with SMTP id lb3-20020a170902fa4300b001a1a8db495dmr22990145plb.4.1680318739546; Fri, 31 Mar 2023 20:12:19 -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 w15-20020a1709027b8f00b0019f789cddccsm2292207pll.19.2023.03.31.20.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 20:12:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 31AA4101622; Sat, 1 Apr 2023 10:12:15 +0700 (WIB) Date: Sat, 1 Apr 2023 10:12:15 +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 2/6] kvm: arm64: Add support for get_cur_cpufreq service Message-ID: References: <20230331014356.1033759-1-davidai@google.com> <20230331014356.1033759-3-davidai@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230331014356.1033759-3-davidai@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230331_201221_925017_CF57679A X-CRM114-Status: GOOD ( 22.32 ) 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:46PM -0700, David Dai wrote: > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst > index 62de0768d6aa..b0ff0ad700bf 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -8380,6 +8380,14 @@ structure. > When getting the Modified Change Topology Report value, the attr->addr > must point to a byte where the value will be stored or retrieved from. > > +8.40 KVM_CAP_GET_CUR_CPUFREQ > +------------------------ > + > +:Architectures: arm64 > + > +This capability indicates that KVM supports getting the > +frequency of the current CPU that the vCPU thread is running on. > + > 9. Known KVM API problems > ========================= > > diff --git a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst > new file mode 100644 > index 000000000000..06e0ed5b3868 > --- /dev/null > +++ b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst > @@ -0,0 +1,21 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +get_cur_cpufreq support for arm/arm64 > +============================= > + > +Get_cur_cpufreq support is used to get current frequency(in KHz) of the > +current CPU that the vCPU thread is running on. > + > +* ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID: 0x86000040 > + > +This hypercall uses the SMC32/HVC32 calling convention: > + > +ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID > + ============== ======== ===================================== > + Function ID: (uint32) 0x86000040 > + Return Values: (int32) NOT_SUPPORTED(-1) on error, or > + (uint32) Frequency in KHz of current CPU that the > + vCPU thread is running on. > + Endianness: Must be the same endianness > + as the host. > + ============== ======== ===================================== Sphinx reports htmldocs warnings: /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8384: WARNING: Title underline too short. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------ /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8384: WARNING: Title underline too short. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------ /home/bagas/repo/linux-kernel/Documentation/virt/kvm/api.rst:8404: WARNING: Title underline too short. I have applied the fixup: ---- >8 ---- diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 8f905456e2b4a1..baf8a4c43b5839 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8381,7 +8381,7 @@ When getting the Modified Change Topology Report value, the attr->addr must point to a byte where the value will be stored or retrieved from. 8.40 KVM_CAP_GET_CUR_CPUFREQ ------------------------- +---------------------------- :Architectures: arm64 diff --git a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst index 06e0ed5b3868d7..76f112efb99f92 100644 --- a/Documentation/virt/kvm/arm/get_cur_cpufreq.rst +++ b/Documentation/virt/kvm/arm/get_cur_cpufreq.rst @@ -11,11 +11,12 @@ current CPU that the vCPU thread is running on. This hypercall uses the SMC32/HVC32 calling convention: ARM_SMCCC_VENDOR_HYP_KVM_GET_CUR_CPUFREQ_FUNC_ID - ============== ======== ===================================== + + ============== ======== ======================================== Function ID: (uint32) 0x86000040 Return Values: (int32) NOT_SUPPORTED(-1) on error, or (uint32) Frequency in KHz of current CPU that the vCPU thread is running on. Endianness: Must be the same endianness as the host. - ============== ======== ===================================== + ============== ======== ======================================== 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