From: Keir Fraser Subject: Re: Finding guest calling function Date: Tue, 20 Jul 2010 14:45:49 +0100 Message-ID: References: <861fdb73-a7df-4f06-bc70-8b2d1fbf14b9@default> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <861fdb73-a7df-4f06-bc70-8b2d1fbf14b9@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Call show_stack(regs) and then pick apart the numeric guest stack dump. K. On 20/07/2010 14:35, "Dan Magenheimer" wrote: > In the hypervisor, I can use regs->eip to get the location > of a trapped instruction in a guest (in this case rdtsc) which > allows me to determine the function in which the trapping instruction > was used. > > Is there any easy way to determine the function that CALLED > the function in which the trapping instruction was used? > If so, is there any example code in Xen that I can steal from? > > (This is for a find-the-guest-kernel-rdtsc-uses exercise from > another thread... all the rdtsc uses are in native_read_tsc > so I need to know the frequencies of what is calling native_read_tsc.) > > Thanks, > Dan