[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875yzddg5n.ffs@nanos.tec.linutronix.de>
Date: Thu, 20 May 2021 09:21:24 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Stefano De Venuto <stefano.devenuto99@...il.com>,
linux-kernel@...r.kernel.org
Cc: pbonzini@...hat.com, seanjc@...gle.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, x86@...nel.org,
hpa@...or.com, kvm@...r.kernel.org, rostedt@...dmis.org,
y.karadz@...il.com,
Stefano De Venuto <stefano.devenuto99@...il.com>,
Dario Faggioli <dfaggioli@...e.com>
Subject: Re: [PATCH] Move VMEnter and VMExit tracepoints closer to the actual event
On Wed, May 19 2021 at 20:23, Stefano De Venuto wrote:
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 05eca131eaf2..c77d4866e239 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -3275,8 +3275,6 @@ static int handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
> struct kvm_run *kvm_run = vcpu->run;
> u32 exit_code = svm->vmcb->control.exit_code;
>
> - trace_kvm_exit(exit_code, vcpu, KVM_ISA_SVM);
> -
> /* SEV-ES guests must use the CR write traps to track CR registers. */
> if (!sev_es_guest(vcpu->kvm)) {
> if (!svm_is_intercept(svm, INTERCEPT_CR0_WRITE))
> @@ -3707,6 +3705,8 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu)
>
> kvm_guest_enter_irqoff();
>
> + trace_kvm_entry(vcpu);
No. This violates the noinstr rules and will make objtool complain on a
full validation run.
So this wants to be:
+ instrumentation_begin();
+ trace_kvm_entry(vcpu);
+ instrumentation_end();
kvm_guest_enter_irqoff();
and on the exit side the trace wants to be post kvm_guest_exit_irqoff().
Thanks,
tglx
Powered by blists - more mailing lists