WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Information required on TRACE_VMEXIT working.

To: "aditya shevalkar" <aditya27783@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Information required on TRACE_VMEXIT working.
From: "George Dunlap " <dunlapg@xxxxxxxxx>
Date: Mon, 27 Nov 2006 09:38:44 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 27 Nov 2006 06:38:47 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=LuqpQWfqN50h9umIArdPbeUJborIs2qn8+BlsYlp2WKOlbPKvcJzfTtBhleJbeFp4XAaXPIoXC0CmBd7AIiNEmjpj1i8MRY2qm/2Lq3wh+uBg9JFTe7RQPdhX57DvK9Lst3hrxMF8qqGv4x6KBBQWURj1AQtFLHmuwY+fYls2WI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061127054321.45514.qmail@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20061127054321.45514.qmail@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 11/27/06, aditya shevalkar <aditya27783@xxxxxxxxxxx> wrote:
Hi all,

Can anybody explain the process of TRACE_VMEXIT ?
I am trying to understand its use in xen3.0.3\xen\arch\x86\hvm\vmx\vmx.c
file in the vmx_vmexit_handler function.
Also explain the meaning of its arguments and from where does it fetches
the values for different arguments.
Some code snippets from above file are given below:


TRACE_VMEXIT(0,exit_reason);
switch ( exit_reason )
{
case EXIT_REASON_EXCEPTION_NMI:



vector &= INTR_INFO_VECTOR_MASK;
TRACE_VMEXIT(1,vector);


__vmread(EXIT_QUALIFICATION, &va);
__vmread(VM_EXIT_INTR_ERROR_CODE, &regs->error_code);
TRACE_VMEXIT(3, regs->error_code);
TRACE_VMEXIT(4, va);

Also trying to understand the following expression in the same file:
#define TRACE_VMEXIT(index,value) this_cpu(trace_values)[index]=value

I think the missing piece of the puzzle are the following functions,
also found in vmx.c:

asmlinkage void vmx_trace_vmentry(void)
{
   struct vcpu *v = current;
   TRACE_5D(TRC_VMX_VMENTRY + current->vcpu_id,
            v->arch.hvm_vcpu.hvm_trace_values[0],
            v->arch.hvm_vcpu.hvm_trace_values[1],
            v->arch.hvm_vcpu.hvm_trace_values[2],
            v->arch.hvm_vcpu.hvm_trace_values[3],
            v->arch.hvm_vcpu.hvm_trace_values[4]);

   TRACE_VMEXIT(0, 0);
   TRACE_VMEXIT(1, 0);
   TRACE_VMEXIT(2, 0);
   TRACE_VMEXIT(3, 0);
   TRACE_VMEXIT(4, 0);
}

asmlinkage void vmx_trace_vmexit (void)
{
   TRACE_3D(TRC_VMX_VMEXIT + current->vcpu_id, 0, 0, 0);
}

When a VMEXIT happens, vmx_trace_vmexit() is called, and a trace
record is generated. (This includes an RDTSC timetamp).  Then, as the
VMEXIT is handled, the various trace_values[] are filled in, depending
upon what kind of vmexit it is.  Then, just before the next




With Regards,
Aditya Shevalkar.



__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>