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 5785AC7619A for ; Wed, 5 Apr 2023 09:18:11 +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=vIyxi2AWy7MFlkqxXGCCBYDxAopa5KT75xADmctTWps=; b=uNnufOpqYsJ71i yM9B/MHTRcDWc6R/ZujN8hjpIG9Z7GUVH14vKGEzuDcYPNuY42hQhy0zVp1qWWwXY/bJTyTwPMtbo Jeh8ey04L795mdGssdPH2+T6zC86XBFj0/jSbOIQPM1tihNsQHN1HpnOwtOZXnJ9Ayr6H0VyGDs9K 7czhtekVNp67jyiWY8JvwOpRXKBbursyyhZKtYdqzk9YrWGtvxwsvG5JRn2oNOLw0p7qNSbLkD8x8 F+dqx0JeR6kxfavc1jGol5c33xJKk9M3lpX5sCdIuvo3oDJljoUnP5pkVa+vq+JJfE/RYgfl/v2nM dzIcc+eCiQjZ1FLFR4Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjzGi-003v6m-29; Wed, 05 Apr 2023 09:17:28 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjy84-003i7l-2f for linux-arm-kernel@lists.infradead.org; Wed, 05 Apr 2023 08:04:30 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-930720f1b32so31695066b.3 for ; Wed, 05 Apr 2023 01:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680681864; x=1683273864; 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=1qeWL9csSccLs6fLdE0uQkmoTpVTl/CNeE7DAxN2MXc=; b=Xhq2FpN6Mn9U+EjSMWm81/rOkL0bCFC+/2wjeKRsitvqUzxRSPfp9fuoLeyBFssxEy uDCSbz1YbvYjEPswqb3S2GTeD5WrMfOxja6ExrIKkGQLeADhlgbB7YOPra4MuzjHMrmj ZXdFh+JVuRGjSQyYZanQX5QlEVziDHiVidIiylGL7f0MyJUhqMsMEyHDcOQ7gNiV1wC+ ahUaXralaKBaRSz4fOK+iGVNv27U4eaNu+zC6QxXTv6Jps/OaYMBUjv3ab9gY0hKw4g7 NAydS21zEz4TOSL9DVk3uvDj3K8Lk9ct3FFtJCd1yGfrC7kCaSATBwW4q2DaUE7YXwsp DLwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680681864; x=1683273864; 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=1qeWL9csSccLs6fLdE0uQkmoTpVTl/CNeE7DAxN2MXc=; b=eTKktlLBp92DtpwAysCox8CsXtChQiQDJ+e4/3A+lWh6+x0RLLwga6YxpMbPw353rc gt1AJUqw+5304bckg8yWAZziG59GE7zwZ4pUNlQgQ4N4Qu2fOpr7x9VJH4Y7K/OaSceS DPlCWlyo/afowqwlQXajRVRyyut3vpuN5x2fvav1eapMOx/W22p88aeqv+u5B2A7cSe2 vM6kVgUy/tHgjcZbN/TfQSPMUNuJfYonR0eOzr6BdBx6We4hsIRVZRhd2bPBpedA6bNI XzsN8jQOsz0B5cBlm7nDaGABhimb3RT9vZsJU3UxoO8ubemqiY4Gq7bIeXaFQMt+p3cZ eJHg== X-Gm-Message-State: AAQBX9clHpMI2U/osSCJacrc36D+/mnpFKCMo3p3TDi+pYR5FPN8hjnP m7oAWtwAXE3XF3V2IZlD0F0FUw== X-Google-Smtp-Source: AKy350bF5rLJogTrsY1f6blQnOqzcwkAlbB5v+pmHg+Ta3p4lfp6J5hb3yzzRk5ijVMDrTT8n0Y6cA== X-Received: by 2002:a05:6402:2026:b0:4fd:2533:f56 with SMTP id ay6-20020a056402202600b004fd25330f56mr1005988edb.39.1680681864506; Wed, 05 Apr 2023 01:04:24 -0700 (PDT) Received: from google.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a65-20020a509ec7000000b004fbf6b35a56sm6955177edf.76.2023.04.05.01.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 01:04:23 -0700 (PDT) Date: Wed, 5 Apr 2023 08:04:20 +0000 From: Quentin Perret To: David Dai Cc: 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 , Saravana Kannan , kernel-team@android.com, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [RFC PATCH 2/6] kvm: arm64: Add support for get_cur_cpufreq service Message-ID: References: <20230330224348.1006691-1-davidai@google.com> <20230330224348.1006691-3-davidai@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230330224348.1006691-3-davidai@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_010428_866318_43F78D7B X-CRM114-Status: GOOD ( 13.83 ) 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 Thursday 30 Mar 2023 at 15:43:37 (-0700), David Dai wrote: > This service allows guests to query the host for frequency of the CPU > that the vCPU is currently running on. I assume the intention here is to achieve scale invariance in the guest to ensure its PELT signals represent how much work is actually being done. If so, it's likely the usage of activity monitors will be superior for this type of thing as that may allow us to drop the baked-in assumption about vCPU pinning. IIRC, AMUs v2 (arm64-specific obv) have extended support for virtualization, so I'd suggest looking into supporting that first. And assuming we also want to support this on hardware that don't have AMUs, or don't have the right virt extensions, then the only thing I can think of is to have the VMM expose non-architectural AMUs to the guest, maybe emulated using PMUs. If the guest uses Linux, it'll need to grow support for non-architectural AMUs which is its own can of worms though. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel