From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgtV-0000m4-PW for qemu-devel@nongnu.org; Tue, 25 Oct 2011 09:18:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIgtU-0002NI-PR for qemu-devel@nongnu.org; Tue, 25 Oct 2011 09:18:17 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:40111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgtU-0002N0-DI for qemu-devel@nongnu.org; Tue, 25 Oct 2011 09:18:16 -0400 Date: Tue, 25 Oct 2011 09:18:09 -0400 (EDT) From: Dave Anderson Message-ID: <1b1504e0-bdc0-4c5c-8c65-38eed168ac17@zmail05.collab.prod.int.phx2.redhat.com> In-Reply-To: <4EA674EF.9010308@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: Re: [Qemu-devel] [Question] dump memory when host pci device is used by guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel , Jan Kiszka , "Richard W.M. Jones" , Luiz Capitulino , Avi Kivity , KAMEZAWA Hiroyuki ----- Original Message ----- > On 10/25/2011 10:23 AM, Avi Kivity wrote: > > On 10/25/2011 10:06 AM, Wen Congyang wrote: > >> Hi, Avi Kivity, Dave Anderson > >> > >> I have two questions about it: > >> > >> 1. How to know the guest's physical base address in qemu? > > > > In fact, it's impossible. > > > > Perhaps crash can scan through the core looking for a signature. Need > > to be careful since multiple signatures may be detected (a kdump kernel, > > a kernel image in pagecache, or a nested guest). > > Crash uses a heuristic based on the IDT base to identify the base from > migrate-to-file output. It also needs CR3 in order to read from virtual > address. Just to clarify -- the need for the IDT base and cr3 is *only* true for KVM dumps using the "savevm" format. With ELF-format kdumps, the phys_base is simply determined from the PT_LOAD segment that describes the kernel's __START_KERNEL_map region. I don't know why that couldn't be done in this proposed case. Dave