From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH 5/8] KVM: arm/arm64: Enforce PTE mappings at stage2 when needed Date: Tue, 02 Apr 2019 11:19:23 +0100 Message-ID: <8636n0676c.wl-marc.zyngier@arm.com> References: <20190328133608.110805-1-marc.zyngier@arm.com> <20190328133608.110805-6-marc.zyngier@arm.com> <496ad70d-eaa5-c46e-ddf0-d07607522eeb@redhat.com> <20190402094716.GA1082@en101> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 57E9E4A44D for ; Tue, 2 Apr 2019 06:19:34 -0400 (EDT) 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 JBtKmUZ5XtPd for ; Tue, 2 Apr 2019 06:19:32 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7013B4A3A5 for ; Tue, 2 Apr 2019 06:19:32 -0400 (EDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Auger Eric Cc: kvm@vger.kernel.org, YueHaibing , Julien Grall , Zenghui Yu , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On Tue, 02 Apr 2019 11:07:28 +0100, Auger Eric wrote: > > Hi Suzuki, > > On 4/2/19 11:47 AM, Suzuki K Poulose wrote: > > On Mon, Apr 01, 2019 at 07:10:37PM +0200, Auger Eric wrote: > >> Hi Suzuki, > >> > >> On 3/28/19 2:36 PM, Marc Zyngier wrote: > >>> From: Suzuki K Poulose > >>> > >>> 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. > >> > >> I face a regression with this patch. My guest gets stuck. I am running > >> on AMD Seattle. Reverting the patch makes things work again for me. I > >> run with qemu. In this scenario I don't use hugepages. I use 64kB page > >> size for both the host and guest. > > > > Hi Eric, > > > > Thanks for the testing. Does the following patch fix the issue for you ? > > Yes it does. Thanks for testing this. Suzuki, can you please resend this with Eric's TB, and a Fixes: tag? I'll queue it right away. Thanks, M. -- Jazz is not dead, it just smell funny. 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED 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 46097C4360F for ; Tue, 2 Apr 2019 10:19:41 +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 128DB2082C for ; Tue, 2 Apr 2019 10:19:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LDryNJ6d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 128DB2082C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iSNEneks2ZhzYCGOSjjvyf02v4IedXC2A7m8DuS6LkM=; b=LDryNJ6d10Gj88 F7A5Y65IICRgPpFIwHYouSbTprWtLxmwUR48mLf07aC9CSjrFZQBgQnNXs1lN/rP6WrI5ZenKNC0c SPoGxHgOpLJtai74/Qh7M7ztidcEwsuMc8HXZ6O4vUmRMpJeW0jG4KO2iJbXDtDhlXsACZFz2SUxU 5xegKEKjAP+HQy/uJ06qTpxeFwL1QPXltyBRNYfMULBht8o4lcq0xxqv2sZlfNBheirjn96eFTqOB Y2pBQC8OTg01nD61hY5GJrezK+c8Oa5aH53H+LnbhgRVy2VU10u90M8gGhHxoKt0E2/LCeGD/Mbm7 YvZfM0yoeWiK3UjjFtqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBGW0-00048R-6Q; Tue, 02 Apr 2019 10:19:36 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBGVx-00047q-8q for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2019 10:19:34 +0000 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 BB83615AD; Tue, 2 Apr 2019 03:19:31 -0700 (PDT) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4635A3F59C; Tue, 2 Apr 2019 03:19:25 -0700 (PDT) Date: Tue, 02 Apr 2019 11:19:23 +0100 Message-ID: <8636n0676c.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Auger Eric Subject: Re: [PATCH 5/8] KVM: arm/arm64: Enforce PTE mappings at stage2 when needed In-Reply-To: References: <20190328133608.110805-1-marc.zyngier@arm.com> <20190328133608.110805-6-marc.zyngier@arm.com> <496ad70d-eaa5-c46e-ddf0-d07607522eeb@redhat.com> <20190402094716.GA1082@en101> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_031933_319057_17B36FD9 X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julien Thierry , kvm@vger.kernel.org, Radim =?UTF-8?B?S3LEjW3DocWZ?= , Suzuki K Poulose , YueHaibing , Zheng Xiang , Shameerali Kolothum Thodi , Christoffer Dall , Julien Grall , James Morse , Nianyao Tang , Zenghui Yu , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 02 Apr 2019 11:07:28 +0100, Auger Eric wrote: > > Hi Suzuki, > > On 4/2/19 11:47 AM, Suzuki K Poulose wrote: > > On Mon, Apr 01, 2019 at 07:10:37PM +0200, Auger Eric wrote: > >> Hi Suzuki, > >> > >> On 3/28/19 2:36 PM, Marc Zyngier wrote: > >>> From: Suzuki K Poulose > >>> > >>> 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. > >> > >> I face a regression with this patch. My guest gets stuck. I am running > >> on AMD Seattle. Reverting the patch makes things work again for me. I > >> run with qemu. In this scenario I don't use hugepages. I use 64kB page > >> size for both the host and guest. > > > > Hi Eric, > > > > Thanks for the testing. Does the following patch fix the issue for you ? > > Yes it does. Thanks for testing this. Suzuki, can you please resend this with Eric's TB, and a Fixes: tag? I'll queue it right away. Thanks, M. -- Jazz is not dead, it just smell funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel