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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E835FC636C9 for ; Wed, 21 Jul 2021 15:44:18 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A6FB96120A for ; Wed, 21 Jul 2021 15:44:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6FB96120A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=pbXoJuHhPHhjfMhHRMMC+kqOt7LcIrbTHEr0zqLM/sg=; b=n+HPuAtoLcHtCd saAqc1n239Iw8ySKIq2n9LznQ6lKcFzDYKDfWRoED499ABT0MZGPvG+24pv12iInFAu2QR9+zt8tz VrDezWKD1McIZv6FAsOnA/rbpXZk/eI/vvq8QN5YrzJytjMuQe2v5neoXvhpigL43jSXr3/cPzioR lYj/tDTVmWoRvy/t0IUodg/TXSvVZJMDyvK18bwWO/VmFpHppm6oEZ5AJ5pOLa5tyKSiyb6wjuSS2 ih1Y9cROFw8Kzw5j6x41NKobpwPznAM1LFsPkcjE/HyoYpVHrUFzn7GKkI3oeKiSSIwUujrP53cO3 xF7BWl3NIJRbdOvc3RIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6EMh-00GOFg-Ko; Wed, 21 Jul 2021 15:42:32 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6E4B-00GHQ5-BQ for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 15:23:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id E4F0760E0C; Wed, 21 Jul 2021 15:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626881002; bh=vw/HFFq3ue6OhFPtK7AmM0dhhlH17poo8NmNf3OwAe4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gmWQQW3v5zvmdC4TABkeAnsNhe9Xy5wySrMj8XF7F5XvrENYnNj7kNTViTQe9qUxP PwUTTYo6WAhFJ2TFh5MKKKRNF5zcDHB3mSLksdOTEp9dhVc7q5QNSjVLBU8azJYxsY Ql23Ok5xhdHi3hoZHlf//rFMlpZVyIstVS/4zC5PZxAWu1j0qKtbmhKDphxv0fZHeF RWQUqAJBFfYixZ8LmdFLHGj9rD84i15E/9WTimBZu2WEmVRnBphn7tU8V7SANXsmpG yKTT92NLrUExXCGOWkf+QDp0bAzc97wSfJ6XX+uDYByca7A8Gw/dyHRP/Y53nr1Ab+ aIOZV5kwc05hg== Date: Wed, 21 Jul 2021 16:23:17 +0100 From: Will Deacon To: Shameer Kolothum Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, maz@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, jean-philippe@linaro.org, Alexandru.Elisei@arm.com, linuxarm@huawei.com Subject: Re: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Message-ID: <20210721152316.GB11003@willie-the-truck> References: <20210616155606.2806-1-shameerali.kolothum.thodi@huawei.com> <20210616155606.2806-2-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210616155606.2806-2-shameerali.kolothum.thodi@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_082323_514724_898228E1 X-CRM114-Status: GOOD ( 14.04 ) 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 Wed, Jun 16, 2021 at 04:56:04PM +0100, Shameer Kolothum wrote: > From: Julien Grall > > At the moment, the function kvm_get_vmid_bits() is looking up for the > sanitized value of ID_AA64MMFR1_EL1 and extract the information > regarding the number of VMID bits supported. > > This is fine as the function is mainly used during VMID roll-over. New > use in a follow-up patch will require the function to be called a every > context switch so we want the function to be more efficient. > > A new capability is introduced to tell whether 16-bit VMID is > available. I don't really buy this rationale. The VMID allocator introduced later on caches this value in the static 'vmid_bits' variable, and that gets used on vCPU enter via vmid_gen_match() in the kvm_arm_update_vmid() fastpath. So I would prefer that we just expose an accessor for that than introduce a static key and new cpufeature just for kvm_get_vttbr(). Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel