summaryrefslogtreecommitdiff
path: root/kvm.c
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-12-02 01:04:30 +0000
committerBryan Cantrill <bryan@joyent.com>2011-12-02 01:04:30 +0000
commitcfe5813f8247c5492e51c7f072b85a4d0e13483b (patch)
treeb00d3543a9a955e6582e911117068428d836d127 /kvm.c
parent3b2aaad2c0647aa661548ee3add64f1aa590100c (diff)
downloadillumos-kvm-cfe5813f8247c5492e51c7f072b85a4d0e13483b.tar.gz
HVM-706 need static instrumentation in vcpu_load()/vcpu_put()
Diffstat (limited to 'kvm.c')
-rw-r--r--kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm.c b/kvm.c
index a7a9998..2383b1d 100644
--- a/kvm.c
+++ b/kvm.c
@@ -484,6 +484,8 @@ vcpu_load(struct kvm_vcpu *vcpu)
installctx(curthread, vcpu, kvm_ctx_save, kvm_ctx_restore, NULL,
NULL, NULL, NULL);
kvm_arch_vcpu_load(vcpu, cpu);
+ kvm_ringbuf_record(&vcpu->kvcpu_ringbuf,
+ KVM_RINGBUF_TAG_VCPULOAD, vcpu->cpu);
kpreempt_enable();
}
@@ -502,6 +504,8 @@ vcpu_put(struct kvm_vcpu *vcpu)
kvm_fire_urn(vcpu);
removectx(curthread, vcpu, kvm_ctx_save, kvm_ctx_restore, NULL,
NULL, NULL, NULL);
+ kvm_ringbuf_record(&vcpu->kvcpu_ringbuf,
+ KVM_RINGBUF_TAG_VCPUPUT, vcpu->cpu);
kpreempt_enable();
mutex_exit(&vcpu->mutex);
}