From patchwork Fri Oct 9 14:08:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 52723 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 n99EGmvJ017028 for ; Fri, 9 Oct 2009 14:16:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760971AbZJIOJv (ORCPT ); Fri, 9 Oct 2009 10:09:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760969AbZJIOJv (ORCPT ); Fri, 9 Oct 2009 10:09:51 -0400 Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:2859 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760938AbZJIOJr (ORCPT ); Fri, 9 Oct 2009 10:09:47 -0400 Received: from mail150-va3-R.bigfish.com (10.7.14.245) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 8.1.340.0; Fri, 9 Oct 2009 14:08:55 +0000 Received: from mail150-va3 (localhost.localdomain [127.0.0.1]) by mail150-va3-R.bigfish.com (Postfix) with ESMTP id A034D13C844A; Fri, 9 Oct 2009 14:08:54 +0000 (UTC) X-SpamScore: 3 X-BigFish: VPS3(zzzz1202hzzz32i2a8h6bh43j65h) X-Spam-TCS-SCL: 4:0 X-FB-SS: 5, Received: by mail150-va3 (MessageSwitch) id 1255097332865403_9604; Fri, 9 Oct 2009 14:08:52 +0000 (UCT) Received: from VA3EHSMHS026.bigfish.com (unknown [10.7.14.236]) by mail150-va3.bigfish.com (Postfix) with ESMTP id B095C6F8057; Fri, 9 Oct 2009 14:08:52 +0000 (UTC) Received: from svlb1extmailp01.amd.com (139.95.251.8) by VA3EHSMHS026.bigfish.com (10.7.99.36) with Microsoft SMTP Server (TLS) id 14.0.482.32; Fri, 9 Oct 2009 14:08:49 +0000 Received: from svlb1twp02.amd.com ([139.95.250.35]) by svlb1extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n99E8gC2009195; Fri, 9 Oct 2009 07:08:45 -0700 X-WSS-ID: 0KR93AH-04-7X9-02 X-M-MSG: Received: from SSVLEXBH1.amd.com (ssvlexbh1.amd.com [139.95.53.182]) by svlb1twp02.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 215751B1028E; Fri, 9 Oct 2009 07:08:41 -0700 (PDT) Received: from ssvlexmb2.amd.com ([139.95.53.7]) by SSVLEXBH1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Oct 2009 07:08:44 -0700 Received: from SF36EXMB1.amd.com ([172.19.4.24]) by ssvlexmb2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Oct 2009 07:08:44 -0700 Received: from seurexmb1.amd.com ([165.204.9.130]) by SF36EXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Oct 2009 16:08:38 +0200 Received: from lemmy.amd.com ([165.204.15.93]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Oct 2009 16:08:36 +0200 Received: by lemmy.amd.com (Postfix, from userid 41430) id 1B465C9FCD; Fri, 9 Oct 2009 16:08:36 +0200 (CEST) From: Joerg Roedel To: Avi Kivity , Marcelo Tosatti CC: Alexander Graf , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 6/9] KVM: SVM: Add tracepoint for #vmexit because intr pending Date: Fri, 9 Oct 2009 16:08:30 +0200 Message-ID: <1255097313-23267-7-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1255097313-23267-1-git-send-email-joerg.roedel@amd.com> References: <1255097313-23267-1-git-send-email-joerg.roedel@amd.com> X-OriginalArrivalTime: 09 Oct 2009 14:08:36.0622 (UTC) FILETIME=[FE66F2E0:01CA48E9] 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 369eeb8..78a391c 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1390,7 +1390,7 @@ static inline int nested_svm_intr(struct vcpu_svm *svm) * the #vmexit here. */ svm->nested.exit_required = true; - nsvm_printk("VMexit -> INTR\n"); + 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 4d6bb5e..3cc8f44 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 4f90d45..877f910 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4983,3 +4983,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);