From owner-svn-src-head@freebsd.org Mon Mar 28 18:41:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B1AAE0717; Mon, 28 Mar 2016 18:41:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB6F8145D; Mon, 28 Mar 2016 18:41:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2SIfm7e072737; Mon, 28 Mar 2016 18:41:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2SIfmmS072736; Mon, 28 Mar 2016 18:41:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201603281841.u2SIfmmS072736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 28 Mar 2016 18:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297359 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 18:41:50 -0000 Author: jhb Date: Mon Mar 28 18:41:48 2016 New Revision: 297359 URL: https://svnweb.freebsd.org/changeset/base/297359 Log: Fix parsing of a 1GB page table entry. Use 'pdpe' to extract the PA of the 1GB page instead of 'pde' (which was a copy and paste bug from the 2MB page case further down). CID: 1341467 Reported by: pfg Modified: head/lib/libkvm/kvm_amd64.c Modified: head/lib/libkvm/kvm_amd64.c ============================================================================== --- head/lib/libkvm/kvm_amd64.c Mon Mar 28 18:25:54 2016 (r297358) +++ head/lib/libkvm/kvm_amd64.c Mon Mar 28 18:41:48 2016 (r297359) @@ -227,7 +227,7 @@ _amd64_vatop(kvm_t *kd, kvaddr_t va, off /* * No next-level page table; pdpe describes one 1GB page. */ - a = (pde & AMD64_PG_1GB_FRAME) + (va & AMD64_PDPMASK); + a = (pdpe & AMD64_PG_1GB_FRAME) + (va & AMD64_PDPMASK); s = _kvm_pa2off(kd, a, pa); if (s == 0) { _kvm_err(kd, kd->program,