Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3362823yba; Tue, 23 Apr 2019 02:26:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/KkuNvcybcpsn4pP4S1sKBjncUiHIFBHk2SyBOt4J1ZlUHz7u8tOWYs5RYon7DBiupWQp X-Received: by 2002:aa7:8c86:: with SMTP id p6mr25506560pfd.37.1556011572642; Tue, 23 Apr 2019 02:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556011572; cv=none; d=google.com; s=arc-20160816; b=YHOeaFYHtesz4uHZBrpjxyWAWjveY7YaUI47MyhjfryD+uN7s1D9/gm/Ti6fahL5+A wWgNWySH8Bb+L8Xr8iSQxWTDplpSayjCdYxGPMfcWDANAHTnHhEv2V59NW+kxdWi6dG2 A9W4d/VTIuK02oh/9vO3yjXGf+x+AVEXgt/QShd6bKTCS9XvqxX3h8QJ4QRRpr+BWKAP OCrZ2AMvPZB6RcArUZsdu4au5k+WWn8oMY7aclBnUO/SxKDnDX+41p53q8Z3KnesnKeD JUxPdhms1L+dnFWcRhoDxvTDyiQfgjBnJcFxssBHgnAXfaINsONgmKg0KssCk3NI7069 4XJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rt7tezGc4ZmU4eyhlF8PIUlvcSti9WavWkSGk2PaN1M=; b=KAbVEIJTgT8GG/nqz/G+NJdboWEK1qgACbNcM92FznXZ3ks3Lotdu3tTIYlcpxjPTu pQU4KQhxU36VFYjxgMhO+D6GElawiTWD2v4BqrfCBtSZSQj9xVCphAL8x8vd5+WOLwee gb7cINjTkkVdUIU5rWSyRdWPOThns/ZU0IQ0ZGVPIJaKP112jHKbhuB3yKtgHBPFII6Q C+EOF/vFqLQrQ5T/82yUMZERgWrrutOduWFCLG25XIwiE2W3OvJRf7n0fCgzY6AcVn2S LGbUx5km7Oq+LbEh14hnp6v9P96Wa7PPMF7kc2frqGjVdtTSsUzgV41KNREBtWdQJXgQ RWPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si15502843plo.101.2019.04.23.02.25.56; Tue, 23 Apr 2019 02:26:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbfDWJZF (ORCPT + 99 others); Tue, 23 Apr 2019 05:25:05 -0400 Received: from foss.arm.com ([217.140.101.70]:52370 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfDWJZF (ORCPT ); Tue, 23 Apr 2019 05:25:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E9CE374; Tue, 23 Apr 2019 02:25:04 -0700 (PDT) Received: from [10.37.12.155] (unknown [10.37.12.155]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 47D883F557; Tue, 23 Apr 2019 02:25:03 -0700 (PDT) Subject: Re: [PATCH AUTOSEL 5.0 29/98] KVM: arm/arm64: Enforce PTE mappings at stage2 when needed To: sashal@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: yuzenghui@huawei.com, christoffer.dall@arm.com, marc.zyngier@arm.com, kvmarm@lists.cs.columbia.edu References: <20190422194205.10404-1-sashal@kernel.org> <20190422194205.10404-29-sashal@kernel.org> From: Suzuki K Poulose Message-ID: Date: Tue, 23 Apr 2019 10:27:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190422194205.10404-29-sashal@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sasha, On 04/22/2019 08:40 PM, Sasha Levin wrote: > From: Suzuki K Poulose > > [ Upstream commit a80868f398554842b14d07060012c06efb57c456 ] > > commit 6794ad5443a2118 ("KVM: arm/arm64: Fix unintended stage 2 PMD mappings") > made the checks to skip huge mappings, stricter. However it introduced > a bug where we still use huge mappings, ignoring the flag to > use PTE mappings, by not reseting the vma_pagesize to PAGE_SIZE. > > Also, the checks do not cover the PUD huge pages, that was > under review during the same period. This patch fixes both > the issues. > > Fixes : 6794ad5443a2118 ("KVM: arm/arm64: Fix unintended stage 2 PMD mappings") > Reported-by: Zenghui Yu > Cc: Zenghui Yu > Cc: Christoffer Dall > Signed-off-by: Suzuki K Poulose > Signed-off-by: Marc Zyngier > Signed-off-by: Sasha Levin (Microsoft) Please be aware that we need a follow up fix for this patch to fix the problem for THP backed memory. http://lists.infradead.org/pipermail/linux-arm-kernel/2019-April/645324.html It should appear upstream soon. Cheers Suzuki