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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 502BAC3A59C for ; Fri, 16 Aug 2019 13:39:47 +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 240D92064A for ; Fri, 16 Aug 2019 13:39:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bXlaZG9J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 240D92064A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pJnLDg4YAQ3OXUJpnjSJ28gLMu5iGVYTcpvFH/FU3vo=; b=bXlaZG9JnDVBUg ePINM9MsnFOAw/ABEApzM9/LaplDo9aG33uKRVEL3GkU4P6Ff7DpEIBbU7hECm3L83xnwzPs/TrJ9 WX75oBplxVQjRVXtPB17PC/PkE6/J82L4IpPkEpiiZz/T0G/W31v9wJTieQQA/2M2+FlAM6UpbCui jdPB130KMd/cNg6ra40DWPI9EZDcc9GyNAjpghIEG+EhWatazqHF0ieE/4LaG9XKhYfjoYH+/qmBn hgxwIkXjwJUhzf1WhjrIjlNjqvmRfR3QJRB4+fhws0jp3wn2t06OhkRNsumetPeTgNEJroNCE9Fxq J14G+51p3UR4GXxT1CDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hycSA-0006Y7-BT; Fri, 16 Aug 2019 13:39:38 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hycS7-0006Xn-2p for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2019 13:39:36 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 70720344; Fri, 16 Aug 2019 06:39:34 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 738CA3F694; Fri, 16 Aug 2019 06:39:33 -0700 (PDT) From: James Morse Subject: Re: [PATCH] arm64/kvm: remove VMID rollover I-cache maintenance To: Mark Rutland References: <20190806155737.39307-1-mark.rutland@arm.com> Message-ID: <1dca0489-9e85-cb8f-b846-b6da65f41773@arm.com> Date: Fri, 16 Aug 2019 14:39:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190806155737.39307-1-mark.rutland@arm.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190816_063935_166250_12ACD443 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suzuki K Poulose , Marc Zyngier , Christoffer Dall , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mark, On 06/08/2019 16:57, Mark Rutland wrote: > For VPIPT I-caches, we need I-cache maintenance on VMID rollover to > avoid an ABA problem. Consider a single vCPU VM, with a pinned stage-2, > running with an idmap VA->IPA and idmap IPA->PA. If we don't do > maintenance on rollover: > > // VMID A > Writes insn X to PA 0xF > Invalidates PA 0xF (for VMID A) > > I$ contains [{A,F}->X] > > [VMID ROLLOVER] > > // VMID B > Writes insn Y to PA 0xF > Invalidates PA 0xF (for VMID B) > > I$ contains [{A,F}->X, {B,F}->Y] > > [VMID ROLLOVER] > > // VMID A > I$ contains [{A,F}->X, {B,F}->Y] > > Unexpectedly hits stale I$ line {A,F}->X. > > However, for PIPT and VIPT I-caches, the VMID doesn't affect lookup or > constrain maintenance. Given the VMID doesn't affect PIPT and VIPT > I-caches, and given VMID rollover is independent of changes to stage-2 > mappings, I-cache maintenance cannot be necessary on VMID rollover for > PIPT or VIPT I-caches. > > This patch removes the maintenance on rollover for VIPT and PIPT > I-caches. At the same time, the unnecessary colons are removed from the > asm statement to make it more legible. Makes sense! Reviewed-by: James Morse Thanks, James _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel