From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm_show_code for ROM code Date: Wed, 30 Apr 2008 20:51:22 +0300 Message-ID: <4818B19A.20109@qumranet.com> References: <481898F7.8040203@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Jan Kiszka Return-path: In-Reply-To: <481898F7.8040203@siemens.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Jan Kiszka wrote: > Userland-located ROM memory is not available via kvm->physical_memory + > guest_address. To let kvm_show_code also dump useful information when > some problem in ROM (BIOS...) occurs, this patch first tries to obtain > the memory content via the mmio_read callback - maybe not 100% clean, > but works at least for the QEMU use case. If the callback complains > about the given address, we then fall back to RAM access. > > kvm->physical_memory is actually broken, since nothing guarantees a 1:1 (+offset) mapping. Why not use ->mmio_read() all the time? Sure it overloads the definition of mmio_read(), but worse things have happened. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone