]>
xen/sysctl: wrap around XEN_SYSCTL_perfc_op
authorPenny Zheng <Penny.Zheng@amd.com>
Mon, 30 Jun 2025 08:02:35 +0000 (10:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Jun 2025 08:02:35 +0000 (10:02 +0200)
perfc_control() and perfc_copy_info() are responsible for providing control
of perf counters via XEN_SYSCTL_perfc_op in DOM0, so they both shall
be wrapped.

Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/perfc.c

index 8302b7cf6db1cf7bb724f299f684052f9d3f4361..0f3b89af2cc9982778c42ce767501c06cb809662 100644 (file)
@@ -149,6 +149,7 @@ void cf_check perfc_reset(unsigned char key)
     }
 }
 
+#ifdef CONFIG_SYSCTL
 static struct xen_sysctl_perfc_desc perfc_d[NR_PERFCTRS];
 static xen_sysctl_perfc_val_t *perfc_vals;
 static unsigned int      perfc_nbr_vals;
@@ -265,6 +266,7 @@ int perfc_control(struct xen_sysctl_perfc_op *pc)
 
     return rc;
 }
+#endif /* CONFIG_SYSCTL */
 
 /*
  * Local variables: