On Tue, Sep 10, 2013 at 11:31:47AM -0400, Boris Ostrovsky wrote:+Looks OK to me if there are no changes to the hypervisor ABI.
+/* Parameter structure for HYPERVISOR_xenpmu_op call */
+struct xenpmu_params {
+ union {
+ struct version {
+ uint8_t maj;
+ uint8_t min;
+ } version;
+ uint64_t pad;
+ };
+ uint64_t control;
+};
+
+/* VPMU modes */
+#define VPMU_MODE_MASK 0xff
+#define VPMU_OFF 0
+/* guests can profile themselves, (dom0 profiles itself and Xen) */
+#define VPMU_ON (1<<0)
+/*
+ * Only dom0 has access to VPMU and it profiles everyone: itself,
+ * the hypervisor and the guests.
+ */
+#define VPMU_PRIV (1<<1)
+
+/* VPMU flags */
+#define VPMU_FLAGS_MASK ((uint32_t)(~VPMU_MODE_MASK))
+#define VPMU_INTEL_BTS (1<<8) /* Ignored on AMD */
+
+#endif /* __XEN_PUBLIC_XENPMU_H__ */