From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 3 13:33:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC721065673 for ; Tue, 3 Apr 2012 13:33:58 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C262C8FC18 for ; Tue, 3 Apr 2012 13:33:57 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so3594991wgb.31 for ; Tue, 03 Apr 2012 06:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=FpCp6XMmMAP2LiiQ9z7c2XyqplU2N/bGDWRoV9AV4ew=; b=S6UHECPg1ARK8PgZWr/s0utVakTUwdj0IMiysz6EK2ZFZCXLYWDZXoZkBc5JPqtfWs SoSjE/tAh/pRUOf77LJy/ckPX31ErHmNYFrWC8689crhrlDQ6oKnASeT5+JBr/otrDAQ vb6jJBokZJ5v9K0Q5RoQoVei8/HilA7R3Ri+xLz4ZTj9WpaEGDX0OCvN0e70EJc5iPO8 fqM5GcydcQSecECDZofRqmMMENt5igNKEuo1TJZh+OMT1lBo/YRqliQiuopcdq9ut7in 2BHSy/dg5za1PEiLp/XWQlmy/nnvMjJpL1yhO3uvmbPJA0tqDmy1PmUy4s96Y44dSw4+ 1x/g== MIME-Version: 1.0 Received: by 10.180.102.102 with SMTP id fn6mr6435390wib.10.1333460036973; Tue, 03 Apr 2012 06:33:56 -0700 (PDT) Received: by 10.180.98.161 with HTTP; Tue, 3 Apr 2012 06:33:56 -0700 (PDT) Date: Tue, 3 Apr 2012 09:33:56 -0400 Message-ID: From: vasanth rao naik sabavat To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: question about amd64 pagetable page allocation. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2012 13:33:58 -0000 Hi, I am trying to understand the page table page allocation for a process in FBSD6.1. I see that the page table pages are allocated by vm_page_alloc(). I believe the virtual address for this allocated page can be derived by PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)), however when I compare this address with the virtual address accessed in pmap_remove_pages() they are not the same. The virtual address of a *PTE in pmap_remove_pages() is something like *0xffff800000643200 * However, the virtual address of the page allocated by vm_page_alloc() is * 0xffffff033c6a0000 *I would also like to understand the importance of loc_PTmap, I believe the pmap_remove_pages() is derving the page table page addresses from loc_PTmap? (kgdb) p loc_PTmap Cannot access memory at address 0xffff800000000000 How do we relate the loc_PTmap to the page table pages allocated by vm_page_alloc() in _pmap_allocpte(). Thanks, Vasanth