From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC] Porting KVM to QEMU CVS Date: Mon, 18 Dec 2006 10:16:39 +0200 Message-ID: <45864E67.3050803@qumranet.com> References: <45861F9D.7070006@cs.utexas.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Anthony Liguori In-Reply-To: <45861F9D.7070006-NZpS4cJIG2HvQtjrzfazuQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > I spent some time this weekend trying to port the KVM changes to the > latest QEMU CVS. I got snagged on a certain changeset though. > Specifically, the changeset on Sep 24th that added SMM support (and > moved ACPI init to the BIOS) is where my patch stops working. > > KVM dies with a bus error after real early in boot. The BIOS appears > to be accessing a memory address at 0xa8000. With the latest CVS, > this bus error doesn't occur but the guest never makes any progress > (not even in the BIOS). > > So far, my best guess is that the VGA area is no longer in > 0xa0000-0xc0000 so the special handling of this is no longer valid. > Although, I don't really know all that much about the legacy RAM space > but I thought that the VGA area was pretty much fixed? > > Any thoughts? SMM continues the tradition of making each x86 generation hackier than before. What happens (probably) is that the virtual hardware unmaps the vga memory when SMM is entered, and uses the physical memory at these addresses (which is not normally accessible) to store the SMI handler code. The way to fix this (again, probably) is to: 1. Revert the 0-640K/1MB-end-of-memory slot thing and create just one memory slot for all physical RAM. 2. Add hacks in the memory slot code to not return a memory slot if the physical address is in the forbidden range. 3. Add another hack to disable the first hack when SMM is entered and re-enabled it when SMM is exited (e.g. some ioctl). > Is anyone else working on this? I intended to merge qemu once a release is made. However, if you get this working and it is stable, it may make sense to merge sooner as I very much like qemu cvs. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV