All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun
Date: Thu, 08 Oct 2009 18:20:10 +0200	[thread overview]
Message-ID: <4ACE113A.7020708@redhat.com> (raw)
In-Reply-To: <20091008161545.GE14073@amd.com>

On 10/08/2009 06:15 PM, Joerg Roedel wrote:
> On Thu, Oct 08, 2009 at 05:58:22PM +0200, Avi Kivity wrote:
>    
>> On 10/08/2009 12:03 PM, Joerg Roedel wrote:
>>      
>>> This patch adds a dedicated kvm tracepoint for a nested
>>> vmrun.
>>>
>>> Signed-off-by: Joerg Roedel<joerg.roedel@amd.com>
>>> ---
>>>   arch/x86/kvm/svm.c   |    6 ++++++
>>>   arch/x86/kvm/trace.h |   33 +++++++++++++++++++++++++++++++++
>>>   arch/x86/kvm/x86.c   |    1 +
>>>   3 files changed, 40 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
>>> index 884bffc..907af3f 100644
>>> --- a/arch/x86/kvm/svm.c
>>> +++ b/arch/x86/kvm/svm.c
>>> @@ -1726,6 +1726,12 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm)
>>>   	/* nested_vmcb is our indicator if nested SVM is activated */
>>>   	svm->nested.vmcb = svm->vmcb->save.rax;
>>>
>>> +	trace_kvm_nested_vmrun(svm->vmcb->save.rip - 3, svm->nested.vmcb,
>>> +			       nested_vmcb->save.rip,
>>> +			       nested_vmcb->control.int_ctl,
>>> +			       nested_vmcb->control.event_inj,
>>> +			       nested_vmcb->control.nested_ctl);
>>> +
>>>        
>> It's better to pass only 'svm' as argument and have the tracepoint
>> code derive everything else, since (I think) argument setup is done
>> unconditionally, and only the actual trace_kvm call is patched out.
>> It may not work out due to where the trace code is compiled, but
>> it's worth trying.
>>      
> Hmm, struct vcpu_svm is defined in svm.c and local to that file. It is
> not known in x86.c, where the tracepoints are compiled, or in svm.c
> where trace.h is included. Is this tracepoint it worth it to move the
> definition of vcpu_svm into a (x86-)global header?
>    

I was talking about all svm tracepoints, but no, it isn't worth it.  
Let's leave it till later.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2009-10-08 16:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 10:03 [PATCH 0/9 v2] KVM: Nested SVM fixes and tracepoint conversion Joerg Roedel
2009-10-08 10:03 ` [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections Joerg Roedel
2009-10-08 16:12   ` Avi Kivity
2009-10-08 16:22     ` Joerg Roedel
2009-10-08 16:25       ` Avi Kivity
2009-10-08 16:32         ` Joerg Roedel
2009-10-08 16:38           ` Avi Kivity
2009-10-08 16:46             ` Alexander Graf
2009-10-12  9:34               ` Avi Kivity
2009-10-08 10:03 ` [PATCH 2/9] KVM: SVM: Move INTR vmexit out of atomic code Joerg Roedel
2009-10-08 10:03 ` [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun Joerg Roedel
2009-10-08 15:58   ` Avi Kivity
2009-10-08 16:15     ` Joerg Roedel
2009-10-08 16:20       ` Avi Kivity [this message]
2009-10-08 10:03 ` [PATCH 4/9] KVM: SVM: Add tracepoint for nested #vmexit Joerg Roedel
2009-10-08 10:03 ` [PATCH 5/9] KVM: SVM: Add tracepoint for injected #vmexit Joerg Roedel
2009-10-08 10:03 ` [PATCH 6/9] KVM: SVM: Add tracepoint for #vmexit because intr pending Joerg Roedel
2009-10-08 10:03 ` [PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction Joerg Roedel
2009-10-08 16:01   ` Avi Kivity
2009-10-08 16:18     ` Joerg Roedel
2009-10-08 16:21       ` Avi Kivity
2009-10-08 16:23         ` Joerg Roedel
2009-10-08 10:03 ` [PATCH 8/9] KVM: SVM: Add tracepoint for skinit instruction Joerg Roedel
2009-10-08 10:03 ` [PATCH 9/9] KVM: SVM: Remove nsvm_printk debugging code Joerg Roedel
2009-10-09 14:08 [PATCH 0/9 v3] KVM: Nested SVM fixes and tracepoint conversion Joerg Roedel
2009-10-09 14:08 ` [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACE113A.7020708@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.