Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp239343pxb; Fri, 15 Jan 2021 01:55:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGOZ9HELB65clis0KDevl/6bdcqw0o9LaA/Uxyacw8rJKKh1MB0FbBodRt2CqqL5f8DoCU X-Received: by 2002:a05:6402:160f:: with SMTP id f15mr8755310edv.348.1610704530482; Fri, 15 Jan 2021 01:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610704530; cv=none; d=google.com; s=arc-20160816; b=t+JMHnpWuUzdqY5hAGRDrwYlRe/OgAw18rFZIdyl2qHTwmmqzhkGl/WJZKYxPKn9Fg /OKgpEjwPK3TQ3LkcYGy3aSut8tS4s7VleymYzlTNexgm9TqupAAx2eDbUR/39VqN0AY 6T86bd5wat54OReSVRruoRIngswo4MOkIcWXpFRH4hrBfDrxSNnpDXKZeM13QZm3k/ad wEhcM/mPf35vdilB+Me1VEznBuEDTc9bvENL19GtrkGZhPFDh5KgspW4n7PvmoWUbDcu CbaerotvGD/LFLFU8Uv9jetYChBUX0wdoDreol7z/9uGf6utsg9VBeF6Pseo7aaXwgQ1 2RRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=lHO//dgzHi+R7iqSp05M0MWsDxnz+cclacVE9Naqdo8=; b=sYyAL9eTkLcG36d6E5FhbKV+NYpqNQfiDDjck1NXK2J++9Pifng5JntmsL9MbuU+y2 SQ10DeoXj7gaSaPrCWX7cOuR7JbFL1y/IhArzL4jtsuuxHOIIKjFfzuoRefDFcag0/TB lec4P1WhgZT/cuRizz/LPPHKQ4q3+ZXL7UHiEDDL40CGbyWpcXGVTHTrLcDQARBWdaej hCWMDsm72xLLYuxvqAQKv9WczlcIj9DbNTEJ7y05pmrbOzt0y9tRnYrxtj2y4WtYnL4v sIwNiRSaOr1t2X7zEy8CPJpFrtpKZvdMtxGvfzuGAt1uMXNO9WVk3BOdcqE8dkGgsLiO +lCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do4si2031552ejc.295.2021.01.15.01.54.58; Fri, 15 Jan 2021 01:55:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730388AbhAOJyK (ORCPT + 99 others); Fri, 15 Jan 2021 04:54:10 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:11539 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbhAOJyJ (ORCPT ); Fri, 15 Jan 2021 04:54:09 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DHGgC2fHkzMKkq; Fri, 15 Jan 2021 17:52:07 +0800 (CST) Received: from DESKTOP-5IS4806.china.huawei.com (10.174.184.42) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Fri, 15 Jan 2021 17:53:16 +0800 From: Keqian Zhu To: , , , , Will Deacon , Marc Zyngier , Catalin Marinas CC: Mark Rutland , James Morse , Robin Murphy , Joerg Roedel , "Daniel Lezcano" , Thomas Gleixner , Suzuki K Poulose , Julien Thierry , Andrew Morton , Alexios Zavras , , Subject: [PATCH] kvm: arm64: Properly align the end address of table walk Date: Fri, 15 Jan 2021 17:53:07 +0800 Message-ID: <20210115095307.12912-1-zhukeqian1@huawei.com> X-Mailer: git-send-email 2.8.4.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.184.42] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When align the end address, ought to use its original value. Fixes: b1e57de62cfb ("KVM: arm64: Add stand-alone page-table walker infrastructure") Signed-off-by: Keqian Zhu --- arch/arm64/kvm/hyp/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c index bdf8e55ed308..670b0ef12440 100644 --- a/arch/arm64/kvm/hyp/pgtable.c +++ b/arch/arm64/kvm/hyp/pgtable.c @@ -296,7 +296,7 @@ int kvm_pgtable_walk(struct kvm_pgtable *pgt, u64 addr, u64 size, struct kvm_pgtable_walk_data walk_data = { .pgt = pgt, .addr = ALIGN_DOWN(addr, PAGE_SIZE), - .end = PAGE_ALIGN(walk_data.addr + size), + .end = PAGE_ALIGN(addr + size), .walker = walker, }; -- 2.19.1