Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvmexit: Don't use raw tracepoint #4654

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

chenhengqi
Copy link
Collaborator

The kvm_exit tracepoint has the following proto (0):

TP_PROTO(struct kvm_vcpu *vcpu, u32 isa)

So for raw tracepoint, the first arg is a pointer to kvm_vcpu, not exit_reason. The exit_reason is hidden inside struct vcpu_vmx for Intel CPU (or struct vcpu_svm for AMD CPU). Both structs are not part of the UAPI, so it's hard to extract exit_reason. Let's always use the kvm_exit tracepoint instead.

The kvm_exit tracepoint has the following proto ([0]):

  TP_PROTO(struct kvm_vcpu *vcpu, u32 isa)

So for raw tracepoint, the first arg is a pointer to kvm_vcpu,
not exit_reason. The exit_reason is hidden inside struct vcpu_vmx
for Intel CPU (or struct vcpu_svm for AMD CPU). Both structs are
not part of the UAPI, so it's hard to extract exit_reason.
Let's always use the kvm_exit tracepoint instead.

  [0]: https://github.com/torvalds/linux/blob/1ef6663a587b/arch/x86/kvm/trace.h#L296

Signed-off-by: Hengqi Chen <[email protected]>
@yonghong-song yonghong-song merged commit 8f3b2db into iovisor:master Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants