Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1910594rwl; Fri, 31 Mar 2023 20:29:45 -0700 (PDT) X-Google-Smtp-Source: AKy350bC6xa2lo8JVGtfhski8HUG8lGUKn3R9R9zNfwIZrxU62pbwK4Ln8xVi55lS5GkozgL3RKe X-Received: by 2002:a05:6a20:8e19:b0:dd:dfe4:f06a with SMTP id y25-20020a056a208e1900b000dddfe4f06amr9021013pzj.3.1680319785176; Fri, 31 Mar 2023 20:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680319785; cv=none; d=google.com; s=arc-20160816; b=dFVYL1o3yfcBsHferpLRfbCE7BRL0UQWLymbJ7GDngIhZfu1xtodHHyfLReaN7xB5j cIwDkIDkGF7QsTyDAUv6HoU6U+x1GljWhkSljFD/FnLtWFonXFdgM7eYAZsCkxCZYK2B slVkAbCAINsjxz3ErYwLYnphecoaRf/b3s8eZFQgAJl8ld88gAELJoMmd71yQZSkjX5A ZMTnBLE0vGiJiqpeVSmjG0+6DamuOPp3GkvCyyY7hcroJj0rfoxAeQgEY1z17VH5seHX DqjTDKWSoBiWIvo2rFYDYvk15NrbJEoG8lA254xx4NcNmZJ4/G4zddp+Hy+awD7XJnaX gFvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1aOQ4eYy8N4YCSiaLMCwB/yerXMVOmw3wp9ck3pUmQA=; b=nC1u36UiLnli/kgjBf79hAXRPIHJ6m7h6EyF7OocvZWtqUF9rFZuw+3halNeoUJsNA yCGN55J5dKV3E+H0P5clhaQb4qZ0vlDgp7CrfWewAdtsJYkBmQarnGQsoYRtEaSugC3+ Y+9bQim7bllXdR0FDQkFprYgy7pYZavEJuc2001/lgeymJZNnO3U0w1DlxjxgitgYZxG LLZ+7dXJuwt2jSoDFx0zk2ok0bv1n8zdgN5rkWSTuo9ohfQt6HkdfQC5CP5cbj5LmJsM PTpIeADTbjRw2vGW8QzcIghzCrybhPMiZCrcaqWjEjTbf2FHPI5OLk1UBfkIaIrKWDHG BWVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ok8vzWQ0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e66-20020a636945000000b0050c10b43533si3953826pgc.60.2023.03.31.20.29.34; Fri, 31 Mar 2023 20:29:45 -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=@gmail.com header.s=20210112 header.b=Ok8vzWQ0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbjDAD23 (ORCPT + 99 others); Fri, 31 Mar 2023 23:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbjDAD20 (ORCPT ); Fri, 31 Mar 2023 23:28:26 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273D4C656; Fri, 31 Mar 2023 20:28:25 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id n14so7341865plc.8; 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=jmFDBpOy8Z6Mp+u440v8SSVvR+vvDcWrYFi3YgJWfZISb7JJ0wY1pOEsFiY5/VPaLh mUfzY5n7yY+5UGc0xJNcfNFtXwEVwi9BQmxJDzferfuHhj7c9LbSqtmxzu/DK1+SVwdp 6J+sCwO3+ZOZtbKWlfOWcR5BTyPzKrZDq1I6GrHfenoDsWJJqWqQ1d5nroRkw2b+E2Au LBI2zl79kHlc3UxbUVOlsPFzcvcrEuxkh1sV46OBqt383cqKGzPtBmqPXmyTyMca/8HG oy6A/Ia8iG4TcWO1yQelE2Kb3Srr+Il7RdGutEk8PehQ+g0XaVdSZ8GWBuXcI5jV+7hu skzA== X-Gm-Message-State: AAQBX9eVttcyHn477xSpnzX1V+5jvg3y8LjqQtrCx/mTiMkAqlHkaA/A 2RHCRcaTB9IQZkn6NdlUKno= 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230331014356.1033759-5-davidai@google.com> X-Spam-Status: No, score=1.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 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