Re: [PATCH v2 4/4] KVM: x86: add new nested vmexit tracepoints
From: Maxim Levitsky
Date: Thu Sep 28 2023 - 06:43:07 EST
On, 2023-09-26 у 18:50 +0200, Paolo Bonzini writes:
> On 9/24/23 14:44, Maxim Levitsky wrote:
> > + trace_kvm_nested_page_fault(fault->address,
> > + vcpu->arch.ept_fault_error_code,
>
> Any reason to include vcpu->arch.ept_fault_error_code rather than the
> injected exit qualification?
The vcpu->arch.ept_fault_error_code is the original exit qualification
which I want to trace as the host error code
captured on ept fault to a new field, but I see new that I can use vmx_get_exit_qual()
to retrieve it again, thus avoiding the overhead.
Also for the injected error code I can use the 'exit_qualification' instead, I think
that I intended to so so but forgot to update the patch.
So something like that works fine for me:
trace_kvm_nested_page_fault(fault->address,
vmx_get_exit_qual(vcpu),
exit_qualification);
Best regards,
Maxim Levitsky
>
> Paolo
>
> > + fault->error_code);