Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1601677ybc; Wed, 20 Nov 2019 00:51:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwnNIuJh+KWMNg/LZSpXqXUDh1Tvsf5r5j/1vlt049R5J7e/Y9NBtmY7lzH2RAv9gqplx49 X-Received: by 2002:a17:906:2893:: with SMTP id o19mr3939709ejd.32.1574239871099; Wed, 20 Nov 2019 00:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574239871; cv=none; d=google.com; s=arc-20160816; b=mXE8Uy2Ve2WTqU+wm5EW6xaDkm8eWLBizL9sT4yTIOztA8yl0wi0yD1aENnV91CrIi /u9fUNhh5kLNSoXTrykXX8FFjO/T9ID8UZeyJ1N5oDziizn6wIafqfJwsSEwZBdSF0yf RGxWm/wdkx+qoHwKFrdK8ZQ0GM9aZFE19vr9JZHnJNoY/j2XTZTZuaBdgG6kqSMdyvtt KUqeR610NCw1OksnD1ZpBj8os2+VDQUcjOxXyf1B/sYNh+ZrreSqrxlS9xxa5YEWEe1v 50+K/YTb5lKZiG2Gz6cDCMCdcw0QjSB12qhn6an/ZwVGN/DYTuNkVY3OX1oWYrVVylx3 chJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rDyqSx8iGt04ZvZzDHB4hGRqXxxeHdKBoBVrPX5TN6Y=; b=cXTrdVKDYEInpbl8LacUTrJFylLrKA+A7DtP8FxWFfBwYegfwW1ylbBqLZbymFxCML AVlCbRjmR7yg5DRkYkWIuI5kfQQdvK6XqI/M8wRuBZ9EKUm+YxAjbQjn+hUQAb2MI1Z3 3WmHHhBzVMYGtFjAhqDpqObm1NEzKTfis+X/JdYBlvRNuADcX6GwRhwUdDXEQFBtiyRQ zE3yCWsjHXs75AQfhOqlrDt9EuBFqtx9Ltz1uLG4CLiImi+VUQpXtloWzujeTe6DJDbN aWs9EPUlPMHEp9b5vmH7jNv9Kfsi5wjqZzyfqDx4qeyqGYujRr+gTfWxhOsQgz226N3c VU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ttwn80sr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce17si18872111edb.368.2019.11.20.00.50.35; Wed, 20 Nov 2019 00:51:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ttwn80sr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbfKTIrv (ORCPT + 99 others); Wed, 20 Nov 2019 03:47:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:52702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfKTIrv (ORCPT ); Wed, 20 Nov 2019 03:47:51 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5348B2235D; Wed, 20 Nov 2019 08:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574239670; bh=HT77a05SGzBXzjNW3SSpNiDG5j5REw2H7dE6GC1vlqw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ttwn80sr1LeO/JKisG3eqvjFBlcAPyy3jeFEd5ZKd5rahRFdeqK8H0MWc75ptXkd4 eGoAmSpbSK8i3/9CA52Wj/QgozmiPb3I0s/D8vS3t8HWxsAVgIi2E+bduTOZNwqYep IRUywIci9tg+K9eZ82tVjNNcVNlXOwgDCMz10lFI= Date: Wed, 20 Nov 2019 08:47:44 +0000 From: Will Deacon To: Marc Zyngier Cc: Hanjun Guo , Zhenyu Ye , catalin.marinas@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, tangnianyao@huawei.com, xiexiangyou@huawei.com, linux-kernel@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Linuxarm , Shaokun Zhang , wanghuiqiang Subject: Re: [RFC PATCH v2] arm64: cpufeatures: add support for tlbi range instructions Message-ID: <20191120084743.GA20119@willie-the-truck> References: <5DC960EB.9050503@huawei.com> <20191111132716.GA9394@willie-the-truck> <5DC96660.8040505@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 10:03:34AM +0000, Marc Zyngier wrote: > On 2019-11-19 01:13, Hanjun Guo wrote: > > I'm thinking of how to add a firmware description for it, how about > > this: > > > > Adding a system level flag to indicate the supporting of TIBi by range, > > which means adding a binding name for example "tlbi-by-range" at system > > level in the dts file, or a tlbi by range flag in ACPI FADT table, then > > we use the ID register per-cpu and the system level flag as > > > > if (cpus_have_const_cap(ARM64_HAS_TLBI_BY_RANGE) && > > system_level_tlbi_by_range) > > flush_tlb_by_range() > > else > > flush_tlb_range() > > > > And this seems work for heterogeneous system (olny parts of the CPU > > support > > TLBi by range) as well, correct me if anything wrong. > > It could work, but it needs to come with the strongest guarantees that > all the DVM agents in the system understand this type of invalidation, > specially as we move into the SVM territory. It may also need to cope > with non-compliant agents being hot-plugged, or at least discovered late. > > I also wonder if the ARMv8.4-TTL extension (which I have patches for in > the nested virt series) requires the same kind of treatment (after all, > it has an implicit range based on the base granule size and level). It would be good to get confirmation from Arm about this, since the TTL extension doesn't have the dangerous 'Note' that the range ops do and it wouldn't be difficult to ignore those bits in hardware where the system doesn't support the hint for all agents (in comparison to upgrading range ops to ALL, which may be unpalatable). Will