[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <69607670cc11c05658870ae07d1af543a9446fe8.camel@redhat.com>
Date: Tue, 28 Nov 2023 08:42:40 +0200
From: Maxim Levitsky <mlevitsk@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Sean Christopherson <seanjc@...gle.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH v3 4/4] KVM: x86: add new nested vmexit tracepoints
On Fri, 2023-11-24 at 17:11 +0100, Paolo Bonzini wrote:
> On 9/28/23 12:36, Maxim Levitsky wrote:
> > Add 3 new tracepoints for nested VM exits which are intended
> > to capture extra information to gain insights about the nested guest
> > behavior.
> >
> > The new tracepoints are:
> >
> > - kvm_nested_msr
> > - kvm_nested_hypercall
> >
> > These tracepoints capture extra register state to be able to know
> > which MSR or which hypercall was done.
> >
> > - kvm_nested_page_fault
> >
> > This tracepoint allows to capture extra info about which host pagefault
> > error code caused the nested page fault.
> >
> > Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>
>
> Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>
>
> with just one question below that can be fixed when applying:
>
> > @@ -1139,6 +1145,22 @@ int nested_svm_vmexit(struct vcpu_svm *svm)
> > vmcb12->control.exit_int_info_err,
> > KVM_ISA_SVM);
> >
> > + /* Collect some info about nested VM exits */
> > + switch (vmcb12->control.exit_code) {
> > + case SVM_EXIT_MSR:
> > + trace_kvm_nested_msr(vmcb12->control.exit_info_1 == 1,
> > + kvm_rcx_read(vcpu),
> > + (vmcb12->save.rax & -1u) |
> > + (((u64)(kvm_rdx_read(vcpu) & -1u) << 32)));
>
> Why the second "& -1u"? (And I also prefer 0xFFFFFFFFull
I think I copied it from somewhere but I can't seem to find where.
I agree with both remarks, will fix.
Thanks,
Best regards,
Maxim Levitsky
>
> Paolo
>
Powered by blists - more mailing lists