lkml.org 
[lkml]   [2020]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: SVM: Add tracepoint for cr_interception
From
Date
Kindly ping. :)
On 20/9/4 19:25, Haiwei Li wrote:
> From: Haiwei Li <lihaiwei@tencent.com>
>
> Add trace_kvm_cr_write and trace_kvm_cr_read for svm.
>
> Signed-off-by: Haiwei Li <lihaiwei@tencent.com>
> ---
>  arch/x86/kvm/svm/svm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 03dd7bac8034..2c6dea48ba62 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -2261,6 +2261,7 @@ static int cr_interception(struct vcpu_svm *svm)
>      if (cr >= 16) { /* mov to cr */
>          cr -= 16;
>          val = kvm_register_read(&svm->vcpu, reg);
> +        trace_kvm_cr_write(cr, val);
>          switch (cr) {
>          case 0:
>              if (!check_selective_cr0_intercepted(svm, val))
> @@ -2306,6 +2307,7 @@ static int cr_interception(struct vcpu_svm *svm)
>              return 1;
>          }
>          kvm_register_write(&svm->vcpu, reg, val);
> +        trace_kvm_cr_read(cr, val);
>      }
>      return kvm_complete_insn_gp(&svm->vcpu, err);
>  }
> --
> 2.18.4

\
 
 \ /
  Last update: 2020-09-23 08:25    [W:0.855 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site