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 5C69FECAAD3 for ; Thu, 1 Sep 2022 10:43:09 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eWCkUa0MJhOSETm5jrbJzCIBUwYFR2vnMJPlzR4Qv2c=; b=AN49JnHlWKI+7x IdzBOQ0hfG2PGnX6/OOK+UXMeypHRvqaOao2jo3Ghlw8mEGu9uD2s6Dv4M7pPoEouaul2LbGFEXoQ fkfk2cGlVRMCFNG0OV8WKAbTBRYnl85BQf2dzKxB7KWRKm/+YdvtbJq1oO3P5jn5oHcHZDyMv6vXW msmEl4Y9yEWt6X39wpfJAZLApvaC3335K8JpjmP4LIM3PEGzdgfRyAYeYW9IVnSa0Qhk4PEYfCiBv +AEIs3hUOxwpVOgVb8+DP/0AUupPdkBx80GWoA67x6FBOYa+ZhmQQUmj4gf60erZLuHHXOmCIGgnM OsLEG3yP0QgosjMTWEfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTheE-00B60Y-W1; Thu, 01 Sep 2022 10:42:11 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTheA-00B5yI-NN for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2022 10:42:08 +0000 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 064D261CF2; Thu, 1 Sep 2022 10:42:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4037AC433D6; Thu, 1 Sep 2022 10:42:04 +0000 (UTC) Date: Thu, 1 Sep 2022 11:42:00 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Will Deacon , Marc Zyngier , Steven Price , Vincenzo Frascino , Linux ARM Subject: Re: [PATCH 2/4] KVM: arm64: Simplify the sanitise_mte_tags() logic Message-ID: References: <20220705142619.4135905-1-catalin.marinas@arm.com> <20220705142619.4135905-3-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220901_034206_819212_8260B80A X-CRM114-Status: GOOD ( 18.67 ) 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 Fri, Jul 08, 2022 at 04:00:01PM -0700, Peter Collingbourne wrote: > On Tue, Jul 5, 2022 at 7:26 AM Catalin Marinas wrote: > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > > index 9cfa516452e1..35850f17ae08 100644 > > --- a/arch/arm64/kvm/mmu.c > > +++ b/arch/arm64/kvm/mmu.c > > @@ -1056,23 +1056,14 @@ static int get_vma_page_shift(struct vm_area_struct *vma, unsigned long hva) > > * - mmap_lock protects between a VM faulting a page in and the VMM performing > > * an mprotect() to add VM_MTE > > */ > > -static int sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn, > > - unsigned long size) > > +static void sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn, > > + unsigned long size) > > { > > unsigned long i, nr_pages = size >> PAGE_SHIFT; > > struct page *page; > > Did you intend to change this to "struct page *page = > pfn_to_page(pfn);"? As things are, I get a kernel panic if I try to > start a VM with MTE enabled. The VM boots after making my suggested > change though. Yes, indeed. I think you fixed it when reposting together with the other patches. Sorry for the delay, too much holiday this summer ;). -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel