From patchwork Sat Oct 5 12:38:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13823278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4DB1DCF8862 for ; Sat, 5 Oct 2024 12:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r1twv3o8UwbH4PX5y/1Ie++4b8kx+AsqHHN0deYUqwY=; b=4FsOEbyl0AU1kt4Ua6p3ptvCxh mgwq9Lkl1erWFxbeOiYt147LzDC0oJBTdq5FnpEVZVtTX7ugsDYGGrcnRJi3nKRei3aRQvxWwRB2o CMLxmEwNk7OPnXk++B4G9OqcquM3bQoORs1tsRPE/aoXfsOVrqaqgslaSwAyeQ+3FZ285Ylf6fN/q vgVp2HUdchH6F35IqpjHrjOGiSnm5sq2D9j4I5d1Lwf5DbzaW9yzcO83ckSW8CvOBmfuw+TiOQ8Fw JLSIt/jGX6ZmNXQF8kevp2TM2GvwycbKRkGPqfe09VMoin3O/2jYKpIMkGA3h3k9LEJUgvs1xyWCy pkNiR+tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sx49f-0000000FMEN-0oEs; Sat, 05 Oct 2024 12:45:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sx43b-0000000FLVL-3HOq for linux-arm-kernel@lists.infradead.org; Sat, 05 Oct 2024 12:38:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 074A11063; Sat, 5 Oct 2024 05:39:17 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.39.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A24133F64C; Sat, 5 Oct 2024 05:38:43 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Marc Zyngier , Oliver Upton , James Morse , Catalin Marinas , Will Deacon , Ard Biesheuvel , Ryan Roberts , Mark Rutland , kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] KVM: arm64: ptdump: Test PMD_TYPE_MASK for block mapping Date: Sat, 5 Oct 2024 18:08:23 +0530 Message-Id: <20241005123824.1366397-5-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241005123824.1366397-1-anshuman.khandual@arm.com> References: <20241005123824.1366397-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241005_053847_885695_66A79062 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This changes stage-2 ptdump making it test given page table entries against PMD_TYPE_SECT on PMD_TYPE_MASK bits for a block mapping, as is the case for stage-1 ptdump. Cc: Marc Zyngier Cc: Oliver Upton Cc: James Morse Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.linux.dev Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Ryan Roberts --- arch/arm64/kvm/ptdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/ptdump.c b/arch/arm64/kvm/ptdump.c index e4a342e903e2..098416d7e5c2 100644 --- a/arch/arm64/kvm/ptdump.c +++ b/arch/arm64/kvm/ptdump.c @@ -52,8 +52,8 @@ static const struct ptdump_prot_bits stage2_pte_bits[] = { .set = "AF", .clear = " ", }, { - .mask = PTE_TABLE_BIT | PTE_VALID, - .val = PTE_VALID, + .mask = PMD_TYPE_MASK, + .val = PMD_TYPE_SECT, .set = "BLK", .clear = " ", },