From patchwork Wed Oct 7 14:31:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 52288 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97EnQTn022521 for ; Wed, 7 Oct 2009 14:49:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933062AbZJGOeF (ORCPT ); Wed, 7 Oct 2009 10:34:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759396AbZJGOcu (ORCPT ); Wed, 7 Oct 2009 10:32:50 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:29168 "EHLO TX2EHSOBE009.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759381AbZJGOcq (ORCPT ); Wed, 7 Oct 2009 10:32:46 -0400 Received: from mail95-tx2-R.bigfish.com (10.9.14.239) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 8.1.340.0; Wed, 7 Oct 2009 14:32:09 +0000 Received: from mail95-tx2 (localhost.localdomain [127.0.0.1]) by mail95-tx2-R.bigfish.com (Postfix) with ESMTP id 9F6E51BE0520; Wed, 7 Oct 2009 14:32:09 +0000 (UTC) X-SpamScore: 3 X-BigFish: VPS3(zzzz1202hzzz32i6bh43j65h) X-Spam-TCS-SCL: 4:0 X-FB-SS: 5, Received: by mail95-tx2 (MessageSwitch) id 1254925919494488_27606; Wed, 7 Oct 2009 14:31:59 +0000 (UCT) Received: from TX2EHSMHS045.bigfish.com (unknown [10.9.14.251]) by mail95-tx2.bigfish.com (Postfix) with ESMTP id 33DAD1B1006F; Wed, 7 Oct 2009 14:31:59 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by TX2EHSMHS045.bigfish.com (10.9.99.145) with Microsoft SMTP Server (TLS) id 14.0.482.32; Wed, 7 Oct 2009 14:31:55 +0000 Received: from ausb3twp01.amd.com ([163.181.250.37]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n97EVmDK011408; Wed, 7 Oct 2009 09:31:51 -0500 X-WSS-ID: 0KR5F10-01-FEQ-02 X-M-MSG: Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp01.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 28F0110284C1; Wed, 7 Oct 2009 09:31:48 -0500 (CDT) Received: from sausexmb2.amd.com ([163.181.3.157]) by sausexbh2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Oct 2009 09:31:51 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Oct 2009 09:31:51 -0500 Received: from seurexmb1.amd.com ([165.204.9.130]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Oct 2009 16:31:38 +0200 Received: from lemmy.amd.com ([165.204.15.93]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Oct 2009 16:31:35 +0200 Received: by lemmy.amd.com (Postfix, from userid 41430) id 40BCEC9BC8; Wed, 7 Oct 2009 16:31:35 +0200 (CEST) From: Joerg Roedel To: Avi Kivity , Marcelo Tosatti CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 07/10] KVM: SVM: Add tracepoint for #vmexit because intr pending Date: Wed, 7 Oct 2009 16:31:25 +0200 Message-ID: <1254925888-13743-8-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1254925888-13743-1-git-send-email-joerg.roedel@amd.com> References: <1254925888-13743-1-git-send-email-joerg.roedel@amd.com> X-OriginalArrivalTime: 07 Oct 2009 14:31:35.0327 (UTC) FILETIME=[DF5922F0:01CA475A] MIME-Version: 1.0 X-Reverse-DNS: unknown Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4de75e3..a03dba1 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1387,6 +1387,7 @@ static inline int nested_svm_intr(struct vcpu_svm *svm) * the #vmexit here. */ set_bit(KVM_REQ_VMEXIT, &svm->vcpu.requests); + trace_kvm_nested_intr_vmexit(svm->vmcb->save.rip); return 1; } diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index a00b235..20248a1 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -451,6 +451,24 @@ TRACE_EVENT(kvm_nested_vmexit_inject, __entry->exit_info1, __entry->exit_info2, __entry->exit_int_info, __entry->exit_int_info_err) ); + +/* + * Tracepoint for nested #vmexit because of interrupt pending + */ +TRACE_EVENT(kvm_nested_intr_vmexit, + TP_PROTO(__u64 rip), + TP_ARGS(rip), + + TP_STRUCT__entry( + __field( __u64, rip ) + ), + + TP_fast_assign( + __entry->rip = rip + ), + + TP_printk("rip=0x%016llx\n", __entry->rip) +); #endif /* _TRACE_KVM_H */ /* This part must be outside protection */ diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c7ea2d8..e0a8517 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5000,3 +5000,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_cr); EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmrun); EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit); EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit_inject); +EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_intr_vmexit);