Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2019 00:38:29 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r342797 - stable/11/sys/vm
Message-ID:  <201901060038.x060cTHx029428@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan  6 00:38:28 2019
New Revision: 342797
URL: https://svnweb.freebsd.org/changeset/base/342797

Log:
  MFC r342630:
  Add 'v' modifier to the ddb 'show pginfo' command to display vm_page
  backing the provided kernel virtual address.

Modified:
  stable/11/sys/vm/vm_page.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_page.c
==============================================================================
--- stable/11/sys/vm/vm_page.c	Sun Jan  6 00:37:14 2019	(r342796)
+++ stable/11/sys/vm/vm_page.c	Sun Jan  6 00:38:28 2019	(r342797)
@@ -3893,7 +3893,7 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info)
 DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo)
 {
 	vm_page_t m;
-	boolean_t phys;
+	boolean_t phys, virt;
 
 	if (!have_addr) {
 		db_printf("show pginfo addr\n");
@@ -3901,7 +3901,10 @@ DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo)
 	}
 
 	phys = strchr(modif, 'p') != NULL;
-	if (phys)
+	virt = strchr(modif, 'v') != NULL;
+	if (virt)
+		m = PHYS_TO_VM_PAGE(pmap_kextract(addr));
+	else if (phys)
 		m = PHYS_TO_VM_PAGE(addr);
 	else
 		m = (vm_page_t)addr;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901060038.x060cTHx029428>