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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CACABC76196 for ; Sat, 1 Apr 2023 03:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233544AbjDADMW (ORCPT ); Fri, 31 Mar 2023 23:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjDADMV (ORCPT ); Fri, 31 Mar 2023 23:12:21 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF931EFC5; Fri, 31 Mar 2023 20:12:20 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso9699113pjc.1; 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=zzJGlT7OCM77PM6xs/akAoJnkr9IueWeucLQMgCH/0Lpfh+Y3gL1AL2fgsMq8/9pnk BO719qwVTUSV03ay7JOqjRzs/56Mw1mEa89UAagEQwfkVS6l7CuGdzie75dPW3PwXx91 rZU1mcmrJjhKvmxi1LWT/8nZAS63xLNAHnbJIUYNH1ctuKfiAj3oq0u0vfJCc0Xz87x2 AkTWQkJKbIuu/a+2+m05k2a4hzMfrLDgk+v+sIFzsKZ26yUcZLsiF8TMKfukGXse6LC7 /6R0axlrRp3AmbpSENJiL8OJzJ9/qCIRjW1UwmbqDgcoKqAyOyvWK1EWIzr/dy027vjx Ktzg== X-Gm-Message-State: AAQBX9dFFNP/2CNuhvlYgMBGurHZdv0K+Jkndx2MXA0E9TfFvMr7ZtPx Jtpt+0XEZg3jF4ELB1bWjmM= 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230331014356.1033759-3-davidai@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.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