[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 08/13] x86/PMU: Interface for setting PMU mode and flags



On 09/25/2013 10:11 AM, Jan Beulich wrote:
On 20.09.13 at 11:42, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -101,6 +101,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
  #define __HYPERVISOR_kexec_op             37
  #define __HYPERVISOR_tmem_op              38
  #define __HYPERVISOR_xc_reserved_op       39 /* reserved for XenClient */
+#define __HYPERVISOR_xenpmu_op            40
/* Architecture-specific hypercall definitions. */
  #define __HYPERVISOR_arch_0               48
I wonder whether you wouldn't better use an arch-specific hypercall
number here - there's really very little that's generic in what I have
seen so far.

Some of xenpmu commands (querying PMU mode/flags, PMU initialization/de-initialization)
seem generic to me. They may call arch-specific routines.

+/* Parameters structure for HYPERVISOR_xenpmu_op call */
+struct xenpmu_params {
+    /* IN/OUT parameters */
+    union {
+        struct version {
+            uint8_t maj;
+            uint8_t min;
+        } version;
+        uint64_t pad;
+    };
+    union {
+        uint64_t val;
+        void *valp;
Without there also being a handle here I can't see how you could
make use of the pointer.

Tha't really a placeholder, valp is not used anywhere. I can replace it
with XEN_GUEST_HANDLE.

-boris




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.