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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BBDF8C433FE for ; Mon, 7 Nov 2022 17:12:07 +0000 (UTC) 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:Message-ID:Date:References :In-Reply-To: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=9K7iP6B8p3sxNP3ikmIr07KUA+Hf2OCXBh7HlxSw4Yw=; b=IB1iyKFSMhMW9a 7fBGhtNcYDPiUk+6ViZGvvuvO5904BU/slhpPbMKPHZoEtyhtfGZGHCLMXIwgrmIoqdUI/PSfhT1J imeLiJQn3qIPhFnXVnE+pA2z/X0E5+ugd7UhfM+2b+rP7pmQ7x3XvZkrWE6JrJfJOIvCa+++Gy0bY VmaX9I7Aojonb7J95QjIV22DRFbI10McQox7EqwbSjcIaHq4uzInVFz5DLQBKHn4jEL0dswg235i9 TozHV1Pt029Ct6HqaLa/rlmNzVet/j026FgVyJlqHA8z4y2rJcDidz/4K3OUNfwM2+pgQBoSVkbKC pSfUBuWH2+DTfY/KjITg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1os5eL-00GXSc-DT; Mon, 07 Nov 2022 17:11:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1os5eG-00GXMr-E0 for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 17:11:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667841050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rfFJYesx+4rIOVCmddyPJXOJt2foLuyf55xGPHLwEB4=; b=QCLcSjSkQde+9sk7Inu0d0l4BpEgCVjC6N1BejCLR+Ip0NkncdNRNdVNCsgJpVtjE3pYiB tbV9SmYHc1vxfNDhZ37LAg5lHZHht85YxwzTnsKq6ZW86pLtuBGur9m5ur68xr+VNdUYFy bPwBbFzJqjCBrbOkvkh8rbXOdMR9X+k= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-439-jX9ggGZMMGWvypVznMMVmw-1; Mon, 07 Nov 2022 12:10:46 -0500 X-MC-Unique: jX9ggGZMMGWvypVznMMVmw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C3A3A1C087BA; Mon, 7 Nov 2022 17:10:42 +0000 (UTC) Received: from localhost (unknown [10.39.193.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A499D1401C3B; Mon, 7 Nov 2022 17:10:41 +0000 (UTC) From: Cornelia Huck To: Peter Collingbourne , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Evgenii Stepanov , kvm@vger.kernel.org, Steven Price , Vincenzo Frascino , Peter Collingbourne Subject: Re: [PATCH v5 3/8] KVM: arm64: Simplify the sanitise_mte_tags() logic In-Reply-To: <20221104011041.290951-4-pcc@google.com> Organization: Red Hat GmbH References: <20221104011041.290951-1-pcc@google.com> <20221104011041.290951-4-pcc@google.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Date: Mon, 07 Nov 2022 18:10:39 +0100 Message-ID: <87leom3d2o.fsf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_091100_644682_09B783D9 X-CRM114-Status: GOOD ( 14.09 ) 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 Thu, Nov 03 2022, Peter Collingbourne wrote: > From: Catalin Marinas > > Currently sanitise_mte_tags() checks if it's an online page before > attempting to sanitise the tags. Such detection should be done in the > caller via the VM_MTE_ALLOWED vma flag. Since kvm_set_spte_gfn() does > not have the vma, leave the page unmapped if not already tagged. Tag > initialisation will be done on a subsequent access fault in > user_mem_abort(). > > Signed-off-by: Catalin Marinas > [pcc@google.com: fix the page initializer] > Signed-off-by: Peter Collingbourne > Reviewed-by: Steven Price > Cc: Will Deacon > Cc: Marc Zyngier > Cc: Peter Collingbourne > --- > arch/arm64/kvm/mmu.c | 40 +++++++++++++++------------------------- > 1 file changed, 15 insertions(+), 25 deletions(-) Reviewed-by: Cornelia Huck _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel