From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 3/3] KVM: x86: trace cpuid emulation when called from emulator Date: Mon, 04 Nov 2013 15:06:09 +0100 Message-ID: <5277A9D1.4070206@redhat.com> References: <1383573163-17865-1-git-send-email-gleb@redhat.com> <1383573163-17865-3-git-send-email-gleb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52142 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753189Ab3KDOGL (ORCPT ); Mon, 4 Nov 2013 09:06:11 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA4E6BXH027089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Nov 2013 09:06:11 -0500 In-Reply-To: <1383573163-17865-3-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 04/11/2013 14:52, Gleb Natapov ha scritto: > Currently cpuid emulation is traced only when executed by intercept. > Move trace point so that emulator invocation is traced too. > > Signed-off-by: Gleb Natapov > --- > arch/x86/kvm/cpuid.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > index 86d5756..8f66fba 100644 > --- a/arch/x86/kvm/cpuid.c > +++ b/arch/x86/kvm/cpuid.c > @@ -756,6 +756,7 @@ void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx) > *edx = best->edx; > } else > *eax = *ebx = *ecx = *edx = 0; > + trace_kvm_cpuid(function, *eax, *ebx, *ecx, *edx); > } > EXPORT_SYMBOL_GPL(kvm_cpuid); > > @@ -771,6 +772,5 @@ void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) > kvm_register_write(vcpu, VCPU_REGS_RCX, ecx); > kvm_register_write(vcpu, VCPU_REGS_RDX, edx); > kvm_x86_ops->skip_emulated_instruction(vcpu); > - trace_kvm_cpuid(function, eax, ebx, ecx, edx); > } > EXPORT_SYMBOL_GPL(kvm_emulate_cpuid); > Reviewed-by: Paolo Bonzini