From owner-freebsd-ppc@freebsd.org Mon Nov 7 21:57:56 2016 Return-Path: Delivered-To: freebsd-ppc@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 7F704C35188 for ; Mon, 7 Nov 2016 21:57:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E2E9B1D for ; Mon, 7 Nov 2016 21:57:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from aurora.physics.berkeley.edu (aurora.physics.berkeley.edu [128.32.117.67]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id uA7LkRYa005918 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 7 Nov 2016 13:46:28 -0800 Subject: Re: Why Huge pages must be enabled to boot a FreeBSD VM? To: freebsd-ppc@freebsd.org References: <0c4b5c7e-1078-4d42-426c-3091da17e501@br.ibm.com> From: Nathan Whitehorn Message-ID: Date: Mon, 7 Nov 2016 13:46:27 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <0c4b5c7e-1078-4d42-426c-3091da17e501@br.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVaq04SjtlIyrpjyXG7/MptiwBvbw8OwbijcevDVu16p9UvcBqs3kQeq4e4mhzR+IQZ7XHmWhbzfvxJ2qQsqVIIIWYTJyFU9Hn8= X-Sonic-ID: C;NL7lojOl5hGBhYYhDwv+pw== M;zNRAozOl5hGBhYYhDwv+pw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2016 21:57:56 -0000 On 11/07/16 11:40, Breno Leitao wrote: > Hello, > > I am wondering why Huge pages must be enabled in the hypervisor (KVM) in > order to boot FreeBSD as a guest. > > I was facing the issue below, and then I found that I didn't have enough huge > pages available. Enabling the amount of huge pages available solved this issue. > > Kernel entry at 0x1023c0 ... > panic: Page replacement error: -4 > cpuid = 0 > KDB: stack backtrace: > #0 0x6144fc at ??+0 > #1 0x614598 at ??+0 > #2 0xa7b078 at ??+0 > #3 0xa31544 at ??+0 > #4 0xa33010 at ??+0 > #5 0xa7b480 at ??+0 > #6 0xa6b2bc at ??+0 > #7 0xa64c74 at ??+0 > #8 0x102458 at ??+0 > Uptime: 1s > > > If huge pages is not enabled, is there a way to proceed with normal pages > other than crashing the VM? > > Thank you, > Breno > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" > It is supposed to warn you about that in early boot, but I guess the warning is coming too late now. We should fix that. The FreeBSD kernel on powerpc64 critically relies on huge pages to create a direct-mapped region for physical memory. It is hard, though not impossible, to change this, as it requires a comprehensive rearchitecture of much of the memory management code. -Nathan