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=-15.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 5C6FDC07E95 for ; Tue, 13 Jul 2021 16:18:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3790E611AC for ; Tue, 13 Jul 2021 16:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbhGMQVb (ORCPT ); Tue, 13 Jul 2021 12:21:31 -0400 Received: from foss.arm.com ([217.140.110.172]:46556 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229474AbhGMQVa (ORCPT ); Tue, 13 Jul 2021 12:21:30 -0400 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 2CD206D; Tue, 13 Jul 2021 09:18:40 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C11E03F7D8; Tue, 13 Jul 2021 09:18:38 -0700 (PDT) Subject: Re: [PATCH] KVM: arm64: Fix detection of shared VMAs on guest fault To: Marc Zyngier , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, James Morse , Suzuki K Poulose , Alexandru Elisei , Will Deacon , kernel-team@android.com, Catalin Marinas References: <20210713114804.594993-1-maz@kernel.org> From: Steven Price Message-ID: <017a25b0-d706-df97-dbba-80d5b21d1779@arm.com> Date: Tue, 13 Jul 2021 17:18:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210713114804.594993-1-maz@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 13/07/2021 12:48, Marc Zyngier wrote: > When merging the KVM MTE support, the blob that was interposed between > the chair and the keyboard experienced a neuronal accident (also known > as a brain fart), turning a check for VM_SHARED into VM_PFNMAP as it > was reshuffling some of the code. > > The blob having now come back to its senses, let's restore the > initial check that the original author got right the first place. > > Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature") > Cc: Steven Price > Cc: Catalin Marinas > Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Somehow this blob missed it too while reviewing the changes you'd made. Thanks, Steve > --- > arch/arm64/kvm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 3155c9e778f0..0625bf2353c2 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -947,7 +947,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, > vma_shift = get_vma_page_shift(vma, hva); > } > > - shared = (vma->vm_flags & VM_PFNMAP); > + shared = (vma->vm_flags & VM_SHARED); > > switch (vma_shift) { > #ifndef __PAGETABLE_PMD_FOLDED > 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=-15.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 7D918C07E95 for ; Tue, 13 Jul 2021 16:18:48 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id EACE661175 for ; Tue, 13 Jul 2021 16:18:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EACE661175 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6FF534A19A; Tue, 13 Jul 2021 12:18:47 -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 lN5hEaWK17Oq; Tue, 13 Jul 2021 12:18:45 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AB3E14A19E; Tue, 13 Jul 2021 12:18:45 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 14DDA40821 for ; Tue, 13 Jul 2021 12:18:44 -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 fuUWI+gwkK+U for ; Tue, 13 Jul 2021 12:18:40 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8D1E24083E for ; Tue, 13 Jul 2021 12:18:40 -0400 (EDT) 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 2CD206D; Tue, 13 Jul 2021 09:18:40 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C11E03F7D8; Tue, 13 Jul 2021 09:18:38 -0700 (PDT) Subject: Re: [PATCH] KVM: arm64: Fix detection of shared VMAs on guest fault To: Marc Zyngier , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org References: <20210713114804.594993-1-maz@kernel.org> From: Steven Price Message-ID: <017a25b0-d706-df97-dbba-80d5b21d1779@arm.com> Date: Tue, 13 Jul 2021 17:18:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210713114804.594993-1-maz@kernel.org> Content-Language: en-GB Cc: kernel-team@android.com, kvm@vger.kernel.org, Will Deacon , Catalin Marinas 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 13/07/2021 12:48, Marc Zyngier wrote: > When merging the KVM MTE support, the blob that was interposed between > the chair and the keyboard experienced a neuronal accident (also known > as a brain fart), turning a check for VM_SHARED into VM_PFNMAP as it > was reshuffling some of the code. > > The blob having now come back to its senses, let's restore the > initial check that the original author got right the first place. > > Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature") > Cc: Steven Price > Cc: Catalin Marinas > Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Somehow this blob missed it too while reviewing the changes you'd made. Thanks, Steve > --- > arch/arm64/kvm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 3155c9e778f0..0625bf2353c2 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -947,7 +947,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, > vma_shift = get_vma_page_shift(vma, hva); > } > > - shared = (vma->vm_flags & VM_PFNMAP); > + shared = (vma->vm_flags & VM_SHARED); > > switch (vma_shift) { > #ifndef __PAGETABLE_PMD_FOLDED > _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-16.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 F2C92C07E95 for ; Tue, 13 Jul 2021 16:20:06 +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 C382F610C7 for ; Tue, 13 Jul 2021 16:20:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C382F610C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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.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:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=zoBXHjzvjejxToOkkbCLi+HCDtFHjAuImMEZhC+vMBk=; b=IEqlgshjuIaTFU7fTccOYqHsvD asQoexCWBw8E5xhreJKTKB7Cy23d9GzbvD0q3Z2lI/ISy8Neb58spMNv7/aKtf+bc+vaFIE18/0Vs isU9fWsj7VaLyqePaDbgZ+QWM3GFa3wraokQJWydRfAt2W0X09KLOM0qvM9t3CpL2wkVBRoTtqMCt a69KpPqwWOJG490z5g34A6m0D/K9AW0nfHP3NtsqY/G5DyUoU92ZTeVSgeslGZG1rm7q4xPLlF8ig PFd7wFx4HlsbprFgPOWwY6VZ5wSjdJ0L4dK6PKxC8iUuVSkp2Y/VZRub3/GLBwx9RFqxRUWHsydpg YfCV05sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3L7R-00AvFu-8Y; Tue, 13 Jul 2021 16:18:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3L7N-00AvEj-2K for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 16:18:46 +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 2CD206D; Tue, 13 Jul 2021 09:18:40 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C11E03F7D8; Tue, 13 Jul 2021 09:18:38 -0700 (PDT) Subject: Re: [PATCH] KVM: arm64: Fix detection of shared VMAs on guest fault To: Marc Zyngier , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, James Morse , Suzuki K Poulose , Alexandru Elisei , Will Deacon , kernel-team@android.com, Catalin Marinas References: <20210713114804.594993-1-maz@kernel.org> From: Steven Price Message-ID: <017a25b0-d706-df97-dbba-80d5b21d1779@arm.com> Date: Tue, 13 Jul 2021 17:18:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210713114804.594993-1-maz@kernel.org> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_091845_219227_769C8E11 X-CRM114-Status: GOOD ( 18.72 ) 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 13/07/2021 12:48, Marc Zyngier wrote: > When merging the KVM MTE support, the blob that was interposed between > the chair and the keyboard experienced a neuronal accident (also known > as a brain fart), turning a check for VM_SHARED into VM_PFNMAP as it > was reshuffling some of the code. > > The blob having now come back to its senses, let's restore the > initial check that the original author got right the first place. > > Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature") > Cc: Steven Price > Cc: Catalin Marinas > Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Somehow this blob missed it too while reviewing the changes you'd made. Thanks, Steve > --- > arch/arm64/kvm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 3155c9e778f0..0625bf2353c2 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -947,7 +947,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, > vma_shift = get_vma_page_shift(vma, hva); > } > > - shared = (vma->vm_flags & VM_PFNMAP); > + shared = (vma->vm_flags & VM_SHARED); > > switch (vma_shift) { > #ifndef __PAGETABLE_PMD_FOLDED > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel