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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 831C7ECAAD5 for ; Mon, 12 Sep 2022 16:23:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E22064C83F; Mon, 12 Sep 2022 12:23:22 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org 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 kGz8BSUzGcAu; Mon, 12 Sep 2022 12:23:21 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id BF4464C6E3; Mon, 12 Sep 2022 12:23:21 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 611D04C6A8 for ; Mon, 12 Sep 2022 12:23:21 -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 LNLaPDz4mS+F for ; Mon, 12 Sep 2022 12:23:20 -0400 (EDT) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 3ADBE4C6CD for ; Mon, 12 Sep 2022 12:23:20 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9253A6124B; Mon, 12 Sep 2022 16:23:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA7FCC433D7; Mon, 12 Sep 2022 16:23:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662999799; bh=o3jfMSYPsHBf02GW8HpL7oTc7aWyP2dWAFlZ2veTMAI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ArJjPk+PiwuISkUCIFWaXESVSehuqwM8SewbPgyP1KYfHZzzehpRfs1ZosfvNv4Vg 5Kou3HtjPujVo6e+aiZDSF2gu34MjuIitjz5vodcaqexuLFpvbTMSxK4YooDZXHiNf IcELAwetaf1mtsFIrgG8VKPyS2xD2T1CE46V2MD1xQtAVXtNBmGvkiy6QqK2DSMAL6 45Dr2Zr8Jgy3TA8zbZyiNfOeBoK/1rqX33tGUFTQbheQ5zuOGcLFknej32heKKtoGq Ahpvr4CL4qrxRKcR27fmPNIRjFr1+Yi4DbMPKtQgIQHhxi3n8Mp0MemRlucK7gew6r BBngY0wUh7ppw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oXmDM-009jjJ-LQ; Mon, 12 Sep 2022 17:23:16 +0100 Date: Mon, 12 Sep 2022 17:23:16 +0100 Message-ID: <874jxcv9xn.wl-maz@kernel.org> From: Marc Zyngier To: Peter Collingbourne Subject: Re: [PATCH v3 6/7] KVM: arm64: permit all VM_MTE_ALLOWED mappings with MTE enabled In-Reply-To: <20220810193033.1090251-7-pcc@google.com> References: <20220810193033.1090251-1-pcc@google.com> <20220810193033.1090251-7-pcc@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pcc@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, cohuck@redhat.com, catalin.marinas@arm.com, will@kernel.org, eugenis@google.com, kvm@vger.kernel.org, steven.price@arm.com, vincenzo.frascino@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kvm@vger.kernel.org, Catalin Marinas , Cornelia Huck , Steven Price , linux-arm-kernel@lists.infradead.org, Vincenzo Frascino , Will Deacon , kvmarm@lists.cs.columbia.edu, Evgenii Stepanov 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 On Wed, 10 Aug 2022 20:30:32 +0100, Peter Collingbourne wrote: > > Certain VMMs such as crosvm have features (e.g. sandboxing) that depend > on being able to map guest memory as MAP_SHARED. The current restriction > on sharing MAP_SHARED pages with the guest is preventing the use of > those features with MTE. Now that the races between tasks concurrently > clearing tags on the same page have been fixed, remove this restriction. > > Signed-off-by: Peter Collingbourne > --- > arch/arm64/kvm/mmu.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index d54be80e31dd..fc65dc20655d 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -1075,14 +1075,6 @@ static void sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn, > > static bool kvm_vma_mte_allowed(struct vm_area_struct *vma) > { > - /* > - * VM_SHARED mappings are not allowed with MTE to avoid races > - * when updating the PG_mte_tagged page flag, see > - * sanitise_mte_tags for more details. > - */ > - if (vma->vm_flags & VM_SHARED) > - return false; > - > return vma->vm_flags & VM_MTE_ALLOWED; > } > Can you provide a pointer to some VMM making use of this functionality and enabling MTE? A set of crosvm patches (for example) would be useful to evaluate this series. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm