From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIck4-00045P-6O for qemu-devel@nongnu.org; Tue, 25 Oct 2011 04:52:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIck3-00027C-0e for qemu-devel@nongnu.org; Tue, 25 Oct 2011 04:52:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIck2-000275-M1 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 04:52:14 -0400 Message-ID: <4EA678B6.6090804@redhat.com> Date: Tue, 25 Oct 2011 10:52:06 +0200 From: Avi Kivity MIME-Version: 1.0 References: <54c9dc1d-3104-4f42-9a20-d7f4da516bdc@zmail05.collab.prod.int.phx2.redhat.com> <4EA58488.50306@redhat.com> <4EA66E1E.90502@cn.fujitsu.com> <4EA67216.3050309@redhat.com> <4EA674EF.9010308@redhat.com> In-Reply-To: <4EA674EF.9010308@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 , Dave Anderson , KAMEZAWA Hiroyuki On 10/25/2011 10:35 AM, Paolo Bonzini wrote: > 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. Does elf not store cr3? Perhaps a note with the contents of the privileged cpu registers is needed. How will gdb cope with module sections? They are virtually contiguous but physically scattered. AFAICT gdb doesn't do translations itself. The kernel proper can be handled with a simple offset, but modules cannot. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.