From: Paolo Bonzini <pbonzini@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>, kvm@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Sean Christopherson <seanjc@google.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v3 4/4] KVM: x86: add new nested vmexit tracepoints
Date: Fri, 24 Nov 2023 17:11:36 +0100 [thread overview]
Message-ID: <a10d3a01-939c-493c-b93c-b3821735e062@redhat.com> (raw)
In-Reply-To: <20230928103640.78453-5-mlevitsk@redhat.com>
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@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.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
Paolo
next prev parent reply other threads:[~2023-11-24 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 10:36 [PATCH v3 0/4] KVM: x86: tracepoint updates Maxim Levitsky
2023-09-28 10:36 ` [PATCH v3 1/4] KVM: x86: refactor req_immediate_exit logic Maxim Levitsky
2023-11-24 16:07 ` Paolo Bonzini
2023-11-28 6:41 ` Maxim Levitsky
2023-09-28 10:36 ` [PATCH v3 2/4] KVM: x86: add more information to the kvm_entry tracepoint Maxim Levitsky
2023-11-24 16:08 ` Paolo Bonzini
2023-09-28 10:36 ` [PATCH v3 3/4] KVM: x86: add information about pending requests to kvm_exit tracepoint Maxim Levitsky
2023-11-24 16:08 ` Paolo Bonzini
2023-09-28 10:36 ` [PATCH v3 4/4] KVM: x86: add new nested vmexit tracepoints Maxim Levitsky
2023-11-24 16:11 ` Paolo Bonzini [this message]
2023-11-28 6:42 ` Maxim Levitsky
2023-10-17 12:12 ` [PATCH v3 0/4] KVM: x86: tracepoint updates Maxim Levitsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a10d3a01-939c-493c-b93c-b3821735e062@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®