Page MenuHomeFreeBSD

D39038.diff
No OneTemporary

D39038.diff

diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c
--- a/sys/amd64/vmm/io/vlapic.c
+++ b/sys/amd64/vmm/io/vlapic.c
@@ -905,7 +905,8 @@
}
}
-static VMM_STAT_ARRAY(IPIS_SENT, VMM_STAT_NELEMS_VCPU, "ipis sent to vcpu");
+static VMM_STAT(VLAPIC_IPI_SEND, "ipis sent from vcpu");
+static VMM_STAT(VLAPIC_IPI_RECV, "ipis received by vcpu");
static void
vlapic_set_tpr(struct vlapic *vlapic, uint8_t val)
@@ -1102,7 +1103,8 @@
CPU_FOREACH_ISSET(i, &dmask) {
vcpu = vm_vcpu(vlapic->vm, i);
lapic_intr_edge(vcpu, vec);
- vmm_stat_array_incr(vlapic->vcpu, IPIS_SENT, i, 1);
+ vmm_stat_incr(vlapic->vcpu, VLAPIC_IPI_SEND, 1);
+ vmm_stat_incr(vcpu, VLAPIC_IPI_RECV, 1);
VLAPIC_CTR2(vlapic,
"vlapic sending ipi %d to vcpuid %d", vec, i);
}
@@ -1223,7 +1225,8 @@
vec = val & 0xff;
lapic_intr_edge(vlapic->vcpu, vec);
- vmm_stat_array_incr(vlapic->vcpu, IPIS_SENT, vlapic->vcpuid, 1);
+ vmm_stat_incr(vlapic->vcpu, VLAPIC_IPI_SEND, 1);
+ vmm_stat_incr(vlapic->vcpu, VLAPIC_IPI_RECV, 1);
VLAPIC_CTR1(vlapic, "vlapic self-ipi %d", vec);
}
diff --git a/sys/amd64/vmm/vmm_stat.h b/sys/amd64/vmm/vmm_stat.h
--- a/sys/amd64/vmm/vmm_stat.h
+++ b/sys/amd64/vmm/vmm_stat.h
@@ -58,8 +58,6 @@
void vmm_stat_register(void *arg);
-#define VMM_STAT_NELEMS_VCPU (-1)
-
#define VMM_STAT_FDEFINE(type, nelems, desc, func, scope) \
struct vmm_stat_type type[1] = { \
{ -1, nelems, desc, func, scope } \
diff --git a/sys/amd64/vmm/vmm_stat.c b/sys/amd64/vmm/vmm_stat.c
--- a/sys/amd64/vmm/vmm_stat.c
+++ b/sys/amd64/vmm/vmm_stat.c
@@ -70,9 +70,6 @@
if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_svm())
return;
- if (vst->nelems == VMM_STAT_NELEMS_VCPU)
- vst->nelems = vm_maxcpu;
-
if (vst_num_elems + vst->nelems >= MAX_VMM_STAT_ELEMS) {
printf("Cannot accommodate vmm stat type \"%s\"!\n", vst->desc);
return;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 6:46 AM (12 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15740319
Default Alt Text
D39038.diff (1 KB)

Event Timeline