diff options
author | David Matlack <dmatlack@google.com> | 2014-11-05 20:46:42 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-08 08:20:55 +0100 |
commit | ce1a5e60a62f21a6b5ad3e1dee60c10f0cb2aa37 (patch) | |
tree | 0e396b87e1e874a8a0adf8e2034bec31583d278a /arch/x86/kvm/x86.c | |
parent | kvm: x86: Fix kvm clock versioning. (diff) | |
download | linux-ce1a5e60a62f21a6b5ad3e1dee60c10f0cb2aa37.tar.xz linux-ce1a5e60a62f21a6b5ad3e1dee60c10f0cb2aa37.zip |
kvm: x86: add trace event for pvclock updates
The new trace event records:
* the id of vcpu being updated
* the pvclock_vcpu_time_info struct being written to guest memory
This is useful for debugging pvclock bugs, such as the bug fixed by
"[PATCH] kvm: x86: Fix kvm clock versioning.".
Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8bf37d0ab404..f85da5cb6aa6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1661,6 +1661,8 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) vcpu->hv_clock.flags = pvclock_flags; + trace_kvm_pvclock_update(v->vcpu_id, &vcpu->hv_clock); + kvm_write_guest_cached(v->kvm, &vcpu->pv_time, &vcpu->hv_clock, sizeof(vcpu->hv_clock)); |