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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 D759EC63797 for ; Thu, 22 Jul 2021 06:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B08C861289 for ; Thu, 22 Jul 2021 06:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbhGVGBQ convert rfc822-to-8bit (ORCPT ); Thu, 22 Jul 2021 02:01:16 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3958 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbhGVGBO (ORCPT ); Thu, 22 Jul 2021 02:01:14 -0400 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4GVj4M3zjCz827t; Thu, 22 Jul 2021 14:20:35 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Jul 2021 14:24:15 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2176.012; Thu, 22 Jul 2021 07:24:13 +0100 From: Shameerali Kolothum Thodi To: Will Deacon 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 Subject: RE: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Topic: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Index: AQHXYshKGBZfllyF/kqTqR+/q/JZlqtNslSAgAEMQiA= Date: Thu, 22 Jul 2021 06:24:13 +0000 Message-ID: <027c314e664c4d4889917e95a2aa58c1@huawei.com> References: <20210616155606.2806-1-shameerali.kolothum.thodi@huawei.com> <20210616155606.2806-2-shameerali.kolothum.thodi@huawei.com> <20210721152316.GB11003@willie-the-truck> In-Reply-To: <20210721152316.GB11003@willie-the-truck> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.80.98] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Will Deacon [mailto:will@kernel.org] > Sent: 21 July 2021 16:23 > To: Shameerali Kolothum Thodi > 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 > Subject: Re: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether > 16-bit VMID is available > > 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(). Ok. Will change it to an accessor. Thanks, Shameer 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 ABB93C6377D for ; Thu, 22 Jul 2021 06:24:27 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 043D361264 for ; Thu, 22 Jul 2021 06:24:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 043D361264 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 726D54B11D; Thu, 22 Jul 2021 02:24:26 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S6qHk2OfhpEo; Thu, 22 Jul 2021 02:24:25 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7BF4F4B0EF; Thu, 22 Jul 2021 02:24:25 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9649D4B0EF for ; Thu, 22 Jul 2021 02:24:23 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vAn3dU8grpF4 for ; Thu, 22 Jul 2021 02:24:21 -0400 (EDT) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id D17C64B0E9 for ; Thu, 22 Jul 2021 02:24:20 -0400 (EDT) Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4GVj4M3zjCz827t; Thu, 22 Jul 2021 14:20:35 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Jul 2021 14:24:15 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2176.012; Thu, 22 Jul 2021 07:24:13 +0100 From: Shameerali Kolothum Thodi To: Will Deacon Subject: RE: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Topic: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Index: AQHXYshKGBZfllyF/kqTqR+/q/JZlqtNslSAgAEMQiA= Date: Thu, 22 Jul 2021 06:24:13 +0000 Message-ID: <027c314e664c4d4889917e95a2aa58c1@huawei.com> References: <20210616155606.2806-1-shameerali.kolothum.thodi@huawei.com> <20210616155606.2806-2-shameerali.kolothum.thodi@huawei.com> <20210721152316.GB11003@willie-the-truck> In-Reply-To: <20210721152316.GB11003@willie-the-truck> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.80.98] MIME-Version: 1.0 X-CFilter-Loop: Reflected Cc: "jean-philippe@linaro.org" , "maz@kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm , "catalin.marinas@arm.com" , "kvmarm@lists.cs.columbia.edu" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu > -----Original Message----- > From: Will Deacon [mailto:will@kernel.org] > Sent: 21 July 2021 16:23 > To: Shameerali Kolothum Thodi > 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 > Subject: Re: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether > 16-bit VMID is available > > 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(). Ok. Will change it to an accessor. Thanks, Shameer _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8865AC6377D for ; Thu, 22 Jul 2021 06:27:41 +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 5B564610F7 for ; Thu, 22 Jul 2021 06:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B564610F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com 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:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3uKl0YaaIak5BcNz/09Gms8eKSHLrf0PlYy2kJkvWzY=; b=Eq7SdD3Pq+Yu8O i8itSbR1P2sxBJaPOua9GVQjNIQibXt9hUSLMsL3yFinbHrDMTIEGOu2Y75POu+A73EC9Iy/5drmN xCs0vzR7qiZkGdSIsieWrQ4lwIoRaDN/A+k9AGi9uzJTzo3PIQ95WuCKT+GyHb10UGsz60H9oGa74 Pi6dAXq/0vM7pAEYMuPg87uaC+h0M5mZOZT+eYyCI3e1+3KFD9G+2BTpaf4tp1kgYc6bEv0eJwILz usLabVgqCCs+DAaEVDIzbKpAuH8fbPurV9R3v1gC4R9PcbtBeQ5A0qSmYSgY4g84S6vvIZtib/JC9 BeV/VlpBBnMgMLVIor9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6S9f-000MW4-1b; Thu, 22 Jul 2021 06:25:59 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6S83-000LVL-4v for linux-arm-kernel@lists.infradead.org; Thu, 22 Jul 2021 06:24:21 +0000 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4GVj4M3zjCz827t; Thu, 22 Jul 2021 14:20:35 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Jul 2021 14:24:15 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2176.012; Thu, 22 Jul 2021 07:24:13 +0100 From: Shameerali Kolothum Thodi To: Will Deacon 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 Subject: RE: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Topic: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Thread-Index: AQHXYshKGBZfllyF/kqTqR+/q/JZlqtNslSAgAEMQiA= Date: Thu, 22 Jul 2021 06:24:13 +0000 Message-ID: <027c314e664c4d4889917e95a2aa58c1@huawei.com> References: <20210616155606.2806-1-shameerali.kolothum.thodi@huawei.com> <20210616155606.2806-2-shameerali.kolothum.thodi@huawei.com> <20210721152316.GB11003@willie-the-truck> In-Reply-To: <20210721152316.GB11003@willie-the-truck> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.80.98] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_232419_439569_546BDC75 X-CRM114-Status: GOOD ( 18.52 ) 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 > -----Original Message----- > From: Will Deacon [mailto:will@kernel.org] > Sent: 21 July 2021 16:23 > To: Shameerali Kolothum Thodi > 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 > Subject: Re: [PATCH v2 1/3] arch/arm64: Introduce a capability to tell whether > 16-bit VMID is available > > 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(). Ok. Will change it to an accessor. Thanks, Shameer _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel