[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a957a662-b4b9-4104-9aea-d3bfb0bb7449@redhat.com>
Date: Thu, 19 Dec 2024 19:02:05 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Maxim Levitsky <mlevitsk@...hat.com>, kvm@...r.kernel.org
Cc: x86@...nel.org, Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Ingo Molnar <mingo@...hat.com>, Sean Christopherson <seanjc@...gle.com>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/3] KVM: x86: add new nested vmexit tracepoints
On 12/19/24 18:49, Maxim Levitsky wrote:
>> Here I probably would have preferred an unconditional tracepoint giving
>> RAX/RBX/RCX/RDX after a nested vmexit. This is not exactly what Sean
>> wanted but perhaps it strikes a middle ground? I know you wrote this
>> for a debugging tool, do you really need to have everything in a single
>> tracepoint, or can you correlate the existing exit tracepoint with this
>> hypothetical trace_kvm_nested_exit_regs, to pick RDMSR vs. WRMSR?
>
> Hi!
>
> If the new trace_kvm_nested_exit_regs tracepoint has a VM exit number argument, then
> I can enable this new tracepoint twice with a different filter (vm_exit_num number == msr and vm_exit_num == vmcall),
> and each instance will count the events that I need.
>
> So this can work.
Ok, thanks. On one hand it may make sense to have trace_kvm_exit_regs
and trace_kvm_nested_exit_regs (you can even extend the
TRACE_EVENT_KVM_EXIT macro to generate both the exit and the exit_regs
tracepoint). On the other hand it seems to me that this new tracepoint
is kinda reinventing the wheel; your patch adding nested equivalents of
trace_kvm_hypercall and trace_kvm_msr seems more obvious to me.
I see Sean's point in not wanting one-off tracepoints, on the other hand
there is value in having similar tracepoints for the L1->L0 and L2->L0
cases. I'll let him choose between the two possibilities (a new
*_exit_regs pair, or just apply this patch) but I think there should be
one of these two.
Paolo
Powered by blists - more mailing lists