summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-09-06 22:11:38 +0000
committerRobert Mustacchi <rm@joyent.com>2011-09-06 22:11:38 +0000
commit01aa9c3e9047412b30f47aa9864b5c48d4869f28 (patch)
treefa0d89469312ace57bedd6ad0e6cb37b733a2163
parentc02ec961594ab5807e49cd85f74c5f767b8da39b (diff)
downloadillumos-kvm-01aa9c3e9047412b30f47aa9864b5c48d4869f28.tar.gz
HVM-638 Non-GZ can see kstats
-rw-r--r--kvm.c5
-rw-r--r--kvm_x86.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/kvm.c b/kvm.c
index bb8f489..3625750 100644
--- a/kvm.c
+++ b/kvm.c
@@ -670,9 +670,10 @@ kvm_create_vm(void)
list_insert_tail(&vm_list, kvmp);
mutex_exit(&kvm_lock);
- if ((kvmp->kvm_kstat = kstat_create("kvm", kvmp->kvmid, "vm",
+ if ((kvmp->kvm_kstat = kstat_create_zone("kvm", kvmp->kvmid, "vm",
"misc", KSTAT_TYPE_NAMED, sizeof (kvm_stats_t) /
- sizeof (kstat_named_t), KSTAT_FLAG_VIRTUAL)) == NULL) {
+ sizeof (kstat_named_t), KSTAT_FLAG_VIRTUAL, GLOBAL_ZONEID)) ==
+ NULL) {
kvm_destroy_vm(kvmp);
return (NULL);
}
diff --git a/kvm_x86.c b/kvm_x86.c
index c9649dc..8f6d2bc 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -4585,9 +4585,9 @@ kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
(void) snprintf(buf, sizeof (buf), "vcpu-%d", kvm->kvmid);
- if ((kstat = kstat_create("kvm", id, buf, "misc", KSTAT_TYPE_NAMED,
+ if ((kstat = kstat_create_zone("kvm", id, buf, "misc", KSTAT_TYPE_NAMED,
sizeof (kvm_vcpu_stats_t) / sizeof (kstat_named_t),
- KSTAT_FLAG_VIRTUAL)) == NULL) {
+ KSTAT_FLAG_VIRTUAL, GLOBAL_ZONEID)) == NULL) {
return (NULL);
}