mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:20:54 +07:00
KVM: SVM: Add tracepoint for cr_interception
Add trace_kvm_cr_write and trace_kvm_cr_read for svm. Signed-off-by: Haiwei Li <lihaiwei@tencent.com> Message-Id: <f3031602-db3b-c4fe-b719-d402663b0a2b@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
4e810adb53
commit
95b28ac9db
@ -2277,6 +2277,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))
|
||||
@ -2322,6 +2323,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user