@@ -4,6 +4,8 @@
PERFCOUNTER_ARRAY(exceptions, "exceptions", 32)
+#ifdef CONFIG_HVM
+
#define VMX_PERF_EXIT_REASON_SIZE 56
#define VMX_PERF_VECTOR_SIZE 0x20
PERFCOUNTER_ARRAY(vmexits, "vmexits", VMX_PERF_EXIT_REASON_SIZE)
@@ -13,6 +15,8 @@ PERFCOUNTER_ARRAY(cause_vector,
#define SVM_PERF_EXIT_REASON_SIZE (1+141)
PERFCOUNTER_ARRAY(svmexits, "SVMexits", SVM_PERF_EXIT_REASON_SIZE)
+#endif /* CONFIG_HVM */
+
PERFCOUNTER(seg_fixups, "segmentation fixups")
PERFCOUNTER(apic_timer, "apic timer interrupts")
@@ -37,6 +41,8 @@ PERFCOUNTER(exception_fixed, "pre
PERFCOUNTER(guest_walk, "guest pagetable walks")
/* Shadow counters */
+#ifdef CONFIG_SHADOW_PAGING
+
PERFCOUNTER(shadow_alloc, "calls to shadow_alloc")
PERFCOUNTER(shadow_alloc_tlbflush, "shadow_alloc flushed TLBs")
@@ -112,6 +118,8 @@ PERFCOUNTER(shadow_unsync, "shad
PERFCOUNTER(shadow_unsync_evict, "shadow OOS evictions")
PERFCOUNTER(shadow_resync, "shadow OOS resyncs")
+#endif /* CONFIG_SHADOW_PAGING */
+
PERFCOUNTER(realmode_emulations, "realmode instructions emulated")
PERFCOUNTER(realmode_exits, "vmexits from realmode")
There's no point including them when the respective functionality isn't enabled in the build. Note that this covers only larger groups; more fine grained exclusion may want to be done later on. Signed-off-by: Jan Beulich <jbeulich@suse.com>