From owner-svn-src-projects@FreeBSD.ORG Tue Aug 26 10:23:00 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 767CA345; Tue, 26 Aug 2014 10:23:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 486633501; Tue, 26 Aug 2014 10:23:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7QAN0hj002891; Tue, 26 Aug 2014 10:23:00 GMT (envelope-from cherry@FreeBSD.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7QAMx7X002888; Tue, 26 Aug 2014 10:22:59 GMT (envelope-from cherry@FreeBSD.org) Message-Id: <201408261022.s7QAMx7X002888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cherry set sender to cherry@FreeBSD.org using -f From: "Cherry G. Mathew" Date: Tue, 26 Aug 2014 10:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r270654 - projects/amd64_xen_pv/sys/amd64/xen X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 10:23:00 -0000 Author: cherry Date: Tue Aug 26 10:22:59 2014 New Revision: 270654 URL: http://svnweb.freebsd.org/changeset/base/270654 Log: Add all pv ram to the crash dump pages, instead of skipping "holes". This also fixes fragmentation related breakage during bootup, which fails during the RAM "device" attach. Approved by: gibbs (implicit) Modified: projects/amd64_xen_pv/sys/amd64/xen/machdep.c projects/amd64_xen_pv/sys/amd64/xen/pmap.c Modified: projects/amd64_xen_pv/sys/amd64/xen/machdep.c ============================================================================== --- projects/amd64_xen_pv/sys/amd64/xen/machdep.c Tue Aug 26 09:40:14 2014 (r270653) +++ projects/amd64_xen_pv/sys/amd64/xen/machdep.c Tue Aug 26 10:22:59 2014 (r270654) @@ -594,11 +594,13 @@ initxen(struct start_info *si) DPCPU_ID_SET(0, vcpu_info, &HYPERVISOR_shared_info->vcpu_info[0]); /* Register the rest of free physical memory with phys_avail[] */ - /* dump_avail[] starts at index 1 */ phys_avail[pa_index++] = physfree; - dump_avail[pa_index] = physfree; phys_avail[pa_index++] = ptoa(physmem); - dump_avail[pa_index] = ptoa(physmem); + + /* We dump all of our given RAM */ + /* XXX: revise this for dom0 */ + dump_avail[1] = 0; + dump_avail[2] = ptoa(physmem); PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); Modified: projects/amd64_xen_pv/sys/amd64/xen/pmap.c ============================================================================== --- projects/amd64_xen_pv/sys/amd64/xen/pmap.c Tue Aug 26 09:40:14 2014 (r270653) +++ projects/amd64_xen_pv/sys/amd64/xen/pmap.c Tue Aug 26 10:22:59 2014 (r270654) @@ -1157,7 +1157,7 @@ retry: xen_pt_frames); bzero((void *)PTOV(ptoa(xen_pt)), ptoa(xen_pt_frames)); -#if 0 +#if 1 /* * Unmap from kernel VA space, since we're going to put them * on the free list via phys_avail @@ -1173,8 +1173,8 @@ retry: * Record the pages as available to the VM via phys_avail[] */ - dump_avail[pa_index + 1] = phys_avail[pa_index] = ptoa(xen_pt); - dump_avail[pa_index + 2] = phys_avail[pa_index + 1] = phys_avail[pa_index] + + phys_avail[pa_index] = ptoa(xen_pt); + phys_avail[pa_index + 1] = phys_avail[pa_index] + ptoa(xen_pt_frames); pa_index += 2; #endif