Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp823033pxu; Wed, 2 Dec 2020 04:30:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxItSL92f+4Rb+C+mLDR8NWmjCfnX+exVuEXrsQwNf6t0fX4ym9TpvYUNDZM0PjdjqvVTnx X-Received: by 2002:a17:907:265c:: with SMTP id ar28mr2089620ejc.172.1606912214164; Wed, 02 Dec 2020 04:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606912214; cv=none; d=google.com; s=arc-20160816; b=EA4Q2JQOpkUs6dcLRgRwu4mGBPUtUMcSV07a/3a/lY6m13paZjRVRQFsoVztlzDhlj oes/FlopY4FMVdQJEkImmmI9FlhvIRGNy/rBtx9jWUI/+KazUZ/OE0d53yYcHTiRgfPc P5054irl/9RbWPyr9iyG8alQRsMckC6+g8XjDbvP7agTLHR2v2jIjt3lV9RuSh1zizHQ BP3PVBlOKMm8FTVJfr5wQvozza6vcG3JmtB8FiKy4nsq5e3JN1uAb4ZkB3s+Oa4j9qM9 MMId/1n2sW2Wj2/xDe1L9doWhQ8rN2NnA9wL2U/KLqN3l0p70yQ0DFWI3RTIJnL4naKT 9MhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pPhjWfgc+6pI2aaa5pUMAGb3y1h7xPpPcuWg0/uxMJI=; b=UxL7aRxjGss5qDbNzO5/oUR/zWfdbVbdNPI0K6jq00zi1sMmATjGWsAAxfbl8+v4wO Tyvf+RE/R/eiWzG3aDXM2cOJOnpg6yrK3ImAfnZA1zs/Y7MW0v15iWE5twnWi/yHLvsO H/kHQl8xsdAzRErcMiOuhFqsFgG6WHUePtcgKopdgmYLRyaGj0dhR8ds5vCGqGxiCIGM YeYa8zJzeqY9JSnKZyVslovfxpH6OublsOTwY4XSDcEfoorRt9bUW/498nwdMXLoXUS0 mB1O1+Vo4GTbFJ3HYa6pT6RIoQRF8MZeSAq7/LJMMTwIbyHmU5dUB/k/rYkq+fUDmWgZ v+zg== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m11si1004953eda.522.2020.12.02.04.29.49; Wed, 02 Dec 2020 04:30:14 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727452AbgLBMZ2 (ORCPT + 99 others); Wed, 2 Dec 2020 07:25:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:53112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbgLBMZ1 (ORCPT ); Wed, 2 Dec 2020 07:25:27 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03C34221FE; Wed, 2 Dec 2020 12:24:47 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=hot-poop.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kkRBc-00FKdk-2e; Wed, 02 Dec 2020 12:24:44 +0000 From: Marc Zyngier To: Gavin Shan , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Julien Thierry , James Morse , linux-kernel@vger.kernel.org, Suzuki K Poulose , Will Deacon , Quentin Perret , Yanan Wang Cc: yuzenghui@huawei.com, jiangkunkun@huawei.com, lushenming@huawei.com, wanghaibin.wang@huawei.com, zhukeqian1@huawei.com, yezengruan@huawei.com, wangjingyi11@huawei.com Subject: Re: [PATCH v2 0/3] Fix several bugs in KVM stage 2 translation Date: Wed, 2 Dec 2020 12:24:38 +0000 Message-Id: <160691185017.266917.9856801601483446789.b4-ty@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201201034.116760-1-wangyanan55@huawei.com> References: <20201201201034.116760-1-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: gshan@redhat.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, julien.thierry.kdev@gmail.com, james.morse@arm.com, linux-kernel@vger.kernel.org, suzuki.poulose@arm.com, will@kernel.org, qperret@google.com, wangyanan55@huawei.com, yuzenghui@huawei.com, jiangkunkun@huawei.com, lushenming@huawei.com, wanghaibin.wang@huawei.com, zhukeqian1@huawei.com, yezengruan@huawei.com, wangjingyi11@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Dec 2020 04:10:31 +0800, Yanan Wang wrote: > When installing a new pte entry or updating an old valid entry in stage 2 > translation, we use get_page()/put_page() to record page_count of the page-table > pages. PATCH 1/3 aims to fix incorrect use of get_page()/put_page() in stage 2, > which might make page-table pages unable to be freed when unmapping a range. > > When dirty logging of a guest with hugepages is finished, we should merge tables > back into a block entry if adjustment of huge mapping is found necessary. > In addition to installing the block entry, we should not only free the non-huge > page-table pages but also invalidate all the TLB entries of non-huge mappings for > the block. PATCH 2/3 adds enough TLBI when merging tables into a block entry. > > [...] Applied to kvm-arm64/fixes-5.10, thanks! [1/3] KVM: arm64: Fix memory leak on stage2 update of a valid PTE commit: 5c646b7e1d8bcb12317426287c516dfa4c5171c2 [2/3] KVM: arm64: Fix handling of merging tables into a block entry commit: 3a0b870e3448302ca2ba703bea1b79b61c3f33c6 [3/3] KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort() commit: 7d894834a305568a0168c55d4729216f5f8cb4e6 Cheers, M. -- Without deviation from the norm, progress is not possible.