From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin O'Connor Subject: Re: [PATCH] Seabios - read e820 reserve from qemu_cfg Date: Mon, 25 Jan 2010 19:24:47 -0500 Message-ID: <20100126002447.GA8800@morn.localdomain> References: <4B5DCAF2.3010105@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity , Anthony Liguori , seabios@seabios.org To: Jes Sorensen Return-path: Received: from mail-yx0-f187.google.com ([209.85.210.187]:51148 "EHLO mail-yx0-f187.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067Ab0AZAYv (ORCPT ); Mon, 25 Jan 2010 19:24:51 -0500 Received: by yxe17 with SMTP id 17so3256030yxe.33 for ; Mon, 25 Jan 2010 16:24:50 -0800 (PST) Content-Disposition: inline In-Reply-To: <4B5DCAF2.3010105@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jan 25, 2010 at 05:46:42PM +0100, Jes Sorensen wrote: > Hi, > > Right now KVM/QEMU relies on hard coded values in Seabios for the > reserved area for the TSS pages and the EPT page. > > I'd like to suggest we change this to pass the value from QEMU via > qemu-cfg making it possible to move it around dynamically in the future. > > Attached is a patch to Seabios for this, which defaults to the current > hard coded value if no value is provided by qemu-cfg. We can remove > the backwards compatibility later. > > I'll post the QEMU patches for upstream QEMU and QEMU-KVM in a minute. > > Comments most welcome! I like the idea, but I think it would be better to pass a list of e820 entries explicitly. That is, pass an array of: struct e820entry { u64 start; u64 size; u32 type; }; where 'type' uses the standard e820 definitions. That way, SeaBIOS can just walk through the list and add them to its e820 map. BTW, this is what SeaBIOS does when running under coreboot (coreboot passes a memory map as part of the "coreboot tables"). SeaBIOS is already smart enough to not use any high memory addresses marked as reserved. -Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZZEm-000668-TK for qemu-devel@nongnu.org; Mon, 25 Jan 2010 19:24:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZZEi-00063p-RA for qemu-devel@nongnu.org; Mon, 25 Jan 2010 19:24:56 -0500 Received: from [199.232.76.173] (port=37112 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZZEi-00063j-MD for qemu-devel@nongnu.org; Mon, 25 Jan 2010 19:24:52 -0500 Received: from mail-gx0-f212.google.com ([209.85.217.212]:63933) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZZEh-0001nR-Uz for qemu-devel@nongnu.org; Mon, 25 Jan 2010 19:24:52 -0500 Received: by gxk4 with SMTP id 4so4039460gxk.17 for ; Mon, 25 Jan 2010 16:24:50 -0800 (PST) Date: Mon, 25 Jan 2010 19:24:47 -0500 From: Kevin O'Connor Message-ID: <20100126002447.GA8800@morn.localdomain> References: <4B5DCAF2.3010105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B5DCAF2.3010105@redhat.com> Subject: [Qemu-devel] Re: [PATCH] Seabios - read e820 reserve from qemu_cfg List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: Anthony Liguori , seabios@seabios.org, qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity On Mon, Jan 25, 2010 at 05:46:42PM +0100, Jes Sorensen wrote: > Hi, > > Right now KVM/QEMU relies on hard coded values in Seabios for the > reserved area for the TSS pages and the EPT page. > > I'd like to suggest we change this to pass the value from QEMU via > qemu-cfg making it possible to move it around dynamically in the future. > > Attached is a patch to Seabios for this, which defaults to the current > hard coded value if no value is provided by qemu-cfg. We can remove > the backwards compatibility later. > > I'll post the QEMU patches for upstream QEMU and QEMU-KVM in a minute. > > Comments most welcome! I like the idea, but I think it would be better to pass a list of e820 entries explicitly. That is, pass an array of: struct e820entry { u64 start; u64 size; u32 type; }; where 'type' uses the standard e820 definitions. That way, SeaBIOS can just walk through the list and add them to its e820 map. BTW, this is what SeaBIOS does when running under coreboot (coreboot passes a memory map as part of the "coreboot tables"). SeaBIOS is already smart enough to not use any high memory addresses marked as reserved. -Kevin