Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1091687imm; Fri, 29 Jun 2018 11:12:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKOiGIEq/IxmWBK/w4fg/lE1+0I7p0rZ5Isy28Gj3oFKxCtKh2BAWufxV7/dfQskVLk9Pgb X-Received: by 2002:a17:902:7202:: with SMTP id ba2-v6mr15643292plb.119.1530295948149; Fri, 29 Jun 2018 11:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530295948; cv=none; d=google.com; s=arc-20160816; b=XTmAeQOIW0nOVTMAjZZdtOkLEjDiVMOd30cuu6AEG9kpoHuQxCBEnXqHHeWBcYX/7L Jhz3SEwnfo7S/4l1CL1K745l15796n2+Eyr6nVIOqm8A4/HMkNSNxOKFKQNoq1ixeJBW fNIJyIfwz5BL+g8sa4KmYvpqIDQvm3DpJk44uh+gEISd0l0dPOIy3vOj1m+az/tBirPQ TvDy2lzQdKjQInDRgugqfH2RXqPPEdRsMwslzGt0+bhU+1o5njA7PY71xrUKm0EfFbJ4 PbcL6DqXW9MA01pqrTuhvUxfUm5ln48iMSudYpcy7NvHqiTme0XYh0saV4aFs47ldQPS Ym8A== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=5kWBiwLE354DZoMpyqphJvXwPeQ/s759AwvwGSrsTPk=; b=mfeKNYa6Z66Y6fpytYXJbs6i4eG2zDFAEqnbRYrIoT905quRhydCnTPGuWU0+gABNC 7oh8Ex7FGz1DCqgctIctBxIRSGrmd5JNVL7I/CX/RuTugJSYQG5wUfX7dpAaeCJXH0+G 3K4d/IL2DjwnWiC2MEvdDHjeB/7PnReOUWmaOLFWHH5GLb5CaFhDnQ3QYBiEMufPr2U/ bMxbyuIBv/2NTBn99q6rVisXaMt5gAmeJ/yHutgZILYfyIN0RF2Urt+Y4jRX4aGZCDXG TrQ8xgw5tmapYwcYBrEYtDNVqVjVUjvRrTVaCe3zqzQ9d7yLV8hpA/KyYGC+EwH5ZIrs 4/QQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si7779466plj.448.2018.06.29.11.12.14; Fri, 29 Jun 2018 11:12:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936468AbeF2OvC (ORCPT + 99 others); Fri, 29 Jun 2018 10:51:02 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47168 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936445AbeF2OvB (ORCPT ); Fri, 29 Jun 2018 10:51:01 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C73997A7E6; Fri, 29 Jun 2018 14:51:00 +0000 (UTC) Received: from localhost.localdomain (ovpn-117-106.ams2.redhat.com [10.36.117.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9339A1C739; Fri, 29 Jun 2018 14:50:58 +0000 (UTC) Subject: Re: [PATCH v3 05/20] kvm: arm/arm64: Fix stage2_flush_memslot for 4 level page table To: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org References: <1530270944-11351-1-git-send-email-suzuki.poulose@arm.com> <1530270944-11351-6-git-send-email-suzuki.poulose@arm.com> Cc: cdall@kernel.org, kvm@vger.kernel.org, marc.zyngier@arm.com, catalin.marinas@arm.com, punit.agrawal@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, julien.grall@arm.com, james.morse@arm.com, kvmarm@lists.cs.columbia.edu From: Auger Eric Message-ID: <0820efa5-1524-9039-2340-421aad88b3c5@redhat.com> Date: Fri, 29 Jun 2018 16:50:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1530270944-11351-6-git-send-email-suzuki.poulose@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 29 Jun 2018 14:51:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 29 Jun 2018 14:51:00 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'eric.auger@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Suzuki, On 06/29/2018 01:15 PM, Suzuki K Poulose wrote: > So far we have only supported 3 level page table with fixed IPA of 40bits. > Fix stage2_flush_memslot() to accommodate for 4 level tables. in 06/30 you add the justification for this change I think. worth to put in here as well? > > Cc: Marc Zyngier > Acked-by: Christoffer Dall > Signed-off-by: Suzuki K Poulose > --- > virt/kvm/arm/mmu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c > index 1d90d79..061e6b3 100644 > --- a/virt/kvm/arm/mmu.c > +++ b/virt/kvm/arm/mmu.c > @@ -379,7 +379,8 @@ static void stage2_flush_memslot(struct kvm *kvm, > pgd = kvm->arch.pgd + stage2_pgd_index(addr); > do { > next = stage2_pgd_addr_end(addr, end); > - stage2_flush_puds(kvm, pgd, addr, next); > + if (!stage2_pgd_none(*pgd)) > + stage2_flush_puds(kvm, pgd, addr, next); > } while (pgd++, addr = next, addr != end); > } > > Besides Reviewed-by: Eric Auger Thanks Eric