From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 8 05:39:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E5BD1065670 for ; Sun, 8 Jun 2008 05:39:52 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 59C8B8FC15 for ; Sun, 8 Jun 2008 05:39:52 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id E576C2C2D46; Sun, 8 Jun 2008 00:39:51 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GP0hVoojesd6; Sun, 8 Jun 2008 00:39:44 -0500 (CDT) Received: from [216.63.78.18] (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 318A62C2A8E; Sun, 8 Jun 2008 00:39:44 -0500 (CDT) Message-ID: <484B709F.1070503@cs.rice.edu> Date: Sun, 08 Jun 2008 00:39:43 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070805 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kostik Belousov References: <484B20E7.2040009@cs.rice.edu> <20080608052653.GS94309@deviant.kiev.zoral.com.ua> In-Reply-To: <20080608052653.GS94309@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Increasing KVM on amd64 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: Sun, 08 Jun 2008 05:39:52 -0000 Kostik Belousov wrote: >On Sat, Jun 07, 2008 at 06:59:35PM -0500, Alan Cox wrote: > > >>You can download a patch from >>http://www.cs.rice.edu/~alc/amd64_kvm_6GB.patch that increases amd64's >>kernel virtual address space to 6GB. This patch also increases the >>default for the kmem map to almost 2GB. I believe that kernel loadable >>modules still work. However, I suspect that mini-dumps are broken. >> >> >The amd64 modules text/data/bss virtual addresses are allocated from the >kernel_map (link_elf_obj.c, link_elf_load_file). Now, the lower end >of the kernel_map is top-6Gb. > >Kernel code (both kernel proper and modules) is compiled for "kernel memory >model", according to the gcc info: >`-mcmodel=kernel' >Generate code for the kernel code model. The kernel runs in the >negative 2 GB of the address space. This model has to be used for >Linux kernel code. > >I suspect we have a problem there. > > > The change to link_elf_obj.c is supposed to ensure allocation of an address in the upper 2GB of the kernel map for the module. Alan