From owner-svn-src-all@FreeBSD.ORG Thu Dec 10 07:48:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0115A106566B; Thu, 10 Dec 2009 07:48:48 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3F208FC13; Thu, 10 Dec 2009 07:48:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBA7mlw8054945; Thu, 10 Dec 2009 07:48:47 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBA7mlKq054943; Thu, 10 Dec 2009 07:48:47 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200912100748.nBA7mlKq054943@svn.freebsd.org> From: Kip Macy Date: Thu, 10 Dec 2009 07:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200352 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 07:48:48 -0000 Author: kmacy Date: Thu Dec 10 07:48:47 2009 New Revision: 200352 URL: http://svn.freebsd.org/changeset/base/200352 Log: for PV XEN translate page table entries from machine (real) to physical (logical) addresses so that kgdb can translate them to the correct coredump offsets Modified: head/sys/i386/i386/minidump_machdep.c Modified: head/sys/i386/i386/minidump_machdep.c ============================================================================== --- head/sys/i386/i386/minidump_machdep.c Thu Dec 10 06:42:28 2009 (r200351) +++ head/sys/i386/i386/minidump_machdep.c Thu Dec 10 07:48:47 2009 (r200352) @@ -313,7 +313,23 @@ minidumpsys(struct dumperinfo *di) } if ((pd[j] & PG_V) == PG_V) { pa = xpmap_mtop(pd[j] & PG_FRAME); +#ifndef XEN error = blk_write(di, 0, pa, PAGE_SIZE); +#else + pt = pmap_kenter_temporary(pa, 0); + memcpy(fakept, pt, PAGE_SIZE); + for (i = 0; i < NPTEPG; i++) + fakept[i] = xpmap_mtop(fakept[i]); + error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE); + if (error) + goto fail; + /* flush, in case we reuse fakept in the same block */ + error = blk_flush(di); + if (error) + goto fail; + bzero(fakept, sizeof(fakept)); +#endif + if (error) goto fail; } else {