Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3488907ybv; Mon, 10 Feb 2020 00:36:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyNI3Alugy7kpsMMKlDbY9YwkLBOQVCl6CTMofD/bvLM/zOAomHKADrU0/T1cDV+g9hiJ6P X-Received: by 2002:a05:6830:10a:: with SMTP id i10mr227461otp.365.1581323773825; Mon, 10 Feb 2020 00:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581323773; cv=none; d=google.com; s=arc-20160816; b=MRWeRbEwwMfhfQeJ65is9TbQenTorPlciS5+pQLcLLocfjPAXgrcoZnoY4BXKyriIS cTisWN/99ivu/w63+gI+mOkGno0Zvxy+kPL2WCdg6+1ucdwoBwW/3jY0LJIXGI5PxPNf XRG7nk6zfQNSOBypER/1reIFW9B4R9u95Y8ATKEOgKruKJVtaOHGfhugUUWKX+Y1QANp XTsrRgtayiOuxrYPm0LSyBTNKRutDUDeCy4l90lLRbNCIRnLyzoH3yd4sgU6kY1Pq944 gdikCoiTtZnbDuvIvqsouMa/Lu2jubU/FwhZDc5ixuD2Y+eZdlBQNDT4ZL0UEC35bRfz u6kA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IAH21rRjZvmTngJjoV1HKPcK//riioA2iI4jMy/qJc8=; b=oiqHQ6+8Cz5ZPaheTbOcu/F52sD/mL+PFsVqXrZAukMi1AoWmJTvmLFleT/mIZDfWb 1ftGsj1SfLAFXy4TrczIGTCp19J5GIMv4SybTHxAs9pfABmBL/inFHYaOYBhFJql8pF4 MKEMTW8OWv6/7lYll3EQH1wxnW13bbMvOxiCEoSsYIxXaduql4s2M0jFgQnT77aQGfs/ ERbl/wngjNhzc0LkK1vLrVfsjDH4npE8Uh1oqzwodH/GrI7dmkPequwYCYEs+bhu5h76 WZN9eEDccfuBuR9YVEkRGe3DtiEukQ6NCgPIjhvrTEh5RAld4GjbvGqHu0fAkbNbicxg 4x7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=DDtmRvlY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si7661063oih.70.2020.02.10.00.36.02; Mon, 10 Feb 2020 00:36:13 -0800 (PST) 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; dkim=pass header.i=@sifive.com header.s=google header.b=DDtmRvlY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbgBJIfW (ORCPT + 99 others); Mon, 10 Feb 2020 03:35:22 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36108 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727429AbgBJIfW (ORCPT ); Mon, 10 Feb 2020 03:35:22 -0500 Received: by mail-pf1-f194.google.com with SMTP id 185so3363759pfv.3 for ; Mon, 10 Feb 2020 00:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IAH21rRjZvmTngJjoV1HKPcK//riioA2iI4jMy/qJc8=; b=DDtmRvlYqXkEKZHw98V0R01Uu1kN9/ARvVSbOe2ybfFV9gwpPvK+IPY6zymXr7pYXU PNvfULtk/HbkzlHvzBMkwzCSteRUMDegujbsd/8+33JMkZ9apZr9LCihHlbgcsStys+s KvlPpITUlz2A2lC4j6WEMr6kZJavnEFJSOrvMk/Mqrq2PiINYTCOZsJQwwhELxehy2Dg clfzB+S/FCQhfWnZ+6bTq7KQ1JivzzjwepeQStaMJ+Nm+4X2JQCEOE/jKvuRGKICaevX JhZNjX4svsJV8o9Ex4NKON2HAx/Kc2KyF7Z73HAt0eSyM1pIxYlUJ6Z5cd359+ev6ehX 4BQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IAH21rRjZvmTngJjoV1HKPcK//riioA2iI4jMy/qJc8=; b=VrRpvAHly6cFl7x/E+KfaI6wu13DEgeYpOIslOYZpSyoNjFQGAGQUgsSAQkLTSITcD odGAkKGz1LNBBQa4SOpuFEbSogF/VWEdmuDkDxzdH3mag1BiaPrVpE7iBpHuKSvTxKap ANP+ptyu/qmyCn0EoUBclfT1iOi84UbALResF+wnZqpOOuzmtcI95NLE4qq9/a31BGch Wk7citvLdcm4ingkmNMsqdINvMPwZl6TzOsZNwGv9ZIByNLwFPuCxNCRCo/I6S/O7TM7 H1p93dNarZpJ2gsKItnHNXoX+75nvw9r+D2BW3/6LLCX3AcdcBXsWFZF0FnPlR1nI9/4 x4oA== X-Gm-Message-State: APjAAAUX2Gk+r1YAD57A3WAK+I1msba1hs/EvxTju8RBwir4Buflr4V2 0+T1aZ9N62HqbgS7gwyqk4rpXA== X-Received: by 2002:aa7:8bda:: with SMTP id s26mr125990pfd.194.1581323720533; Mon, 10 Feb 2020 00:35:20 -0800 (PST) Received: from hsinchu02.internal.sifive.com (220-132-236-182.HINET-IP.hinet.net. [220.132.236.182]) by smtp.gmail.com with ESMTPSA id q8sm10582409pje.2.2020.02.10.00.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 00:35:19 -0800 (PST) From: Zong Li To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Zong Li Subject: [PATCH v2 0/2] RISC-V page table dumper Date: Mon, 10 Feb 2020 16:35:13 +0800 Message-Id: <20200210083515.10864-1-zong.li@sifive.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch contains the support for dumping the page tables, and it's implemented on top of the generic page table dumper patch set. The generic page table dumper patch set is merged at 5.6-rc1. This patch also depends on the fix about KASAN issue which causes the segmentation fault. (https://patchwork.kernel.org/patch/11372493/) Zong Li (2): riscv: Add support to dump the kernel page tables riscv: Use macro definition instead of magic number arch/riscv/Kconfig | 1 + arch/riscv/include/asm/kasan.h | 2 +- arch/riscv/include/asm/pgtable.h | 10 + arch/riscv/include/asm/ptdump.h | 11 ++ arch/riscv/mm/Makefile | 1 + arch/riscv/mm/ptdump.c | 317 +++++++++++++++++++++++++++++++ 6 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 arch/riscv/include/asm/ptdump.h create mode 100644 arch/riscv/mm/ptdump.c -- 2.25.0